44
55namespace Doctrine \Bundle \DoctrineBundle \DependencyInjection \Compiler ;
66
7+ use Doctrine \Deprecations \Deprecation ;
78use Doctrine \ORM \Mapping \Driver \AnnotationDriver ;
89use Doctrine \ORM \Mapping \Driver \AttributeDriver ;
910use Doctrine \ORM \Mapping \Driver \XmlDriver ;
@@ -76,6 +77,8 @@ public static function createXmlMappingDriver(array $namespaces, array $managerP
7677 }
7778
7879 /**
80+ * @deprecated no replacement planned
81+ *
7982 * @param string[] $namespaces Hashmap of directory path to namespace
8083 * @param string[] $managerParameters List of parameters that could which object manager name
8184 * your bundle uses. This compiler pass will automatically
@@ -90,6 +93,12 @@ public static function createXmlMappingDriver(array $namespaces, array $managerP
9093 */
9194 public static function createYamlMappingDriver (array $ namespaces , array $ managerParameters = [], $ enabledParameter = false , array $ aliasMap = [])
9295 {
96+ Deprecation::trigger (
97+ 'doctrine/doctrine-bundle ' ,
98+ 'https://github.com/doctrine/DoctrineBundle/pull/2088 ' ,
99+ 'The "%s()" method is deprecated and will be removed in DoctrineBundle 3.0. ' ,
100+ __METHOD__ ,
101+ );
93102 $ locator = new Definition (SymfonyFileLocator::class, [$ namespaces , '.orm.yml ' ]);
94103 /* @phpstan-ignore class.notFound */
95104 $ driver = new Definition (YamlDriver::class, [$ locator ]);
@@ -119,6 +128,8 @@ public static function createPhpMappingDriver(array $namespaces, array $managerP
119128 }
120129
121130 /**
131+ * @deprecated no replacement planned
132+ *
122133 * @param string[] $namespaces List of namespaces that are handled with annotation mapping
123134 * @param string[] $directories List of directories to look for annotated classes
124135 * @param string[] $managerParameters List of parameters that could which object manager name
@@ -135,6 +146,13 @@ public static function createPhpMappingDriver(array $namespaces, array $managerP
135146 */
136147 public static function createAnnotationMappingDriver (array $ namespaces , array $ directories , array $ managerParameters = [], $ enabledParameter = false , array $ aliasMap = [], bool $ reportFieldsWhereDeclared = false )
137148 {
149+ Deprecation::trigger (
150+ 'doctrine/doctrine-bundle ' ,
151+ 'https://github.com/doctrine/DoctrineBundle/pull/2088 ' ,
152+ 'The "%s()" method is deprecated and will be removed in DoctrineBundle 3.0. ' ,
153+ __METHOD__ ,
154+ );
155+
138156 $ reader = new Reference ('annotation_reader ' );
139157 /* @phpstan-ignore class.notFound */
140158 $ driver = new Definition (AnnotationDriver::class, [$ reader , $ directories , $ reportFieldsWhereDeclared ]);
0 commit comments