Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Psalm errors #49000

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 0 commits into from
Jan 23, 2023
Merged

Fix Psalm errors #49000

merged 0 commits into from
Jan 23, 2023

Conversation

danepowell
Copy link
Contributor

@danepowell danepowell commented Jan 16, 2023

Q A
Branch? 6.3
Bug fix? Not sure what you call a CI fix 🤷
New feature? no
Deprecations? no
License MIT

Psalm runs frequently fail, such as #48981

@carsonbot carsonbot added this to the 6.3 milestone Jan 16, 2023
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.

Do we need to backport this change to 5.4?

@danepowell
Copy link
Contributor Author

The Symfony 5.4 version of MigratingSessionHandler does not use intersection types, so it does not suffer from this problem. No backport needed unless you run CI on a branch other than 5.4 or 6.3.

@stof
Copy link
Member

stof commented Jan 17, 2023

Given that Psalm v5 has support for intersection type, it would be better to migrate to psalm v5 in our CI.

@danepowell
Copy link
Contributor Author

Given that Psalm v5 has support for intersection type, it would be better to migrate to psalm v5 in our CI

We're already using Psalm v5, what makes you think that we aren't? See the @see link, I'm pretty sure this is an upstream bug in Psalm, not a general lack of support for intersection types.

@wouterj
Copy link
Member

wouterj commented Jan 17, 2023

Psalm does support intersection types, so this patch seems too generic to me. https://psalm.dev/r/1daf678918

The referenced bug talks about using build-in types in intersection types, which seems to be broken: https://psalm.dev/r/bea279b49e

@stof
Copy link
Member

stof commented Jan 17, 2023

what makes you think that we aren't?

What made me think that we aren't is the comment in the code saying "remove this when Psalm implements intersection types", while Psalm v5 has implemented them.

@danepowell
Copy link
Contributor Author

Ah I see what you mean, I'll update the comment to indicate that this is a Psalm bug and not a lack of support.

@danepowell
Copy link
Contributor Author

@wouterj are you saying you want to see a new Psalm bug opened?

@danepowell
Copy link
Contributor Author

Let me know what you want on this, it would really help contributors (and maintainers, I imagine!) to have all tests passing.

@wouterj
Copy link
Member

wouterj commented Jan 21, 2023

Sorry, I misread the changes (I thought it was doing a global find&replace instead of a local one in the file). Let's go 👍

(the Psalm bug you referenced is good enough, the maintainers are already on the case it seems and it is about the same issue)

@fabpot
Copy link
Member

fabpot commented Jan 23, 2023

Thank you @danepowell.

@fabpot fabpot closed this Jan 23, 2023
@fabpot fabpot merged commit 395eb9a into symfony:6.3 Jan 23, 2023
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.

7 participants