cakephp / plugin-installer

A composer installer for installing CakePHP plugins.
Other
32 stars 18 forks source link

Add autoload paths for app plugins. #64

Closed ADmad closed 1 year ago

ADmad commented 1 year ago

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.

ADmad commented 1 year ago

After this we can update bake's plugin creating command to run composer dump-autoload instead of modifying the app's composer.json.

ADmad commented 1 year ago

One can still manually update composer.json and any existing namespace under psr-4 autoload will be left unchanged (as seen for Foo\\ and Foo\Test\\ in the test case).

markstory commented 1 year ago

This is great :clap: We should announce this on the bakery as it is a good quality of life improvement.

ADmad commented 1 year ago

This is targeting 2.x. Would have to be backported to 1.x for Cake 4 apps.

LordSimal commented 1 year ago

If we are going to backport it to 1.x I will definitely make a separate video showcasing the differences between the old and the new system. But indeed this is an awesome feature 👍🏻

LordSimal commented 1 year ago

This should be merged before we release Cake5