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

[WIP] Started working on composer v2 support #63

Merged

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Jan 28, 2021

This is (or was) an attempt at making this module compatible with composer v2 in scope of #59

However, I think I will give up on this, I'm not familiar enough with the codebase or with composer's internals.
Maybe the changes in here can be useful in case somebody else wants to pick this up later...

Remarks:

  • PR was created from the release/3 branch since I'm using macOs and only on that branch the built-in unit tests seems to be running without many issues (maybe those commits could be merged in master one day?)
  • I temporarily removed the dependency on vaimo/composer-changelogs since that one also doesn't support composer v2 yet: Support Composer 2 composer-changelogs#3
  • It's very difficult to keep supporting both composer v1 and v2 due to many internal calls to the composer source which have changed significantly between v1 and v2. Therefore I only declared the module as compatible with v2
  • I got a bunch of tests working when executing composer code:test but unfortunately not all of them
  • All changes I present in here should be investigated, I only tried to make the code run without errors but didn't check if it actually executed what it is supposed to execute since I'm not familiar with how composer works internally
  • These changes will probably warrant a major v5 version as they are not backwards compatible with composer v1

Hoping that the work done in here is useful to the next person who attempts this 🙂

@hostep hostep mentioned this pull request Jan 28, 2021
@allanpaiste
Copy link
Contributor

Hey there! Very cool to see this being picked up by someone. I'll snoop around on how many of the functions actually changed to assess if we can get away without needing to do a full major release, but I'll def be chipping in on this one :)

@mbernabeu
Copy link

mbernabeu commented Feb 11, 2021

Please can we prioritize this PR, with the release of 2.4.2 it is a must-have.

@hostep
Copy link
Contributor Author

hostep commented Feb 11, 2021

@mbernabeu is probably talking about Magento 2.4.2, but this module isn't only used in Magento installations, it can be used in basically any php project using composer.

But indeed, having a composer v2 compatible version available for this module is the only thing which blocks us as well to move to composer v2 for our Magento projects. Even for older Magento versions.

Thanks for considering to help with this @allanpaiste! 🙂

@allanpaiste allanpaiste changed the base branch from release/3 to feature/support-composer-2 February 14, 2021 20:07
@allanpaiste allanpaiste marked this pull request as ready for review February 14, 2021 20:08
@allanpaiste allanpaiste changed the base branch from feature/support-composer-2 to feature/composer-v2-support February 14, 2021 20:13
@allanpaiste allanpaiste merged commit 064c9e7 into vaimo:feature/composer-v2-support Feb 14, 2021
@allanpaiste
Copy link
Contributor

allanpaiste commented Feb 15, 2021

Have now a fully functional version @ #67

Have to do some cleanup still, but tests pass, patches apply, fun.

I think we can get away without having to release new major as there actually weren't all that many changes that were needed other than what @hostep had already addressed :)

@hostep
Copy link
Contributor Author

hostep commented Feb 15, 2021

Awesome work @allanpaiste!

I agree with not needing a new major version if the plugin keeps working fine with composer v1.

Thanks so much! 🙂

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

Successfully merging this pull request may close these issues.

None yet

3 participants