mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1085] [CLOSED] Orphan removal does not work nicely with preRemove listeners
#9137
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/1085
Author: @raziel057
Created: 7/22/2014
Status: ❌ Closed
Base:
old-prototype-3.x← Head:orphan-removal📝 Commits (7)
e0365f0Failing Test - Cascade Remove with orphanRemoval62fbf49Success Test - cascade remove without orphanRemoval8af6144Update DDC0000Test.php57783fcUpdate DDC0000Test.phpf0961d7Update DDC0000Test.phpbc73ebcUpdate DDC0000Test.phpb19fbbcUpdate DDC0001Test.php📊 Changes
2 files changed (+258 additions, -0 deletions)
View changed files
➕
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC0000Test.php(+129 -0)➕
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC0001Test.php(+129 -0)📄 Description
Hi,
I created 2 tests to show that we encounter a problem when using orphanRemoval (see
e0365f0d18).-> The ActionLog is created with no value in the "action" column.
That's not the case when removing manually (see
62fbf49654).-> The ActionLog is created with value "remove" in the "action" column.
I think the behavior must be the same in the 2 Tests.
For information, I discovered the problem when using https://github.com/KnpLabs/DoctrineBehaviors/blob/master/src/Knp/DoctrineBehaviors/ORM/Loggable/LoggableListener.php with a custom callable DB logger.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.