mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #361] [CLOSED] [WIP] DDC-1852 - Validating lifecycle callbacks in tools #8081
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/361
Author: @Ocramius
Created: 6/4/2012
Status: ❌ Closed
Base:
master← Head:DDC-1852📝 Commits (8)
591e064Adding failing test for DDC-1852 functionality0cd962dImplementing DDC-1852 functionality so that validator now returns correct warnings7c922ecRemoving usage of @HasLifecycleCallbacks, allowing callbacks on protected methods for now403aae6Moving validation of classmetadata lifecycle callbacks from runtime to toolsa9922e4Adding @deprecated to the @HasLifecycleCallbacks annotation33f832fRemoving references to @HasLifecycleCallbacks as it is now unused90d7f61Documenting changesc7d0a99Removing useless in loop📊 Changes
17 files changed (+119 additions, -110 deletions)
View changed files
📝
UPGRADE_TO_2_3(+9 -1)📝
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(+0 -1)📝
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(+1 -18)📝
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php(+32 -35)📝
lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php(+1 -0)📝
lib/Doctrine/ORM/Mapping/MappingException.php(+1 -6)📝
lib/Doctrine/ORM/Tools/EntityGenerator.php(+3 -7)📝
lib/Doctrine/ORM/Tools/SchemaValidator.php(+16 -0)📝
tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php(+2 -3)📝
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php(+1 -5)📝
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php(+0 -1)📝
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php(+0 -1)📝
tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php(+7 -8)📝
tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php(+1 -5)📝
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php(+3 -16)📝
tests/Doctrine/Tests/ORM/Tools/Export/annotation/Doctrine.Tests.ORM.Tools.Export.User.php(+0 -1)📝
tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php(+42 -2)📄 Description
This feature simply adds validation for lifecycle callbacks.
This PR introduces some BC Breaks:
Doctrine\ORM\Mapping\ClassMetadataInfo#validateLifecycleCallbacks()has been droppedDoctrine\ORM\Mapping\HasLifecycleCallbackshas been deprecated as it is not checked anymore. This makes theAnnotationDriverslower at first run, but I think this is where caching solves the problem correctly🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.