Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony][SF2][Symfony2] problem na poczatku...
Wasper
post
Post #1





Grupa: Zarejestrowani
Postów: 82
Pomógł: 1
Dołączył: 18.09.2011

Ostrzeżenie: (0%)
-----


Hej.
Kupilem ksiazke pana Gajdy apropo symfony2, sciagnalem odpalilem szkielet, uzupelnilem wszystkie braki ktore wyrzucal config i jest ok.

Nastepny krok w ksiazce

  1. Krok 2. Usuń pakiet demo
  2.  
  3. - Usuń folder hello-world/src/Acme/.
  4.  
  5.  - W pliku hello-world/app/AppKernel.php usuń wpis:
  6. $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
  7. 
  8. - W pliku hello-world/app/config/routing_dev.php usuń wpisy:
  9. _welcome:
  10. pattern: /
  11. defaults: { _controller: AcmeDemoBundle:Welcome:index }
  12.  
  13. _demo_secured:
  14. resource: "@AcmeDemoBundle/Controller/SecuredController.php"
  15. type:
  16. annotation
  17.  
  18. _demo:
  19. resource:type:
  20. prefix:
  21. "@AcmeDemoBundle/Controller/DemoController.php"
  22. annotation
  23. /demo
  24.  
  25. 
  26. - Usuń folder hello-world/web/bundles/acmedemo/.
  27.  
  28. dalej....
  29. - Krok 3.1. Utwórz nowy pakiet My/HelloworldBundle
  30.  
  31. /***
  32. Bundle name [MyHelloworldBundle]:
  33. Target directory [...\hello-world/src]:
  34. Configuration format (yml, xml, php, or annotation) [annotation]:
  35. Do you want to generate the whole directory structure [no]?
  36. Do you confirm generation [yes]?
  37. Confirm automatic update of your Kernel [yes]?
  38. Confirm automatic update of the Routing [yes]?
  39. ***/
  40.  
  41. - dostosuj kontroler
  42. * @Route("/hello-world.html")
  43. public function indexAction()
  44. return array()
  45.  
  46. - dostosuj widok
  47. <!DOCTYPE html>
  48. <html>
  49. <head>
  50. <title>Hello, world!</title<meta charset="UTF-8" />
  51. </head>
  52. <body>
  53. <h1>Hello, world!</h1>
  54. </body>
  55. </html>
  56.  


i po wpisaniu http://localhost/hello-world/web/app_dev.p...ello-world.html
powinno byc ok... a nie jest

  1. RuntimeException: The autoloader expected class "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener" to be defined in file "/home/Wasper/public_html/easyapp.localhost.com/vendor/symfony/symfony/src//Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php". The file was found but the class was not in it, the class name or namespace probably has a typo.


gdzie tkwi problem?(IMG:style_emoticons/default/questionmark.gif)
config.php nadal pokazuje, ze wszystko ok
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 18:00