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

Add option: resettable #10

Merged
merged 4 commits into from
Aug 12, 2021
Merged

Add option: resettable #10

merged 4 commits into from
Aug 12, 2021

Conversation

Jean85
Copy link
Member

@Jean85 Jean85 commented Aug 5, 2021

While upgrading to Symfony 5.3, I encountered a strange bug regarding this transport, which started being empty all of a sudden.

Reason behind it was that this transport implents the ResetInterface, which is invoked when the shutdown of the kernel is enforced during tests or when starting a KernelBrowser. This flushed the whole transport, which was undesired.

This PR add a parent to the transport that still has the method, but doesn't implement the interface, to avoid forced calls to that method. It also adds a resettable option that defaults to true so that this behavior is customizable, but there's no BC.

Possible future scope: reverse the default in a new major version, change the parent into a child to have better naming (MongoDbResettableTransport).

@Jean85 Jean85 added bug Something isn't working enhancement New feature or request labels Aug 5, 2021
@Jean85 Jean85 self-assigned this Aug 5, 2021
@Jean85 Jean85 merged commit be6837f into 1.x Aug 12, 2021
@Jean85 Jean85 deleted the add-resettable-option branch August 12, 2021 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants