Skip to content

Commit

Permalink
Add deprecation hints to orm:convert-mapping command
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Nov 30, 2021
1 parent f0a20db commit eabb7f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Expand Up @@ -31,6 +31,8 @@
/**
* Command to convert your mapping information between the various formats.
*
* @deprecated 2.7 This class is being removed from the ORM and won't have any replacement
*
* @link www.doctrine-project.org
*/
class ConvertMappingCommand extends AbstractEntityManagerCommand
Expand Down Expand Up @@ -86,6 +88,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 ORM 3.0.');

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

Expand Down
5 changes: 1 addition & 4 deletions psalm-baseline.xml
Expand Up @@ -3438,11 +3438,8 @@
</MissingReturnType>
</file>
<file src="lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php">
<DeprecatedClass occurrences="4">
<DeprecatedClass occurrences="1">
<code>Versions::getVersion('doctrine/orm')</code>
<code>new Command\ConvertDoctrine1SchemaCommand()</code>
<code>new Command\GenerateEntitiesCommand($entityManagerProvider)</code>
<code>new Command\GenerateRepositoriesCommand($entityManagerProvider)</code>
</DeprecatedClass>
</file>
<file src="lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php">
Expand Down
4 changes: 4 additions & 0 deletions psalm.xml
Expand Up @@ -24,7 +24,11 @@
<!-- The exception is thrown by a deprecated method. -->
<referencedClass name="Doctrine\ORM\Cache\Exception\InvalidResultCacheDriver"/>
<!-- Remove on 3.0.x -->
<referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand"/>
<referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand"/>
<referencedClass name="Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand"/>
<referencedClass name="Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand"/>
<referencedClass name="Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand"/>
</errorLevel>
</DeprecatedClass>
<DeprecatedMethod>
Expand Down

0 comments on commit eabb7f8

Please sign in to comment.