Conversation
746348b to
20102b9
Compare
|
After this we can update bake's plugin creating command to run |
|
One can still manually update composer.json and any existing namespace under psr-4 autoload will be left unchanged (as seen for |
This change avoids having to update the app's composer.json to add autoload paths for app plugins under the "plugins" folder.
20102b9 to
dc2b5b4
Compare
src/Plugin.php
Outdated
| if (!isset($autoload['psr-4'][$pluginNamespace])) { | ||
| $autoload['psr-4'][$pluginNamespace] = $path . 'src'; | ||
| } | ||
| if (!isset($devAutoload['psr-4'][$pluginTestNamespace])) { | ||
| $devAutoload['psr-4'][$pluginTestNamespace] = $path . 'tests'; | ||
| } |
There was a problem hiding this comment.
Should we make sure these directories exist before generating autoloader paths for them? The paths should exist but userland application structures are unpredictable.
|
This is great 👏 We should announce this on the bakery as it is a good quality of life improvement. |
|
This is targeting 2.x. Would have to be backported to 1.x for Cake 4 apps. |
|
If we are going to backport it to |
|
This should be merged before we release Cake5 |
This change avoids having to update the app's composer.json to add autoload paths for app plugins under the "plugins" folder.
I have been using a custom composer plugin which does the same for quite a while for my apps.