I created a default symfony 6.2 application using the according composer command.
After that I created a "bundle-dev" directory to create a reusable bundle there (bundle-dev/test/plugin-bundle). I created the bundle exactly like it's described here https://symfony.com/doc/current/bundles/best_practices.html.
My file Structure:
plugin-bundle
├── config
├──── routes
├────── attributes.yaml
├──── services.yaml
├── src
├──── Controller
├────── DefaultController.php
├──── PluginBundle.php
├── composer.json (name: "test/plugin")
For testing I created a defaultController with just a defaultAction.
Routing is very basic - as described here (see /blog): https://symfony.com/doc/current/routing.html#creating-routes-as-attributes
I also added a repository entry to my composer.json to create an entry in the vendor folder of the "base" symfony installation. (vendor/test/plugin)
So far everything works fine - I "activated" the bundle in the config\bundles.php and yeah nothing really happens. The test route I created isn't loaded ...
I checked the router via bin/console debug:router and the route isn't listed there ...
I tried to solve the problem via:
- clearing the cache
- removing the vendor folder (and reinstall it)
- recreating the autoload files
composer dump-autoload
It seems like the bundle isn't really loaded ... but the debugger says it is - at least symfony lists the bundle in the configurations tab (of the debugger)
Do you have any ideas how to fix this?