B
B
BonBon Slick2017-11-25 00:18:28
symfony
BonBon Slick, 2017-11-25 00:18:28

SensioGeneratorBundle in Symfony 4?

Mmmm, I see that this package makes life easier by generating CRUD, Bundles and more, but it is only available in versions prior to 3.0 .

Will it be in the new version 4? Or has it already been replaced?

Since it does not work correctly in the new version of Symfony.

created .\src/../src/BlogBundle/Resources/config/routing.yml
> Checking that the bundle is autoloaded
FAILED
> Enabling the bundle inside C:\Users\BonBon\Code\testsite\src\Kernel.php
FAILED
> Importing the bundle's routes from the C:\Users\BonBon\Code\testsite\src/config/routing.yml file
  created .\src/config/
  created .\src/config/routing.yml
OK
> Importing the bundle's services.yml from the C:\Users\BonBon\Code\testsite\src/config/config.yml file
FAILED

It also generates files with wrong namespace.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
padlyuck, 2017-11-25
@BonBonSlick

met with a similar error in the third

> Checking that the bundle is autoloaded
FAILED

to get rid of this you need to write in composer.json
"autoload":{
"psr-4": {
            "BlogBundle\\": "src/BlogBundle" /*тут меняете путь*/
        },
}

then composer dumpautoload and try to generate the bundle again (you may have to clean up what has already been generated).
For version 4 alternative SensioGeneratorBundle https://github.com/symfony/maker-bundle

F
Flasher, 2017-11-25
@Flasher

It is possible to generate controllers and not only through the console of the same phpstorm through the command line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question