diff --git a/UPGRADE.md b/UPGRADE.md index 9794f968312..c6c6eaaa016 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -40,7 +40,7 @@ Whole Doctrine\ORM\Tools\Export namespace with all its members have been depreca ## Deprecated `Doctrine\ORM\Proxy\Proxy` marker interface -Proxy objects in Doctrine 3.0 will no longer implement `Doctrine\ORM\Proxy\Proxy` nor +Proxy objects in Doctrine ORM 3.0 will no longer implement `Doctrine\ORM\Proxy\Proxy` nor `Doctrine\Common\Persistence\Proxy`: instead, they implement `ProxyManager\Proxy\GhostObjectInterface`. @@ -57,7 +57,7 @@ These methods have been deprecated: ## Deprecated `Doctrine\ORM\Version` -The `Doctrine\ORM\Version` class is now deprecated and will be removed in Doctrine 3.0: +The `Doctrine\ORM\Version` class is now deprecated and will be removed in Doctrine ORM 3.0: please refrain from checking the ORM version at runtime or use [ocramius/package-versions](https://github.com/Ocramius/PackageVersions/). @@ -87,7 +87,7 @@ restful operations, you should look at alternatives such as [JMSSerializer](http ## Extending `EntityManager` is deprecated -Final keyword will be added to the `EntityManager::class` in Doctrine 3.0 in order to ensure that EntityManager +Final keyword will be added to the `EntityManager::class` in Doctrine ORM 3.0 in order to ensure that EntityManager is not used as valid extension point. Valid extension point should be EntityManagerInterface. ## Deprecated `EntityManager#clear($entityName)` diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 6f582959141..0752f0e897e 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -358,7 +358,7 @@ public function flush($entity = null) { if ($entity !== null) { @trigger_error( - 'Calling ' . __METHOD__ . '() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine 3.0.', + 'Calling ' . __METHOD__ . '() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine ORM 3.0.', E_USER_DEPRECATED ); } @@ -558,7 +558,7 @@ public function clear($entityName = null) if ($entityName !== null) { @trigger_error( - 'Calling ' . __METHOD__ . '() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine 3.0.', + 'Calling ' . __METHOD__ . '() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine ORM 3.0.', E_USER_DEPRECATED ); } @@ -670,7 +670,7 @@ public function refresh($entity) */ public function detach($entity) { - @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED); + @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); if ( ! is_object($entity)) { throw ORMInvalidArgumentException::invalidObject('EntityManager#detach()', $entity); @@ -695,7 +695,7 @@ public function detach($entity) */ public function merge($entity) { - @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED); + @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); if ( ! is_object($entity)) { throw ORMInvalidArgumentException::invalidObject('EntityManager#merge()', $entity); @@ -711,7 +711,7 @@ public function merge($entity) */ public function copy($entity, $deep = false) { - @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED); + @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); throw new \BadMethodCallException("Not implemented."); } diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index 723c7b15c15..05339ec4f69 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -48,7 +48,7 @@ class YamlDriver extends FileDriver public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) { @trigger_error( - 'YAML mapping driver is deprecated and will be removed in Doctrine 3.0, please migrate to annotation or XML driver.', + 'YAML mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to annotation or XML driver.', E_USER_DEPRECATED ); diff --git a/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php b/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php index f4b77b97faf..177b390f4fe 100644 --- a/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php +++ b/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php @@ -62,7 +62,7 @@ public function __construct($case = CASE_LOWER, bool $numberAware = false) { if (! $numberAware) { @trigger_error( - 'Creating ' . self::class . ' without making it number aware is deprecated and will be removed in Doctrine 3.0.', + 'Creating ' . self::class . ' without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED ); } diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php index 4f316aca432..90de7322ad4 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php @@ -120,7 +120,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { $ui = new SymfonyStyle($input, $output); - $ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine 3.0.'); + $ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine ORM 3.0.'); // Process source directories $fromPaths = array_merge([$input->getArgument('from-path')], $input->getOption('from')); diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php index 0d3a8daadcd..f1bba22d2c9 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php @@ -89,7 +89,7 @@ class is supposed to extend which. You have to adjust the entity protected function execute(InputInterface $input, OutputInterface $output) { $ui = new SymfonyStyle($input, $output); - $ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine 3.0.'); + $ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine ORM 3.0.'); $em = $this->getHelper('em')->getEntityManager(); diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php index 82b7da6b46f..379c93597f6 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php @@ -61,7 +61,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { $ui = new SymfonyStyle($input, $output); - $ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine 3.0.'); + $ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine ORM 3.0.'); $em = $this->getHelper('em')->getEntityManager(); diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 0accfaeaecf..5c304dbcb14 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -23,6 +23,7 @@ use Doctrine\Common\Inflector\Inflector; use Doctrine\DBAL\Types\Type; use Doctrine\ORM\Mapping\ClassMetadataInfo; +use const E_USER_DEPRECATED; use function str_replace; use function trigger_error; @@ -338,7 +339,7 @@ public function __construct() */ public function __construct() { - @trigger_error(self::class . ' is deprecated and will be removed in Doctrine 3.0', E_USER_DEPRECATED); + @trigger_error(self::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) { $this->annotationsPrefix = 'ORM\\'; diff --git a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php index 07c7aaca0c9..9b3b290ac7f 100644 --- a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php @@ -20,6 +20,7 @@ namespace Doctrine\ORM\Tools; use Doctrine\ORM\EntityRepository; +use const E_USER_DEPRECATED; use function trigger_error; /** @@ -57,7 +58,7 @@ class extends public function __construct() { - @trigger_error(self::class . ' is deprecated and will be removed in Doctrine 3.0', E_USER_DEPRECATED); + @trigger_error(self::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); } /** diff --git a/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php b/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php index bf0bbada769..15c03b5c5af 100644 --- a/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php @@ -19,6 +19,7 @@ namespace Doctrine\ORM\Tools\Export; +use const E_USER_DEPRECATED; use function trigger_error; /** @@ -46,7 +47,7 @@ class ClassMetadataExporter public function __construct() { - @trigger_error(self::class . ' is deprecated and will be removed in Doctrine 3.0', E_USER_DEPRECATED); + @trigger_error(self::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); } /** diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php index 02cef5238bd..efe8e7bcdc9 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php @@ -21,6 +21,7 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo; use Doctrine\ORM\Tools\Export\ExportException; +use const E_USER_DEPRECATED; use function trigger_error; /** @@ -60,7 +61,7 @@ abstract class AbstractExporter */ public function __construct($dir = null) { - @trigger_error(static::class . ' is deprecated and will be removed in Doctrine 3.0', E_USER_DEPRECATED); + @trigger_error(static::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); $this->_outputDir = $dir; } diff --git a/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php b/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php index 5d7782c1a30..589dc7fd7e0 100644 --- a/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php +++ b/tests/Doctrine/Tests/Mapping/UnderscoreNamingStrategyTest.php @@ -16,7 +16,7 @@ final class UnderscoreNamingStrategyTest extends TestCase /** @test */ public function checkDeprecationMessage() : void { - $this->expectDeprecationMessage('Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine 3.0.'); + $this->expectDeprecationMessage('Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.'); new UnderscoreNamingStrategy(CASE_LOWER, false); } } diff --git a/tests/Doctrine/Tests/ORM/EntityManagerTest.php b/tests/Doctrine/Tests/ORM/EntityManagerTest.php index 8531018a1ea..3eaf47d9f5f 100644 --- a/tests/Doctrine/Tests/ORM/EntityManagerTest.php +++ b/tests/Doctrine/Tests/ORM/EntityManagerTest.php @@ -314,7 +314,7 @@ public function testDeprecatedClearWithArguments() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Calling Doctrine\ORM\EntityManager::clear() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine 3.0.'); + $this->expectDeprecationMessage('Calling Doctrine\ORM\EntityManager::clear() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine ORM 3.0.'); $this->_em->clear(Country::class); } @@ -323,7 +323,7 @@ public function testDeprecatedFlushWithArguments() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Calling Doctrine\ORM\EntityManager::flush() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine 3.0.'); + $this->expectDeprecationMessage('Calling Doctrine\ORM\EntityManager::flush() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine ORM 3.0.'); $this->_em->flush($entity); } @@ -332,7 +332,7 @@ public function testDeprecatedMerge() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::merge() is deprecated and will be removed in Doctrine 3.0.'); + $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::merge() is deprecated and will be removed in Doctrine ORM 3.0.'); $this->_em->merge($entity); } @@ -341,7 +341,7 @@ public function testDeprecatedDetach() : void $entity = new Country(456, 'United Kingdom'); $this->_em->persist($entity); - $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::detach() is deprecated and will be removed in Doctrine 3.0.'); + $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::detach() is deprecated and will be removed in Doctrine ORM 3.0.'); $this->_em->detach($entity); } @@ -351,7 +351,7 @@ public function testDeprecatedCopy() : void $this->_em->persist($entity); try { - $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::copy() is deprecated and will be removed in Doctrine 3.0.'); + $this->expectDeprecationMessage('Method Doctrine\ORM\EntityManager::copy() is deprecated and will be removed in Doctrine ORM 3.0.'); $this->_em->copy($entity); } catch (\BadMethodCallException $e) { // do nothing diff --git a/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php index d74677fc7d7..f167132f6bc 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/Symfony/YamlDriverTest.php @@ -20,7 +20,7 @@ protected function getFileExtension() protected function getDriver(array $paths = []) { $driver = new SimplifiedYamlDriver(array_flip($paths)); - $this->expectDeprecationMessage('YAML mapping driver is deprecated and will be removed in Doctrine 3.0, please migrate to annotation or XML driver.'); + $this->expectDeprecationMessage('YAML mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to annotation or XML driver.'); return $driver; } diff --git a/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php index d34460d268d..7781b1622f7 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php @@ -86,7 +86,7 @@ public function testSpacesShouldBeIgnoredWhenUseExplode() public function testDeprecation() : void { $this->createClassMetadata(DDC2069Entity::class); - $this->expectDeprecationMessage('YAML mapping driver is deprecated and will be removed in Doctrine 3.0, please migrate to annotation or XML driver.'); + $this->expectDeprecationMessage('YAML mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to annotation or XML driver.'); } } diff --git a/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php b/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php index cd05da25ec6..c155b9aa7e3 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php @@ -172,7 +172,7 @@ public function testNoMetadataClassesToProcess() : void ] ); - self::assertContains('Command orm:generate-repositories is deprecated and will be removed in Doctrine 3.0.', $tester->getDisplay()); + self::assertContains('Command orm:generate-repositories is deprecated and will be removed in Doctrine ORM 3.0.', $tester->getDisplay()); self::assertContains('[OK] No Metadata Classes to process.', $tester->getDisplay()); } }