File tree 3 files changed +23
-2
lines changed
lib/Doctrine/ORM/Mapping/Driver
3 files changed +23
-2
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,12 +31,18 @@ class AttributeDriver extends CompatibilityAnnotationDriver
31
31
{
32
32
use ColocatedMappingDriver;
33
33
34
- /** @var array<class-string<MappingAttribute>, int> */
35
- protected $ entityAnnotationClasses = [
34
+ private const ENTITY_ATTRIBUTE_CLASSES = [
36
35
Mapping \Entity::class => 1 ,
37
36
Mapping \MappedSuperclass::class => 2 ,
38
37
];
39
38
39
+ /**
40
+ * @deprecated override isTransient() instead of overriding this property
41
+ *
42
+ * @var array<class-string<MappingAttribute>, int>
43
+ */
44
+ protected $ entityAnnotationClasses = self ::ENTITY_ATTRIBUTE_CLASSES ;
45
+
40
46
/**
41
47
* The attribute reader.
42
48
*
@@ -58,6 +64,15 @@ public function __construct(array $paths)
58
64
59
65
$ this ->reader = new AttributeReader ();
60
66
$ this ->addPaths ($ paths );
67
+
68
+ if ($ this ->entityAnnotationClasses !== self ::ENTITY_ATTRIBUTE_CLASSES ) {
69
+ Deprecation::trigger (
70
+ 'doctrine/orm ' ,
71
+ 'https://github.com/doctrine/orm/pull/10204 ' ,
72
+ 'Changing the value of %s::$entityAnnotationClasses is deprecated and will have no effect in Doctrine ORM 3.0. ' ,
73
+ self ::class
74
+ );
75
+ }
61
76
}
62
77
63
78
/**
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