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

Add support for Composer 2 #104

Merged
merged 1 commit into from
Dec 18, 2020
Merged

Conversation

emodric
Copy link
Contributor

@emodric emodric commented Jun 16, 2020

No description provided.

@emodric emodric force-pushed the composer2 branch 2 times, most recently from 3f303a4 to 862ff1d Compare June 23, 2020 12:21
@emodric
Copy link
Contributor Author

emodric commented Jun 23, 2020

The plugin has issues with canonical repos it seems. It's a chicken/egg situation.

When the plugin adds the path repo to Composer 2, it treats it as a canonical repo, which means that usecases where a package with required version cannot be found in path (e.g. different versions - composer.json requires 1.2 for one of the packages, but symlinked version is in 1.3), the install will fail and will not fallback to fetching those packages from packagist.org. In Composer 1, it would simply install those packages in 1.2 from packagist.org, and the rest would be symlinked.

If we set the repo to be non-canonical, then it seems that the repo is simply ignored, since the valid version (be it e.g. 1.3.0, 1.3.0@dev, dev-1.3.x, dev-master) exists on packagist.org and the path repo will simply be ignored.

@keichinger
Copy link

@franzliedke is there any way that the community can help you out in getting this PR merged and released? :-)

@irazasyed
Copy link

Hey @franzliedke, could you spare a few min and please merge this PR? That would be appreciated :)

@roni-estein
Copy link

I've noticed this project is now marked abandoned in my setup. I have this as a dependency. Perhaps you can allow someone to take it over or someone who is willing can fork it if there is no response.

@franzliedke
Copy link
Owner

Hello folks. I'm happy about the interest in keeping this maintained.

Is anybody interested in pairing on this, e.g. on Friday?

@roni-estein Can you share where this is marked as abandoned? Or are you referring to the Composer CLI warning?

@apfelbox
Copy link
Collaborator

Yeah! 🎉

@franzliedke I would be willing help out with maintenance and development, if you need any help!

@arnehendriksen
Copy link

@franzliedke please merge this PR, it's the only thing keeping me (and probably others) from updating Composer to 2.0

@roni-estein
Copy link

Hello folks. I'm happy about the interest in keeping this maintained.

Is anybody interested in pairing on this, e.g. on Friday?

@roni-estein Can you share where this is marked as abandoned? Or are you referring to the Composer CLI warning?

Yes, it was the CLI warning, sorry I missed this earlier. I've started removing it from my projects I misunderstood the warning. I didn't realize composer would give that alert without the actual project being abandoned.

@sybbear
Copy link

sybbear commented Dec 3, 2020

This is an amazing package, we want this! :)
Composer 2 gets supported for this package, I am sending some support donation to the maintainer.
Support for support it is :)

@franzliedke franzliedke merged commit f7fff58 into franzliedke:master Dec 18, 2020
@franzliedke
Copy link
Owner

franzliedke commented Dec 18, 2020

@emodric Thanks very much - I will release a new version with this shortly. (Currently also doing some other cleanup, with the help of @apfelbox.)

Regarding the problem with canonical repositories you mentioned: it seems to boil down to a combination of a repository that's both present in a local path and on Packagist, and a mismatch between your version constraint and the local version, right? Please open a new issue with minimal reproduction steps! 🙏 I can't stop thinking that my experimental approach from this release is the way to go.

@Vikingmaster Feel free to support me via GitHub Sponsors or https://paypal.me/franzliedke. 😉

@sybbear
Copy link

sybbear commented Dec 18, 2020

Big thank you.
Support package sent :)

@franzliedke
Copy link
Owner

Relased in version 0.15.0. Please update and let me know if you encounter any problems.

@emodric
Copy link
Contributor Author

emodric commented Dec 18, 2020

Thanks @franzliedke for merging !

As for my issue with canonical repos, yes, it happens when there's a mismatch in versions specified in composer.json and versions checked out in local path repo. I will try to create a minimal reproducer 👍

Additionaly, even if the versions match, it seems that path repos are considered as dev packages, even if the last commit is properly tagged e.g., which means that if not using "minimum-stability": "dev", they cannot be installed.

Both of these cases worked on Composer 1.

@emodric
Copy link
Contributor Author

emodric commented Dec 18, 2020

@franzliedke Here are the two reproducers for two issues noted above:

#108

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.

8 participants