Skip to content

[Console] Runtime conflict for psr/log >= 3.0 instead of composer conflict #43884

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

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Nov 2, 2021

Q A
Branch? 5.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

ConsoleLogger is not compatible with psr/log >= 3.0 but it's an optional feature and psr/log is an optional dependency in the Console component. Yet, having a real "composer conflict", prevents symfony/console from being updated above the 5.3.2 version if a previous dependency has already installed psr/log 3.0. But I'd rather have an updated symfony/console version and psr/log 2.0 since the psr/log changes are just about types.

@fancyweb fancyweb force-pushed the console/remove-psr-log-conflict branch from c0b3a60 to 7af9ba0 Compare November 2, 2021 11:20
@stof
Copy link
Member

stof commented Nov 2, 2021

Well, to me, letting the solver know about the conflict is better than forcing the user to manage dependencies manually.

Cases where the latest versions of packages are incompatible together need to be resolved by the user anyway to choose which requirement they want to relax, but that's only happening properly if the solver knows about the incompatibility.
And composer why-not symfony/console 5.3.7 will tell you why you don't get the 5.3.7 version for instance.

Copy link
Member

@derrabus derrabus left a comment

Choose a reason for hiding this comment

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

I think, no matter how we deal with this issue, there will be a group of people dissatisfied with our solution. Currently, we have a well documented incompatibility that should be easy to resolve. Moving this to a runtime check feels like we're doing the job Composer should've done.

I'm not convinced we should make this change.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Nov 2, 2021

Shouldn't we have a mix here? This exception in 5.3 and the conflict in 5.4?
Since 5.3.2 is already tagged without the conflict, the harm is already done for 5.3.

What about moving the check to the constructor though?

@derrabus
Copy link
Member

derrabus commented Nov 2, 2021

Since 5.3.2 is already tagged without the conflict, the harm is already done for 5.3.

Good point. If we restore the conflict in 5.4, I'm 👍

What about moving the check to the constructor though?

That wouldn't work because the class definition itself raises a fatal error, doesn't it?

@fabpot
Copy link
Member

fabpot commented Nov 3, 2021

Thank you @fancyweb.

@fabpot fabpot merged commit b1f290a into symfony:5.3 Nov 3, 2021
@fancyweb fancyweb deleted the console/remove-psr-log-conflict branch November 3, 2021 07:59
nicolas-grekas added a commit that referenced this pull request Nov 3, 2021
This PR was merged into the 5.4 branch.

Discussion
----------

[Console] Restore psr/log >= 3.0 conflict

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | #43884 (comment)
| License       | MIT
| Doc PR        | -

Commits
-------

5c65796 [Console] Restore psr/log >= 3.0 conflict
@fabpot fabpot mentioned this pull request Nov 22, 2021
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