-
-
Notifications
You must be signed in to change notification settings - Fork 213
Add reset() to PSR-6 DoctrineProvider #398
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
| return null; | ||
| } | ||
|
|
||
| public function reset() |
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.
We do not require an interface for this as the service_resetter of symfony doesn't require anything here: https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php
|
The failing tests seems to be unrelated to this pull request, as they fail in MemomizeCache tests. |
|
Please rebase. The CI should be green now. Also, can you please add a test that covers your change? |
afe7825 to
8d1907c
Compare
|
@derrabus Thx, rebased! |
|
I'd like to merge this. Can you please add tests? |
Co-authored-by: Alexander M. Turek <[email protected]>
|
@derrabus Test cases added. |
* 1.13.x: Add reset() to PSR-6 DoctrineProvider (#398)
|
Released as 1.13.0 and 2.2.0. |
|
@derrabus Thank you! |
When using a symfony application which run on swoole or roadrunner the services need to be resetted between the runs. Same for messenger:consume command services are resetted and require this call.
We did stumble else over problems with the caches and needed to add the
kernel.resettag to the doctrine caches: https://github.com/sulu/skeleton/pull/141/filesThe reset method was implemented here and also reseted the Namespace correctly:
https://github.com/symfony/cache/blob/4c6747cf7e56c6b8e3094dd24852bd3e364375b1/DoctrineProvider.php#L49-L55
This seems not to be added when moved the DoctrineProvider from Symfony/Cache to this repository: #366
Symfony itself added the reset in this pull request. symfony/symfony#24226. Maybe @nicolas-grekas can also gave insights about the get set Namespace here.