Skip to content

Commit 1aed318

Browse files
committed
Restore logic exception
This exception was dropped by mistake during a merge-up, and should be present until Doctrine officially supports property hooks.
1 parent f8fdeaf commit 1aed318

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/Mapping/ClassMetadata.php

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
use function trait_exists;
5858
use function trim;
5959

60+
use const PHP_VERSION_ID;
61+
6062
/**
6163
* A <tt>ClassMetadata</tt> instance holds all the object-relational mapping metadata
6264
* of an entity and its associations.
@@ -2673,6 +2675,10 @@ private function getAccessibleProperty(ReflectionService $reflService, string $c
26732675
}
26742676
}
26752677

2678+
if (PHP_VERSION_ID >= 80400 && $reflectionProperty !== null && count($reflectionProperty->getHooks()) > 0) {
2679+
throw new LogicException('Doctrine ORM does not support property hooks in this version. Check https://github.com/doctrine/orm/issues/11624 for details of versions that support property hooks.');
2680+
}
2681+
26762682
return $reflectionProperty;
26772683
}
26782684
}

0 commit comments

Comments
 (0)