Skip to content

Remove conflicts with symfony/* from composer.json files #59009

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

Closed

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Nov 27, 2024

Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

Inspired by #59008

We have no process to tidy up conflicts in composer.json files. Yet they can create issues like #58997, make solving deps more expensive and add maintenance burden.

Let's see if we can remove them all.

"symfony/property-info": "<6.4",
"symfony/security-bundle": "<6.4",
"symfony/security-core": "<6.4",
"symfony/validator": "<6.4"
Copy link
Member

Choose a reason for hiding this comment

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

Those conflicts are there to enforce the min requirement of our optional dependencies, matching the bound used in require-dev (which does not impact projects).
Removing this conflict means we must not bump our min version in require-dev anymore, because Composer would not have the info about an equivalent requirement bump when using the package (and so bumping our lowest bound becomes a breaking change instead of being handled by Composer)

Copy link
Member

Choose a reason for hiding this comment

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

to be actually safe, the conflict rule should actually have a second part, covering versions above the upper bound of the dev requirement.

Copy link
Member Author

Choose a reason for hiding this comment

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

conflicts are terrible
it's not because we don't test with older versions that they don't work
this leads to real issues like #58997
so we'd rather not use them

Copy link
Member Author

@nicolas-grekas nicolas-grekas Nov 27, 2024

Choose a reason for hiding this comment

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

We have a CI that runs tests cross-versions instead, so that even if not by require-dev, we do test outside these boundaries (as hinted in #58997 again)

@nicolas-grekas nicolas-grekas force-pushed the composer-conflicts-less branch from 9fa55af to 6ce8173 Compare November 27, 2024 09:57
@nicolas-grekas
Copy link
Member Author

CI is green. We now need to merge to confirm that older branches that rejected 7.3 are still green with 7.3.
Branch 7.2 is tested already in the deps=high job. Let's see for 6.4/5.4.

@derrabus
Copy link
Member

derrabus commented Nov 27, 2024

We might have bumped those conflict rules a little too eagerly in that past. But many of them actually do cover incompatibilities and I really don't feel comfortable with simply removing all of them.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Nov 27, 2024

I agree this is a bit bold, but many of those conflicts are things from the past that add constraints that don't make sense anymore.
We're at the start of 7.3 so we have time to see how this goes.

@OskarStark
Copy link
Contributor

I mean we see how this goes right now, do we?

I am for keeping them (checking them maybe and remove what is not needed, yes).

For the notifier bridges you can now install symfony/webhook 7.1, even if the conflict before say symfony/webhook 7.2 is required... I don't see how it helps the user to install the proper version 🤷‍♂️

@nicolas-grekas
Copy link
Member Author

Yet, removing the conflict is how we solved this issue.
It helps user of eg Serializer 5.4 use PropertyInfo v6.4, instead of being stucked with an unmaintained PropertyInfo v6.3 currently.

@OskarStark
Copy link
Contributor

I totally agree for removing this conflict, as it fixes a bug 👍

@chalasr
Copy link
Member

chalasr commented Nov 27, 2024

Removing code that's been added for a reason but doesn't cause any known issue is calling for trouble. I think it's been our mindset for long. Most of them have been been wisely added at some point.
Removing all conflicts comes with lots of unknowns for no mesurable benefit. So it is actually more likely to increase the maintenance burden rather than reducing it.
Happy to consider removing conflicts when it solves an actual issue.

@nicolas-grekas
Copy link
Member Author

We might need to build some script to cleanup those entries eventually.

@nicolas-grekas nicolas-grekas deleted the composer-conflicts-less branch January 5, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants