@@ -31,6 +31,8 @@ final class ORMSetup
31
31
/**
32
32
* Creates a configuration with an annotation metadata driver.
33
33
*
34
+ * @deprecated Use another mapping driver.
35
+ *
34
36
* @param string[] $paths
35
37
*/
36
38
public static function createAnnotationMetadataConfiguration (
@@ -39,6 +41,12 @@ public static function createAnnotationMetadataConfiguration(
39
41
?string $ proxyDir = null ,
40
42
?CacheItemPoolInterface $ cache = null
41
43
): Configuration {
44
+ Deprecation::trigger (
45
+ 'doctrine/orm ' ,
46
+ 'https://github.com/doctrine/orm/issues/10098 ' ,
47
+ '%s is deprecated and will be removed in Doctrine ORM 3.0 ' ,
48
+ __METHOD__
49
+ );
42
50
$ config = self ::createConfiguration ($ isDevMode , $ proxyDir , $ cache );
43
51
$ config ->setMetadataDriverImpl (self ::createDefaultAnnotationDriver ($ paths ));
44
52
@@ -48,12 +56,20 @@ public static function createAnnotationMetadataConfiguration(
48
56
/**
49
57
* Adds a new default annotation driver with a correctly configured annotation reader.
50
58
*
59
+ * @deprecated Use another mapping driver.
60
+ *
51
61
* @param string[] $paths
52
62
*/
53
63
public static function createDefaultAnnotationDriver (
54
64
array $ paths = [],
55
65
?CacheItemPoolInterface $ cache = null
56
66
): AnnotationDriver {
67
+ Deprecation::trigger (
68
+ 'doctrine/orm ' ,
69
+ 'https://github.com/doctrine/orm/issues/10098 ' ,
70
+ '%s is deprecated and will be removed in Doctrine ORM 3.0 ' ,
71
+ __METHOD__
72
+ );
57
73
if (! class_exists (AnnotationReader::class)) {
58
74
throw new LogicException (sprintf (
59
75
'The annotation metadata driver cannot be enabled because the "doctrine/annotations" library '
0 commit comments