Привет каждому телу, которое я делаю наследование от FOSUserBundle, чтобы переопределить некоторые контроллеры, но на первом шаге, когда я создавал простой пакет, я обнаружил проблему:
bin/console genrate:bundle
Are you planning on sharing this bundle across multiple applications? [no]:
Bundle name: MyVendorFOSUserBundle
Target Directory [src/]: src/MyVendor/
Configuration format (annotation, yml, xml, php) [annotation]:
Bundle generation
> Generating a sample bundle skeleton into app/../src/MyVendor/MyVendorFOSUserBundle
created ./app/../src/MyVendor/MyVendorFOSUserBundle/
created ./app/../src/MyVendor/MyVendorFOSUserBundle/MyVendorFOSUserBundle.php
created ./app/../src/MyVendor/MyVendorFOSUserBundle/Controller/
created ./app/../src/MyVendor/MyVendorFOSUserBundle/Controller/DefaultController.php
created ./app/../tests/MyVendorFOSUserBundle/Controller/
created ./app/../tests/MyVendorFOSUserBundle/Controller/DefaultControllerTest.php
created ./app/../src/MyVendor/MyVendorFOSUserBundle/Resources/views/Default/
created ./app/../src/MyVendor/MyVendorFOSUserBundle/Resources/views/Default/index.html.twig
created ./app/../src/MyVendor/MyVendorFOSUserBundle/Resources/config/
created ./app/../src/MyVendor/MyVendorFOSUserBundle/Resources/config/services.yml
> Checking that the bundle is autoloaded
FAILED
> Enabling the bundle inside app/AppKernel.php
updated ./app/AppKernel.php
OK
> Importing the bundle's routes from the app/config/routing.yml file
updated ./app/config/routing.yml
OK
> Importing the bundle's services.yml from the app/config/config.yml file
updated ./app/config/config.yml
OK
The command was not able to configure everything automatically.
You'll need to make the following changes manually.
- Edit the composer.json file and register the bundle
namespace in the "autoload" section:
При первом решении я попытался изменить composer.json: *
"autoload": {
"psr-4": {
"": "src/" //modif
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
Кто-нибудь имеет представление об этом