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 stubs for Symfony 7 #352

Merged
merged 2 commits into from
Jun 22, 2024
Merged

Add stubs for Symfony 7 #352

merged 2 commits into from
Jun 22, 2024

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Jun 20, 2024

Currently there are no stubs for Symfony v7, closes #347.

I'm not exactly sure what needs to be done here, or if anything needs to be done at all. I've split the PR into two commits. In the first commit, I copied the stubs from v7. In the second, I synced the code with what is in Symfony. I'm not sure if this is actually necessary. I also checked if there have been any updates to the docblocks for these functions, but as far as I could tell, nothing has changed.

@seferov
Copy link
Member

seferov commented Jun 22, 2024

Currently there are no stubs for Symfony v7

This is not completely true. There are no Symfony 7 specific stubs; common stubs are applied for all versions including Symfony 7.

I'm not exactly sure what needs to be done here, or if anything needs to be done at all. I've split the PR into two commits. In the first commit, I copied the stubs from v7. In the second, I synced the code with what is in Symfony. I'm not sure if this is actually necessary. I also checked if there have been any updates to the docblocks for these functions, but as far as I could tell, nothing has changed.

LGTM

Copy link
Member

@seferov seferov left a comment

Choose a reason for hiding this comment

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

@HypeMC thank you!

@seferov seferov merged commit 353c9b0 into psalm:5.x Jun 22, 2024
9 checks passed
@HypeMC HypeMC deleted the symfony-7-stubs branch June 22, 2024 14:49
* @template TType of string|class-string<TObject>
*
* @psalm-param TType $type
* @psalm-return (TType is class-string<TObject> ? TObject : mixed)
Copy link

Choose a reason for hiding this comment

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

I believe it should be ok to return null as well, WDYT?

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.

Symfony 6 stubs are not enabled on Symfony 7
3 participants