-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] deprecate doctrine schema subscribers in favor of listeners #49610
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
Merged
nicolas-grekas
merged 1 commit into
symfony:6.3
from
alli83:doctrine-schema-as-listeners
Mar 6, 2023
Merged
[DoctrineBridge] deprecate doctrine schema subscribers in favor of listeners #49610
nicolas-grekas
merged 1 commit into
symfony:6.3
from
alli83:doctrine-schema-as-listeners
Mar 6, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Nice, thanks :)
src/Symfony/Bridge/Doctrine/SchemaListener/DoctrineDbalCacheAdapterSchemaSubscriber.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/SchemaListener/DoctrineDbalCacheAdapterSchemaListener.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/SchemaListener/MessengerTransportDoctrineSchemaListener.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/SchemaListener/RememberMeTokenProviderDoctrineSchemaListener.php
Outdated
Show resolved
Hide resolved
...ymfony/Bridge/Doctrine/Tests/SchemaListener/DoctrineDbalCacheAdapterSchemaSubscriberTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/SchemaListener/MessengerTransportDoctrineSchemaSubscriber.php
Show resolved
Hide resolved
derrabus
reviewed
Mar 6, 2023
445e09c
to
b0400d5
Compare
b0400d5
to
787d569
Compare
nicolas-grekas
approved these changes
Mar 6, 2023
Thank you @alli83. |
fabpot
added a commit
that referenced
this pull request
Apr 8, 2023
…s to ContainerAwareEventManager (alli83) This PR was merged into the 6.3 branch. Discussion ---------- [DoctrineBridge] Deprecate passing doctrine subscribers to ContainerAwareEventManager | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | Fix #49586 | License | MIT | Doc PR | Following issue #49586, this PR aims to deprecate passing doctrine subscribers to ContainerAwareEventManager. As mentioned, "[#[AsDoctrineListener]]... is a way better alternative anyway." Following #49387 (comment), in PR #49610 DoctrineSchemaSubscribers have already been deprecated in favor of listeners. Commits ------- c08780e [DoctrineBridge] Deprecate passing Doctrine subscribers to ContainerAwareEventManager, use listeners instead
Merged
nicolas-grekas
added a commit
that referenced
this pull request
Jun 9, 2023
…nerAwareEventManager::getListeners()` deprecation (alexandre-daubois) This PR was merged into the 7.0 branch. Discussion ---------- [DoctrineBridge] Remove deprecated classes and `ContainerAwareEventManager::getListeners()` deprecation | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Removes deprecated code introduced in #49610 Commits ------- 746b123 [DoctrineBridge] Remove deprecated classes and `ContainerAwareEventManager::getListeners()` deprecation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As @nicolas-grekas explained in #49387 (comment) :
" Because PdoSessionHandlerSchemaSubscriber is registered as a subscriber, ContainerAwareEventManager must instantiate it to know which events should be listened for. This triggers the instantiation of the session.handler service, which is a NativeFileSessionHandler, and this notice when this is done after headers have been sent."
It was therefore decided to change all the doctrine schema subscribers in favor of listeners in order to avoid this kind of problem.
Being already present before Symfony 6.3,
MessengerTransportDoctrineSchemaSubscriber
,DoctrineDbalCacheAdapterSchemaSubscriber
andRememberMeTokenProviderDoctrineSchemaSubscriber
have been deprecated.TODO: