Skip to content

Commit

Permalink
Make commands compatible with doctrine/orm 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrolucky committed Feb 12, 2022
1 parent bbb3b82 commit 2f308bb
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 110 deletions.
5 changes: 1 addition & 4 deletions Command/CreateDatabaseDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
*/
class CreateDatabaseDoctrineCommand extends DoctrineCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('doctrine:database:create')
Expand Down
5 changes: 1 addition & 4 deletions Command/ImportMappingDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ public function __construct(ManagerRegistry $doctrine, array $bundles)
$this->bundles = $bundles;
}

/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('doctrine:mapping:import')
Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/ClearMetadataCacheDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class ClearMetadataCacheDoctrineCommand extends MetadataCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -30,10 +27,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/ClearQueryCacheDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class ClearQueryCacheDoctrineCommand extends QueryCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -30,10 +27,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/ClearResultCacheDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class ClearResultCacheDoctrineCommand extends ResultCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -30,10 +27,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
8 changes: 2 additions & 6 deletions Command/Proxy/CollectionRegionDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class CollectionRegionDoctrineCommand extends CollectionRegionCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -29,8 +26,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/** @return int */
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/CreateSchemaDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
*/
class CreateSchemaDoctrineCommand extends CreateCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -31,10 +28,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/DropSchemaDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class DropSchemaDoctrineCommand extends DropCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -30,10 +27,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/EnsureProductionSettingsDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class EnsureProductionSettingsDoctrineCommand extends EnsureProductionSettingsCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -29,10 +26,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
8 changes: 2 additions & 6 deletions Command/Proxy/EntityRegionCacheDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class EntityRegionCacheDoctrineCommand extends EntityRegionCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -29,8 +26,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/** @return int */
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/InfoDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class InfoDoctrineCommand extends InfoCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('doctrine:mapping:info');
Expand All @@ -27,10 +24,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
8 changes: 2 additions & 6 deletions Command/Proxy/QueryRegionCacheDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class QueryRegionCacheDoctrineCommand extends QueryRegionCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -29,8 +26,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/** @return int */
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/RunDqlDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class RunDqlDoctrineCommand extends RunDqlCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down Expand Up @@ -46,10 +43,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
5 changes: 1 addition & 4 deletions Command/Proxy/RunSqlDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public function __construct(?ConnectionProvider $connectionProvider = null)
$this->connectionProvider = $connectionProvider;
}

/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/UpdateSchemaDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
*/
class UpdateSchemaDoctrineCommand extends UpdateCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -30,10 +27,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down
10 changes: 2 additions & 8 deletions Command/Proxy/ValidateSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
class ValidateSchemaCommand extends DoctrineValidateSchemaCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -29,10 +26,7 @@ protected function configure()
$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
}

/**
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));

Expand Down

0 comments on commit 2f308bb

Please sign in to comment.