Hej.
Kupilem ksiazke pana Gajdy apropo symfony2, sciagnalem odpalilem szkielet, uzupelnilem wszystkie braki ktore wyrzucal config i jest ok.
Nastepny krok w ksiazce
Krok 2. Usuń pakiet demo
- Usuń folder hello-world/src/Acme/.
- W pliku hello-world/app/AppKernel.php usuń wpis:
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
- W pliku hello-world/app/config/routing_dev.php usuń wpisy:
_welcome:
pattern: /
defaults: { _controller: AcmeDemoBundle:Welcome:index }
_demo_secured:
resource: "@AcmeDemoBundle/Controller/SecuredController.php"
type:
annotation
_demo:
resource:type:
prefix:
"@AcmeDemoBundle/Controller/DemoController.php"
annotation
/demo
- Usuń folder hello-world/web/bundles/acmedemo/.
dalej....
- Krok 3.1. Utwórz nowy pakiet My/HelloworldBundle
/***
Bundle name [MyHelloworldBundle]:
Target directory [...\hello-world/src]:
Configuration format (yml, xml, php, or annotation) [annotation]:
Do you want to generate the whole directory structure [no]?
Do you confirm generation [yes]?
Confirm automatic update of your Kernel [yes]?
Confirm automatic update of the Routing [yes]?
***/
- dostosuj kontroler
* @Route("/hello-world.html")
public function indexAction()
- dostosuj widok
<!DOCTYPE html>
<html>
<head>
<title>Hello, world!</title<meta charset="UTF-8" />
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>
i po wpisaniu
http://localhost/hello-world/web/app_dev.p...ello-world.htmlpowinno byc ok... a nie jest
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