-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Respect debug mode when warm up annotations #26513
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
Conversation
*/ | ||
public function __construct(Reader $annotationReader, $phpArrayFile, CacheItemPoolInterface $fallbackPool, $excludeRegexp = null) | ||
public function __construct(Reader $annotationReader, $phpArrayFile, CacheItemPoolInterface $fallbackPool, $excludeRegexp = null, $debug) |
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.
You've added a non-optional argument, which should have broken tests. If there are none, can you add one to prevent future regressions? As this argument is non-optional, it would also be a BC break. Can you make this argument optional with a default value to mimic the previous behavior?
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.
All done.
Added test for cache warmer for both cases - debug and no debug
Made argument optional
Make new argument for AnnotationsCacheWarmer::__construct optional to prevent BC break Add tests
Extracted reader mock to method, made test compatible with old php-unit
Just pushed fix for old phpunit, but seems it was useless as changes already aproved (travis ran on old code) |
Still fails on PHP 5.5, missing "getMock()" |
tests compatibility with php 5.5
That's all, travis is happy now. |
Thank you @Strate. |
…ons (Strate) This PR was squashed before being merged into the 3.4 branch (closes #26513). Discussion ---------- [FrameworkBundle] Respect debug mode when warm up annotations | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Propagate current debug mode to the annotations reader. Without thi, warmup is useless with debug mode, because timetsamps are not written to cache. Commits ------- f3ec396 [FrameworkBundle] Respect debug mode when warm up annotations
Propagate current debug mode to the annotations reader. Without thi, warmup is useless with debug mode, because timetsamps are not written to cache.