Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation hints to orm:convert-mapping command #9211

Merged
merged 1 commit into from Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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