Skip to content
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

Make compatible with Composer 2 #313

Closed
balsama opened this issue Apr 28, 2020 · 12 comments
Closed

Make compatible with Composer 2 #313

balsama opened this issue Apr 28, 2020 · 12 comments

Comments

@balsama
Copy link

balsama commented Apr 28, 2020

Drupal aims to be compatible with Composer 2. See Issue #3126566.

As one of the most widely used plugins in Drupal, we should aim to make this plugin compatible with Composer 2 too.

@cweagans
Copy link
Owner

see also #309

definitely in favor of this.

@balsama
Copy link
Author

balsama commented Apr 28, 2020

Oh dang. I missed that when I searched for an existing issue because I wasn't searching PRs (shakes fist at github defaults).

Perhaps we should leave this open then for others who might do the same. Thanks.

@mxr576
Copy link

mxr576 commented Jun 25, 2020

When do you plan to release a new version with Composer 2.x support? As I can see it is only available in master yet.

@mxr576
Copy link

mxr576 commented Jun 25, 2020

@NetStorm84
Copy link

I would also like compatibility with Composer 2. Do we have an idea when this is likely to happen?

@hussainweb
Copy link

I created a PR #321 to add support for Composer 2 to the 1.x branch. It's basically a cherry-pick from #309 and then changes to composer.lock (which I was not sure about).

@danepowell
Copy link
Collaborator

If I'm not mistaken this was added in #321

Can we get a new stable release so end users can start using Composer 2?

@hussainweb
Copy link

@danepowell, we would also need #330 to go in before this works with composer 2.

@clxmstaab
Copy link

clxmstaab commented Sep 24, 2020

you could already beta-test composer v2 support with a constraint like

"cweagans/composer-patches": "1.x-dev as 1.6.8-dev",

one issue we ran into when using the plugin with composer-v2 is

Fatal error: Uncaught Error: Call to undefined method Composer\DependencyResolver\Operation\InstallOperation::getJobType() in /home/runner/work/daiber/daiber/vendor/cweagans/composer-patches/src/Patches.php:179
Stack trace:
#0 [internal function]: cweagans\Composer\Patches->gatherPatches()
#1 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(165): call_user_func()
#2 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(118): Composer\EventDispatcher\EventDispatcher->doDispatch()
#3 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(368): Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent()
#4 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(309): Composer\Installer\InstallationManager->executeBatch()
#5 phar:///usr/local/bin/composer/src/Composer/Installer.php(711): Composer\Installer\InstallationManager->execute()
#6 phar:///usr/local/bin/composer/src/Composer/Installer.php(252): Composer\Installer in /home/runner/work/daiber/daiber/vendor/cweagans/composer-patches/src/Patches.php on line 179

for a first step I just added some automation using phpstan and phpunit run by a github action

would love to get some support to hunt down remainig problems on the road to composer v2 support

@markdorison
Copy link

@clxmstaab I believe that issue is addressed in PR #330.

@balsama
Copy link
Author

balsama commented Sep 30, 2020

#330 was merged into 1.x: ae02121

@balsama
Copy link
Author

balsama commented Oct 7, 2020

As of 1.7.0, this is fixed. Thanks!

@balsama balsama closed this as completed Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants