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

Catch filemtime warning thrown as ErrorException #45740

Closed

Conversation

maxime-aknin
Copy link
Contributor

In Doctrine\Common\Annotations\PsrCachedReader::getLastModification when ReflectionClass->getFileName() returns a filename containing eval()'d, the call to filemtime l.198 emits a warning which is thrown as an Error Exception in Symfony by default and kills the cache warming process.

I found out there is an ongoing PR to address this issue directly in doctrine/annotations so once it's merged I guess this one will no longer be needed, just putting it here as a temporary fallback solution.

Q A
Branch? 6.1 for features / 4.4, 5.4 or 6.0 for bug fixes
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #...
License MIT

When ReflectionClass->getFileName() returns a filename with eval()'d in it, filemtime emits a warning which is thrown as an Error Exception in Symfony by default.

- Related to this issue in doctrineannotations: doctrine/annotations#186
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this issue. Indeed we cannot hide such large range of exceptions.

@nicolas-grekas
Copy link
Member

Thanks for the PR. I'm closing because the right fix is doctrine/annotations#436.

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.

None yet

4 participants