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 support for Doctrine generated fields #379

Merged
merged 2 commits into from Oct 17, 2022

Conversation

curry684
Copy link
Contributor

Closes #378

@curry684
Copy link
Contributor Author

The phpstan error is really interesting as it's comparing this constant:

    public const GENERATED_NEVER = 0;

To this field:

  'generated' =>
  int(2)

So the strict comparison is valid. Would appear to be a typing issue in Doctrine itself.

@ondrejmirtes
Copy link
Member

I fixed the local stub + sent PR to Doctrine: doctrine/orm#10144

@ondrejmirtes
Copy link
Member

Thank you!

@ondrejmirtes ondrejmirtes merged commit dde63ed into phpstan:1.3.x Oct 17, 2022
@curry684 curry684 deleted the issue-378 branch October 17, 2022 12:26
@curry684
Copy link
Contributor Author

Mmm this broke a lot of stuff, you may want to pull that auto release. Apparently the field mapping in Doctrine can be empty in more cases than triggered by the tests.

@ondrejmirtes
Copy link
Member

Mmm this broke a lot of stuff

This isn't useful feedback. Please open an issue and describe what problems do you have.

@curry684
Copy link
Contributor Author

See #380, weird that tests didn't pick this up, I got 25 internal errors on a local project right after updating.

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.

Generated fields not correctly treated as written by Doctrine
2 participants