Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer #20959

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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add a short comment to explain why AnnotationException are ignored
  • Loading branch information
fancyweb committed Dec 20, 2016
commit 7cf56c43fcbe860ac51a118af99ffd1baed59471
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ public function warmUp($cacheDir)
} catch (\ReflectionException $e) {
// ignore failing reflection
} catch (AnnotationException $e) {

/*
* Ignore any AnnotationException to not break the cache warming process if an Annotation is badly
* configured or could not be found / read / etc.
*
* In particular cases, an Annotation in your code can be used and defined only for a specific
* environment but is always added to the annotations.map file by some Symfony default behaviors,
* and you always end up with a not found Annotation.
*
* cf https://github.com/symfony/symfony/pull/20959 for a longer explanation.
Copy link
Member

Choose a reason for hiding this comment

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

this should be removed, we don't add links to github: the git history (git blame) should have everything instead (which it has)

*/
}
}
} finally {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.