Skip to content

Commit eabb7f8

Browse files
committed
Add deprecation hints to orm:convert-mapping command
1 parent f0a20db commit eabb7f8

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
/**
3232
* Command to convert your mapping information between the various formats.
3333
*
34+
* @deprecated 2.7 This class is being removed from the ORM and won't have any replacement
35+
*
3436
* @link www.doctrine-project.org
3537
*/
3638
class ConvertMappingCommand extends AbstractEntityManagerCommand
@@ -86,6 +88,7 @@ protected function configure()
8688
protected function execute(InputInterface $input, OutputInterface $output)
8789
{
8890
$ui = new SymfonyStyle($input, $output);
91+
$ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine ORM 3.0.');
8992

9093
$em = $this->getEntityManager($input);
9194

psalm-baseline.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,11 +3438,8 @@
34383438
</MissingReturnType>
34393439
</file>
34403440
<file src="lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php">
3441-
<DeprecatedClass occurrences="4">
3441+
<DeprecatedClass occurrences="1">
34423442
<code>Versions::getVersion('doctrine/orm')</code>
3443-
<code>new Command\ConvertDoctrine1SchemaCommand()</code>
3444-
<code>new Command\GenerateEntitiesCommand($entityManagerProvider)</code>
3445-
<code>new Command\GenerateRepositoriesCommand($entityManagerProvider)</code>
34463443
</DeprecatedClass>
34473444
</file>
34483445
<file src="lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php">

psalm.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
<!-- The exception is thrown by a deprecated method. -->
2525
<referencedClass name="Doctrine\ORM\Cache\Exception\InvalidResultCacheDriver"/>
2626
<!-- Remove on 3.0.x -->
27+
<referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand"/>
28+
<referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand"/>
2729
<referencedClass name="Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand"/>
30+
<referencedClass name="Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand"/>
31+
<referencedClass name="Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand"/>
2832
</errorLevel>
2933
</DeprecatedClass>
3034
<DeprecatedMethod>

0 commit comments

Comments
 (0)