-
Notifications
You must be signed in to change notification settings - Fork 159
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
Compatibilty with Composer 2.0 #184
Comments
@tobias-kuendig We really haven't done any testing beyond the things that |
Glad to hear it @bd808! @tobias-kuendig could you test this out in October by changing the dependency to |
Not quite there yet!
Using October's composer.json with a few October plugins installed locally so the merge-plugin has something to merge. The following error is fixed by #182
The installation of October's modules are failing now:
Looks like the installation now fails if the target directory is not empty. This check was recently added: I guess this not a problem that concerns the merge-plugin, though. Removing the
The required This was too deep into the Composer internals for me to provide a quick fix! |
It should be noted that's "latest snapshot" not "latest stable" ;) |
We hit the same issue trying out this branch:
|
Using what versions? https://github.com/wikimedia/composer-merge-plugin/blob/composer20/src/MergePlugin.php#L154-L160 PRE_OPERATIONS_EXEC is new in 2.0, so it sounds like it isn't found in your version, hence falling back to the 1.0 constant which doesn't exist in 2.0... |
The |
Maybe it should be
|
@tobias-kuendig Your PR works fine, thank you |
It only fixes the constant issue, though
The Installer Event methods are only:
|
Latest stable version of Composer is now officially 2.0 and I'm still encountering issues, even with the
What are the plans to fix this and can I do anything to help? |
The composer20 branch has not been updated since March. The undefined That's where my PR comes in with an alternative to how extra packages are merged. I've been spending quite a bit of time, in the last three months, researching Composer v2 and working on support for a few plugins. |
The composer merge plugin doesn't yet work with composer 2. See wikimedia/composer-merge-plugin#184 and https://phabricator.wikimedia.org/T248908 Bug: T266455 Change-Id: I6d78bdb05a518778c958a9b47b053b4e64f7e26d
The composer merge plugin doesn't yet work with composer 2. See wikimedia/composer-merge-plugin#184 and https://phabricator.wikimedia.org/T248908 Bug: T266459 Change-Id: I6d78bdb05a518778c958a9b47b053b4e64f7e26d
* Update Wikibase from branch 'master' to 62ae43ef0fe1d916d4f3b824d3ab39e38ff517eb - Merge "Prevent Composer from updating to v2 in Travis CI" - Prevent Composer from updating to v2 in Travis CI The composer merge plugin doesn't yet work with composer 2. See wikimedia/composer-merge-plugin#184 and https://phabricator.wikimedia.org/T248908 Bug: T266459 Change-Id: I6d78bdb05a518778c958a9b47b053b4e64f7e26d
I don't "need" v2 at the moment, but have reasons to stick to v1 for now: wikimedia/composer-merge-plugin#184
Please, keep working on this issue. I need it to my project works fine on C2. |
You are not alone 😉: a lot of projects use this composer-merge-plugin, and all of them are forced to use version 1 of composer. |
Or remove it again :) As we did. |
Support for Composer v2 has been finally resolved with the release of Merge Plugin v2.0.0. See #206 for details. Thanks @tstarling |
Do you know when a release will happen? |
@smustgrave We already have version 2.0.0 and 2.0.1 published - see https://packagist.org/packages/wikimedia/composer-merge-plugin |
@smustgrave I don't know when there will be GitHub Release description (/cc @tstarling) but the package is tagged as @mlocati and I pointed out. |
Thanks for the update for Composer 2 support! README.md still contains references to 1.5.x or 1.5. These should be changed to 2.x and 2.0.0
|
Both 1.5 references fixed. https://github.com/wikimedia/composer-merge-plugin/releases/tag/v2.0.1 Github "release" created; though I'm not sure how many people actually use that for PHP libraries :) I'll wait a little bit, but we can tag a 2.0.2 when there's been a bit more testing to bring in the minor README tweaks. |
The composer merge plugin doesn't yet work with composer 2. See wikimedia/composer-merge-plugin#184 and https://phabricator.wikimedia.org/T248908 Bug: T266459 Change-Id: I6d78bdb05a518778c958a9b47b053b4e64f7e26d (cherry picked from commit c542255)
* Update Wikibase from branch 'REL1_35' to 03aa0fc7d465d924721d48170de73263946d1bd6 - Prevent Composer from updating to v2 in Travis CI The composer merge plugin doesn't yet work with composer 2. See wikimedia/composer-merge-plugin#184 and https://phabricator.wikimedia.org/T248908 Bug: T266459 Change-Id: I6d78bdb05a518778c958a9b47b053b4e64f7e26d (cherry picked from commit c5422556ba1b3d18c5a17ad1aa8da26d6d745993)
Still not fully compatible with composer 2? |
@carloscarucce, why, what symptoms are you experiencing? |
@XedinUnknown by the time it hasn't loaded any of my subfolders |
I remember I had to run |
I'm still getting errors using 2.0.1 from package repo (defining 1 package) has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. Seems whatever is in my merge-plugin include tops my main composer file. |
@smustgrave Did you try setting https://github.com/wikimedia/composer-merge-plugin#ignore-duplicates ? |
I did. Tried all the settings. Can't resolve the conflict |
Do you run a full |
Full update. Just composer update |
Here's my composer file if that helps. The conflict is coming from ckeditor/link. The file I'm including in the merge-plugin for webform also loads ckeditor/link but an older version. I would expect that my composer file would beat anything being merged or is that wrong? { |
See https://github.com/wikimedia/composer-merge-plugin#replace, you have |
Even setting replace: true didn't work. Still get the error. |
And with both set I get this now Now if I add "canonical": false to the repo within the webform composer.libraries.json file it seems to work. But if that desirable? That all modules and libraries have to add this line now? |
@smustgrave if you have two different versions of the same package attempting to be loaded then yes, you will have composer complaining about it since the wrong version being loaded for one of those packages could cause the package to break. You should examine both requirements and if there really isn't a reason why they couldn't both use the same version of the dependency; then see if you can make the requirements looser on one composer.json or the other so you can make them use the same version of the dependency. |
So with these Drupal sites we don't have a lot of control over other modules composer files. Ideally the main composer file should beat out the merged stuff. And the settings don't really seem to have any affect on it. Most likely going to have and downgrade composer or remove the merge-plugin. Until merge-plugin fully works with composer 2. |
@smustgrave what is the other module's composer file? |
Can we move this to a new/seperate issue please? |
If you've landed here looking for a version of the
wikimedia/composer-merge-plugin
compatible with Composer 2.0, please see #189 and help test!It seems like composer 2.0 is right around the corner. Downloading
https://getcomposer.org/composer.phar
already gives you a 2.0 build.Are there any plans to make this plugin compatible? It currently explicitly requires a v1 composer api to be present.
The text was updated successfully, but these errors were encountered: