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

Remove "conflict" section from composer.json #347

Closed
wants to merge 1 commit into from

Conversation

nicolas-grekas
Copy link

This line is not required because the conflicting package is already in the "require" section.

Moreover, this line creates issue #346

In practice, this line makes this package conflict with jean85/pretty-package-versions v1.3.*, which means it's not possible to generate a composer.lock file that is compatible with both composer 1 and composer 2.

💣 💥

@nicolas-grekas
Copy link
Author

nicolas-grekas commented Jun 18, 2020

Oh, note that this targets master which is aliased to v4, but the patch should be released as v3.5.2 really.

Thanks!

Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that that line causes #346.

ocramius/package-versions 1.3 requires PHP 7.1 and composer-plugin-api ^1.0.0, while the only difference with ocramius/package-versions 1.0.0 is that PHP 7.0 is allowed.

But 7.0 is not allowed at all by this bundle.

Also, that was introduced in 6c3f323, which says in the comment:

Add conflict rule to avoid installing dep without Versions::ROOT_PACKAGE_NAME

So, if this really causes #346, we would need to find a workaround to that before merging this.

So overall, 👎 for this as it is, sorry.

@nicolas-grekas
Copy link
Author

nicolas-grekas commented Jun 18, 2020

See also composer/package-versions-deprecated#3

This line effectively prevents using version jean85/pretty-package-versions 1.3 with sentry-symfony v3.5.

I don't get how you can be against the change, the deps are just broken right now.

@nicolas-grekas
Copy link
Author

Since 6c3f323, you've added ocramius/package-versions in the require section, which makes the conflict line a duplicate as far as declarations are concerned. Unless you want to explicitly forbid installing composer/package-versions-deprecated, this line has to be removed.

@Jean85
Copy link
Collaborator

Jean85 commented Jun 19, 2020

I don't get how you can be against the change, the deps are just broken right now.

They are not, it's a combination of Composer inconsistency + composer/package-versions-deprecated#3

$ composer why-not jean85/pretty-package-versions:1.3 
There is no installed package depending on "jean85/pretty-package-versions" in versions not matching 1.3

But I understand what you want to fix. As I said before, the only roadblock for this change is the direct usage of the root package constant from Ocramius' package. I would need to add some kind of getter in my package to mask the differences between Ocramius', Composer's fork and Composer 2 behavior, which I already had in mind (see Jean85/pretty-package-versions#19).

@nicolas-grekas
Copy link
Author

nicolas-grekas commented Jun 19, 2020

Let me put it another way:

{
    "require": {
        "sentry/sentry-symfony": "^3.5",
        "jean85/pretty-package-versions": "~1.3.0"
    }
}

This composer.json is not installable, although it's the only potential way to generate a composer.lock file that works on Composer 1&2 while using sentry-symfony 3.5.

This is just plain broken, I hope you get it better now.

@nicolas-grekas
Copy link
Author

This
image

means the conflict is a leftover, with a nasty side-effect I just described.

@Jean85
Copy link
Collaborator

Jean85 commented Jun 19, 2020

The problem at hand seems to have been fixed in composer/package-versions-deprecated#3 with the 1.8.1 release.

As for moving forward, I think I'll leverage Jean85/pretty-package-versions#22 + Jean85/pretty-package-versions#19 to bump to jean85/pretty-package-versions": "^1.5 || ^2.0", remove the conflict as suggested by this PR, and be fine with it.

@Jean85
Copy link
Collaborator

Jean85 commented Jun 19, 2020

Closing in favor of tracking the issue in #349

@Jean85 Jean85 closed this Jun 19, 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

Successfully merging this pull request may close these issues.

None yet

2 participants