File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
lib/Doctrine/ORM/Mapping/Driver Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 11# Upgrade to 2.11
22
3+ ## Deprecated: ` Doctrine\ORM\Mapping\Driver\PHPDriver `
4+
5+ Use ` StaticPHPDriver ` instead when you want to programmatically configure
6+ entity metadata.
7+
8+ You can convert mappings with the ` orm:convert-mapping ` command or more simply
9+ in this case, ` include ` the metadata file from the ` loadMetadata ` static method
10+ used by the ` StaticPHPDriver ` .
11+
312## Deprecated: ` Setup::registerAutoloadDirectory() `
413
514Use Composer's autoloader instead.
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ the code in PHP files or inside of a static function named
99PHP Files
1010---------
1111
12+ .. note ::
13+
14+ PHPDriver is deprecated and will be removed in 3.0, use StaticPHPDriver
15+ instead.
16+
1217If you wish to write your mapping information inside PHP files that
1318are named after the entity and included to populate the metadata
1419for an entity you can do so by using the ``PHPDriver ``:
Original file line number Diff line number Diff line change 44
55namespace Doctrine \ORM \Mapping \Driver ;
66
7+ use Doctrine \Deprecations \Deprecation ;
8+ use Doctrine \Persistence \Mapping \Driver \FileLocator ;
79use Doctrine \Persistence \Mapping \Driver \PHPDriver as CommonPHPDriver ;
810
911/**
1012 * {@inheritDoc}
1113 *
12- * @deprecated this driver will be removed. Use Doctrine\Persistence\Mapping\Driver\PHPDriver instead
14+ * @deprecated this driver will be removed, use StaticPHPDriver or other mapping drivers instead.
1315 */
1416class PHPDriver extends CommonPHPDriver
1517{
18+ /**
19+ * @param string|string[]|FileLocator $locator
20+ */
21+ public function __construct ($ locator )
22+ {
23+ Deprecation::trigger (
24+ 'doctrine/orm ' ,
25+ 'https://github.com/doctrine/orm/issues/9277 ' ,
26+ 'PHPDriver is deprecated, use StaticPHPDriver or other mapping drivers instead. '
27+ );
28+
29+ parent ::__construct ($ locator );
30+ }
1631}
You can’t perform that action at this time.
0 commit comments