-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: custom namespace? #7569
Comments
Tried putting the namespace I want into |
"Private" plugins live in the You have to specify in your root composer.json (NOT the plugins composer.json) which namespace maps to which folder relative to that composer.json Just like you did in #7568 you have to define
in your root composer.json and regenerate the autoloader via The other problem you have in #7568 is probably related to the fact, that you don't have a |
Hi @LordSimal, thank you for replying
Yes, I did put the namespace I wanted into the root (not plugin) composer.json file and I did run
You're right, I just never mentioned it - sorry about that. I do have it and once I used the namespace CakePHP wanted (the camelcase version of the plugin folder name) everything routed correctly and I got my test response from that Posts controller. |
If you feel like the docs can be improved you can of course provide a PR which clarifies what confused you in the first place. |
Sending a PR implies knowing the solution, but I don't have any. I have tried several things, but I couldn't get my plugin to use the custom namespace I wanted and have functioning routes. I am already on the Slack channel, but that is indeed for one-off support questions, while here on Github I am asking someone who has the answer to improve the docs. |
If you need examples, you can always check awesome list of plugins: |
https://book.cakephp.org/4/en/plugins.html
How?
The text was updated successfully, but these errors were encountered: