idea-php-symfony2-plugin: Missing support for route name_prefix
See: https://symfony.com/blog/new-in-symfony-4-1-prefix-imported-route-names
Example
The following configuration defines a single route named admin.dashboard
. Referencing the route name triggers “Route Missing” inspections as the plugin thinks that the route name is dashboard
.
# config/routes.yaml
admin:
resource: routes/admin.yaml
prefix: /admin
trailing_slash_on_root: false
name_prefix: admin.
# config/routes/admin/yaml
dashboard:
path: /
controller: App\Admin\Web\DashboardAction
methods: [GET]
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 22
- Comments: 16 (3 by maintainers)
With release 0.19.190 you can add the
var/cache/dev/UrlGenerator.php
inSettings
>Languagues & Frameworks
>PHP
>Symfony
>Routing
which solves the problem.Thank you very much @Haehnchen
yes the new format was added via: https://github.com/Haehnchen/idea-php-symfony2-plugin/commit/71b03398eee1906f7737aea2e4d03eaec45b1c6f thats why the routes are working now and also autodetection of this was was improved.
so
UrlGenerator
orurl_generating_routes
can be taken if its not used by its own.for me it still can be approved to also load config eg via
config/routes.yaml
to not relay on this routing file, but i guess most common usages would now work.