Search code examples
symfonybundle

impossible to generate bundle


i'm new to the symfony framework and i'm trying to generate my first bundle , i use this command php bin/console generate:bundle but it's not working.

The error message :

There are no commands defined in the "generate" namespace.

You may be looking for a command provided by the SensioGeneratorBundle which is currently not installed.

Try running composer require sensio/generator-bundle.

https://i.sstatic.net/gKdsD.jpg

I've tried to install composer repositories with the command composer require sensio/generator-bundle and nothing has changed


Solution

  • We're not making bundle in Symfony 4.

    While it was "good practice" withg Symfony 2, since the new skeleton, it's not the case anymore.

    Your default bundle is now App, all your code goes in src/, and all your view (twig files) goes in template/