8000 [FrameworkBundle] Respect debug mode when warm up annotations by Strate · Pull Request #26513 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed

Conversation

Strate
Copy link
Contributor
@Strate Strate commented Mar 13, 2018
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.

*/
public function __construct(Reader $annotationReader, $phpArrayFile, CacheItemPoolInterface $fallbackPool, $excludeRegexp = null)
public function __construct(Reader $annotationReader, $phpArrayFile, CacheItemPoolInterface $fallbackPool, $excludeRegexp = null, $debug)
Copy link
Contributor

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?

Copy link
Contributor Author

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

Strate added 2 commits March 15, 2018 15:07
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
@Strate
Copy link
Contributor Author
Strate commented Mar 16, 2018

Just pushed fix for old phpunit, but seems it was useless as changes already aproved (travis ran on old code)

@nicolas-grekas
Copy link
Member

Still fails on PHP 5.5, missing "getMock()"

@Strate
Copy link
Contributor Author
Strate commented Mar 16, 2018

That's all, travis is happy now.

@fabpot
Copy link
Member
fabpot commented Mar 19, 2018

Thank you @Strate.

fabpot added a commit that referenced this pull request Mar 19, 2018
…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
@fabpot fabpot closed this Mar 19, 2018
This was referenced Apr 3, 2018
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.

5 participants
0