Conversation
Add new Plugin class which implements Composer's PluginInterface.
|
If these changes are compatible with both composer 1 and 2 it would be preferable to me if we could release this as 1.3.0 and not require any significant changes in userland code. Doing that seems like it would require at least a dummy method for I don't think the implementation of this installer hook requires a major version bump if we include the above shim because functionally it still does everything the old code did and wouldn't raise any runtime errors. |
Sounds good to me.
Yes, I have already done that. |
|
Would appreciate it if people could try out the Things to ensure:
|
|
Want to release a beta or rc out of next branch for easier testing? |
|
|
|
I tried the beta out tonight and this was my composer log (with composer 1) The cakephp-plugins.php file was correctly generated. |
|
Things works as expected for me too with both composer v1 and v2. The warning for removing |
|
I can confirm cakephp-plugins.php is generated on windows as well with composer v1. |
|
I can also confirm, that the cakephp-plugins.php is generated correctly under
The only thing that can be quite confusing for users who are upgrading (to at least 1.3.0-beta for now) is the fact, that the following message is being shown after performing a Here what I did: Updated my composer.json to have the following records adjusted/added Performed a After that i removed all my vendor modules and performed a new Therefore i removed the postAutoloadDump hook from the composer.json. Commited that in my repo and pulled it on my production machine Performed a And then the message from the start was shown. |
Initially you got the message to add the post install hook because you were using a very old bugfix branch as evident from You should have updated to use stable release of the plugin installer years ago 🙂.
Which message exactly? What does your |
|
The only reason i used the DEV version is because I used your bugfix from #48 The message i was referring to was composer.json
|
|
But of course this can only be a special case just for users like me which were previously on that bugfix for Composer v2 |
Oh sorry, yes that's a special case and normally no one will get that message. You can run |
2820e6d to
9ae955a
Compare
|
Let's merge and release. We won't get any more testing out of this. |
|
We would have to keep composer v2 constraint with BTW our plugin installer v1.2 doesn't work at all now with the composer 2 RC releases. The composer update/install seems to go nicely and doesn't give any errors but the folders for the plugins under |
|
Ah right. I guess we could just wait. |
Issues with current version
PluginInstallerupdates thevendor/cakephp-plugins.phpfile to add/remove entry for the cakephp plugin that is installed/removed via composer.Later on the
PluginInstaller::postAutoloadDump()which is set aspost-autoload-dumphook through app's composer.json recreates thecakephp-plugins.phpfile making the changes done earlier for individual plugin addition/removal redundant.Changes in this PR
composer-pluginand thecomposer-plugin-apiinterface is used. This allows the package to rely on event subscription and run ourpostAutoloadDump()script itself and avoid calling it from app'scomposer.json.cakephp-plugins.phpis manipulated/created only once for thepost-autoload-dumpevent.Compatibility
post-autoload-dumphook from app's composer.json.