File tree 3 files changed +25
-1
lines changed
lib/Doctrine/ORM/Mapping/Driver
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Upgrade to 2.14
2
2
3
+ ## Deprecated ` AttributeDriver::$entityAnnotationClasses `
4
+
5
+ If you need to change the behavior of ` AttributeDriver::isTransient() ` ,
6
+ override that method instead.
7
+
3
8
## Deprecated incomplete schema updates
4
9
5
10
Using ` orm:schema-tool:update ` without passing the ` --complete ` flag is
Original file line number Diff line number Diff line change @@ -31,7 +31,16 @@ class AttributeDriver extends CompatibilityAnnotationDriver
31
31
{
32
32
use ColocatedMappingDriver;
33
33
34
- /** @var array<class-string<MappingAttribute>, int> */
34
+ private const ENTITY_ATTRIBUTE_CLASSES = [
35
+ Mapping \Entity::class => 1 ,
36
+ Mapping \MappedSuperclass::class => 2 ,
37
+ ];
38
+
39
+ /**
40
+ * @deprecated override isTransient() instead of overriding it
41
+ *
42
+ * @var array<class-string<MappingAttribute>, int>
43
+ */
35
44
protected $ entityAnnotationClasses = [
36
45
Mapping \Entity::class => 1 ,
37
46
Mapping \MappedSuperclass::class => 2 ,
@@ -58,6 +67,15 @@ public function __construct(array $paths)
58
67
59
68
$ this ->reader = new AttributeReader ();
60
69
$ this ->addPaths ($ paths );
70
+
71
+ if ($ this ->entityAnnotationClasses !== self ::ENTITY_ATTRIBUTE_CLASSES ) {
72
+ Deprecation::trigger (
73
+ 'doctrine/orm ' ,
74
+ 'https://github.com/doctrine/orm/pull/10204 ' ,
75
+ 'Changing the value of %s::$entityAnnotationClasses is deprecated and will have no effect in Doctrine ORM 3.0. ' ,
76
+ self ::class
77
+ );
78
+ }
61
79
}
62
80
63
81
/**
Original file line number Diff line number Diff line change 92
92
<DeprecatedProperty >
93
93
<errorLevel type =" suppress" >
94
94
<referencedProperty name =" Doctrine\ORM\Cache\Region\DefaultRegion::$cache" />
95
+ <referencedProperty name =" Doctrine\ORM\Mapping\Driver\AttributeDriver::$entityAnnotationClasses" />
95
96
</errorLevel >
96
97
</DeprecatedProperty >
97
98
<DocblockTypeContradiction >
You can’t perform that action at this time.
0 commit comments