Skip to content

Commit

Permalink
Merge pull request #1 from ArteGEIE/remove-deprecations
Browse files Browse the repository at this point in the history
remove deprecations
  • Loading branch information
nikophil authored Dec 21, 2021
2 parents 08302f4 + d1e82f5 commit 68d1712
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"php": "^7.1 || ^8.0",
"ext-mongodb": "*",
"mongodb/mongodb": "^1.8",
"symfony/console": "^2.7 || ^3.4 || ^4.0 || ^5.0",
"symfony/yaml": "^2.7 || ^3.4 || ^4.0 || ^5.0"
"symfony/console": "^2.7 || ^3.4 || ^4.0 || ^5.0 || ^6.0",
"symfony/yaml": "^2.7 || ^3.4 || ^4.0 || ^5.0 || ^6.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0 || ^8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class AbstractCommand extends Command
/**
* configure.
*/
protected function configure()
protected function configure(): void
{
$this->addOption(
'configuration', null, InputOption::VALUE_OPTIONAL, 'The path to a migrations configuration file.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ExecuteCommand extends AbstractCommand
{
protected static $defaultName = 'mongodb:migrations:execute';

protected function configure()
protected function configure(): void
{
$this
->setDescription('Execute a single migration version up or down manually.')
Expand Down Expand Up @@ -54,7 +54,7 @@ protected function configure()
* @param \Symfony\Component\Console\Input\InputInterface
* @param \Symfony\Component\Console\Output\OutputInterface
*/
public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$version = $input->getArgument('version');
$direction = $input->getOption('down') ? 'down' : 'up';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function down(Database $db)
}
';

protected function configure()
protected function configure(): void
{
$this
->setDescription('Generate a blank migration class.')
Expand All @@ -81,7 +81,7 @@ protected function configure()
* @param \Symfony\Component\Console\Input\InputInterface
* @param \Symfony\Component\Console\Output\OutputInterface
*/
public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$configuration = $this->getMigrationConfiguration($input, $output);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MigrateCommand extends AbstractCommand
{
protected static $defaultName = 'mongodb:migrations:migrate';

protected function configure()
protected function configure(): void
{
$this
->setDescription('Execute a migration to a specified version or the latest available version.')
Expand Down Expand Up @@ -53,7 +53,7 @@ protected function configure()
* @param \Symfony\Component\Console\Input\InputInterface
* @param \Symfony\Component\Console\Output\OutputInterface
*/
public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$version = $input->getArgument('version');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class StatusCommand extends AbstractCommand
{
protected static $defaultName = 'mongodb:migrations:status';

protected function configure()
protected function configure(): void
{
$this
->setDescription('View the status of a set of migrations.')
Expand Down Expand Up @@ -52,7 +52,7 @@ protected function configure()
* @param \Symfony\Component\Console\Input\InputInterface
* @param \Symfony\Component\Console\Output\OutputInterface
*/
public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$configuration = $this->getMigrationConfiguration($input, $output);
$configMap = $configuration->getDetailsMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class VersionCommand extends AbstractCommand
{
protected static $defaultName = 'mongodb:migrations:version';

protected function configure()
protected function configure(): void
{
$this
->setDescription('Manually add and delete migration versions from the version table.')
Expand Down Expand Up @@ -54,7 +54,7 @@ protected function configure()
* @throws UnknownVersionException Throws exception if migration version does not exist
* @throws \InvalidArgumentException
*/
public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$configuration = $this->getMigrationConfiguration($input, $output);
$migration = $this->createMigration($configuration);
Expand Down

0 comments on commit 68d1712

Please sign in to comment.