New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin routes config files are included twice #593
Comments
This was a problem in an one of the rc releases, but that issue was fixed. What are the stack traces for each include? You can use |
What I did:
Stacktrace:
|
Oh I hadn't considered usage of |
I found this out the hard way, (exceptions about named routes already set). Removing Plugin::routes fixed it. Guess this should be mentioned somewhere in the docs and/or the app skeleton should be updated accordingly when releasing this breaking change as it is mostly the starting point for most new projects... Also something to take note of is that the current implementation of RouterShell is unaware of any routes loaded by the RoutingMiddleware (which is of course logical but i thought it should mention this) thus making this shell script obsolete in favor of DebugKit's routes panel. |
I can look into fixing this. I'm pretty sure we can figure out a clever solution to this. |
The issue with |
When using the new plugin system this method is no longer necessary as the plugin classes include routes during application startup. Refs #593
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
CakePHP Application Skeleton Version: 3.6.0
Platform and Target: CakePHP 3.6.0
What you did
register a Plugin with routes in bootstrap.php
What happened
The routes file
plugins/Foo/config/routes.php
is included twice.What you expected to happen
The routes file should only be included once.
I assume the call to
Plugins::routes()
inconfig/routes.php
isn't necessary in Cake 3.6 anymore?The text was updated successfully, but these errors were encountered: