Skip to content

Commit 29089c8

Browse files
authored
Merge pull request #282 from alcaeus/update-php-versions
Update supported PHP version
2 parents 5c8f128 + 451658f commit 29089c8

14 files changed

+1256
-740
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ php:
66
- 7.1
77
- 7.2
88
- 7.3
9-
- nightly
9+
- 7.4snapshot
1010

1111
cache:
1212
directories:
@@ -24,9 +24,6 @@ script:
2424
- ./vendor/bin/phpunit
2525

2626
jobs:
27-
allow_failures:
28-
- php: nightly
29-
3027
include:
3128
- stage: Test
3229
env: DEPENDENCIES=low

Command/Helper/DoctrineCommandHelper.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use LogicException;
1212
use Symfony\Bundle\FrameworkBundle\Console\Application;
1313
use Symfony\Component\Console\Input\InputInterface;
14+
use Symfony\Component\DependencyInjection\ContainerInterface;
15+
use function assert;
1416
use function count;
1517
use function sprintf;
1618

@@ -23,16 +25,17 @@ abstract class DoctrineCommandHelper extends BaseDoctrineCommandHelper
2325
public static function setApplicationHelper(Application $application, InputInterface $input) : void
2426
{
2527
$container = $application->getKernel()->getContainer();
28+
assert($container instanceof ContainerInterface);
2629

2730
/** @var Registry $doctrine */
2831
$doctrine = $container->get('doctrine');
2932

3033
$managerNames = $doctrine->getManagerNames();
3134

3235
if ($input->getOption('db') !== null || count($managerNames) === 0) {
33-
self::setApplicationConnection($application, $input->getOption('db'));
36+
self::setApplicationConnection($application, (string) $input->getOption('db'));
3437
} else {
35-
self::setApplicationEntityManager($application, $input->getOption('em'));
38+
self::setApplicationEntityManager($application, (string) $input->getOption('em'));
3639
}
3740

3841
if ($input->getOption('shard') === null) {
@@ -58,6 +61,6 @@ public static function setApplicationHelper(Application $application, InputInter
5861
));
5962
}
6063

61-
$connection->connect($input->getOption('shard'));
64+
$connection->connect((string) $input->getOption('shard'));
6265
}
6366
}

Command/MigrationsDiffDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command for generate migration classes by comparing your current database schema
@@ -36,7 +38,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3638
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3739

3840
$configuration = $this->getMigrationConfiguration($input, $output);
39-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
41+
$container = $application->getKernel()->getContainer();
42+
assert($container instanceof ContainerInterface);
43+
DoctrineCommand::configureMigrations($container, $configuration);
4044

4145
parent::initialize($input, $output);
4246
}

Command/MigrationsDumpSchemaDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command for dumping your current database schema to a migration.
@@ -35,7 +37,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3537
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3638

3739
$configuration = $this->getMigrationConfiguration($input, $output);
38-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
40+
$container = $application->getKernel()->getContainer();
41+
assert($container instanceof ContainerInterface);
42+
DoctrineCommand::configureMigrations($container, $configuration);
3943

4044
parent::initialize($input, $output);
4145
}

Command/MigrationsExecuteDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command for executing single migrations up or down manually.
@@ -35,7 +37,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3537
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3638

3739
$configuration = $this->getMigrationConfiguration($input, $output);
38-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
40+
$container = $application->getKernel()->getContainer();
41+
assert($container instanceof ContainerInterface);
42+
DoctrineCommand::configureMigrations($container, $configuration);
3943

4044
parent::initialize($input, $output);
4145
}

Command/MigrationsGenerateDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command for generating new blank migration classes
@@ -35,7 +37,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3537
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3638

3739
$configuration = $this->getMigrationConfiguration($input, $output);
38-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
40+
$container = $application->getKernel()->getContainer();
41+
assert($container instanceof ContainerInterface);
42+
DoctrineCommand::configureMigrations($container, $configuration);
3943

4044
parent::initialize($input, $output);
4145
}

Command/MigrationsLatestDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command for outputting the latest version number.
@@ -35,7 +37,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3537
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3638

3739
$configuration = $this->getMigrationConfiguration($input, $output);
38-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
40+
$container = $application->getKernel()->getContainer();
41+
assert($container instanceof ContainerInterface);
42+
DoctrineCommand::configureMigrations($container, $configuration);
3943

4044
parent::initialize($input, $output);
4145
}

Command/MigrationsMigrateDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command for executing a migration to a specified version or the latest available version.
@@ -35,7 +37,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3537
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3638

3739
$configuration = $this->getMigrationConfiguration($input, $output);
38-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
40+
$container = $application->getKernel()->getContainer();
41+
assert($container instanceof ContainerInterface);
42+
DoctrineCommand::configureMigrations($container, $configuration);
3943

4044
parent::initialize($input, $output);
4145
}

Command/MigrationsRollupDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command for rolling up your historical migration versions and inserting the dumped schema version.
@@ -35,7 +37,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3537
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3638

3739
$configuration = $this->getMigrationConfiguration($input, $output);
38-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
40+
$container = $application->getKernel()->getContainer();
41+
assert($container instanceof ContainerInterface);
42+
DoctrineCommand::configureMigrations($container, $configuration);
3943

4044
parent::initialize($input, $output);
4145
}

Command/MigrationsStatusDoctrineCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Output\OutputInterface;
13+
use Symfony\Component\DependencyInjection\ContainerInterface;
14+
use function assert;
1315

1416
/**
1517
* Command to view the status of a set of migrations.
@@ -35,7 +37,9 @@ public function initialize(InputInterface $input, OutputInterface $output) : voi
3537
Helper\DoctrineCommandHelper::setApplicationHelper($application, $input);
3638

3739
$configuration = $this->getMigrationConfiguration($input, $output);
38-
DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $configuration);
40+
$container = $application->getKernel()->getContainer();
41+
assert($container instanceof ContainerInterface);
42+
DoctrineCommand::configureMigrations($container, $configuration);
3943

4044
parent::initialize($input, $output);
4145
}

0 commit comments

Comments
 (0)