-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Hunt down invalid doc blocks #10476
Hunt down invalid doc blocks #10476
Conversation
🤔 there are some more occurrences of |
715eeec
to
3283adb
Compare
3283adb
to
00b0e25
Compare
ping @derrabus 🙂 |
@@ -922,6 +922,8 @@ private function cacheToArray(array $cacheMapping): array | |||
$usage = (int) constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); | |||
} | |||
|
|||
assert($usage !== '0' && $usage !== ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we be sure? I think we should either map all falsy values to null
or make sure falsy values other than null also trigger an InvalidArgumentException
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right, but let's maybe not do this in a patch release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a suddenly failing assert()
better in a patch release? 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provided assertions are not enabled in production, I'd say yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a doc block (as the title suggests) though, but in comparison it screams at dev runtime when something's wrong. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll remove that line and ignore whatever SA errors come up then.
00b0e25
to
bafd023
Compare
It is OK to ignore some of the errors we get, but not this one.
bafd023
to
271d399
Compare
It is OK to ignore some of the errors we get, but not this one.