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

Allow Doctrine Event manager v2 #541

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"doctrine/collections": "^1.6",
"doctrine/common": "^3.1",
"doctrine/dbal": "^2.13 || ^3.0",
"doctrine/event-manager": "^1.1",
"doctrine/event-manager": "^1.2 || ^2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1.1 to 1.2 bump is needed in order to be able to have code that is compatible with both v1 and v2 at the same time (the getAllListeners method call to be more specific).

"doctrine/orm": "^2.10",
"doctrine/persistence": "^2.2 || ^3.0",
"psr/clock": "^1.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected function getEntityManager(): EntityManager

// get rid of more global state
$evm = $connection->getEventManager();
foreach ($evm->getListeners() as $event => $listeners) {
foreach ($evm->getAllListeners() as $event => $listeners) {
foreach ($listeners as $listener) {
$evm->removeEventListener([$event], $listener);
}
Expand Down