diff --git a/src/Bridges/SymfonyConsole/ContinueCommand.php b/src/Bridges/SymfonyConsole/ContinueCommand.php index 88821b1..3ae4692 100644 --- a/src/Bridges/SymfonyConsole/ContinueCommand.php +++ b/src/Bridges/SymfonyConsole/ContinueCommand.php @@ -16,17 +16,20 @@ class ContinueCommand extends BaseCommand { - /** @var string */ - protected static $defaultName = 'migrations:continue'; + public static function getDefaultName(): string + { + return 'migrations:continue'; + } + - /** @var string */ - protected static $defaultDescription = 'Updates database schema by running all new migrations'; + public static function getDefaultDescription(): string + { + return 'Updates database schema by running all new migrations'; + } protected function configure(): void { - $this->setName(self::$defaultName); - $this->setDescription(self::$defaultDescription); $this->setHelp("If table 'migrations' does not exist in current database, it is created automatically."); } diff --git a/src/Bridges/SymfonyConsole/CreateCommand.php b/src/Bridges/SymfonyConsole/CreateCommand.php index 8dfe188..0d5e34e 100644 --- a/src/Bridges/SymfonyConsole/CreateCommand.php +++ b/src/Bridges/SymfonyConsole/CreateCommand.php @@ -28,13 +28,19 @@ class CreateCommand extends BaseCommand const CONTENT_SOURCE_EMPTY = 'empty'; /** @var string */ - protected static $defaultName = 'migrations:create'; + protected $defaultContentSource = self::CONTENT_SOURCE_DIFF; - /** @var string */ - protected static $defaultDescription = 'Creates new migration file with proper name (e.g. 2015-03-14-130836-label.sql)'; - /** @var string */ - protected $defaultContentSource = self::CONTENT_SOURCE_DIFF; + public static function getDefaultName(): string + { + return 'migrations:create'; + } + + + public static function getDefaultDescription(): string + { + return 'Creates new migration file with proper name (e.g. 2015-03-14-130836-label.sql)'; + } public function setDefaultContentSource(string $defaultContentSource): void @@ -45,8 +51,6 @@ public function setDefaultContentSource(string $defaultContentSource): void protected function configure(): void { - $this->setName(self::$defaultName); - $this->setDescription(self::$defaultDescription); $this->setHelp('Prints path of the created file to standard output.'); $this->addArgument('type', InputArgument::REQUIRED, $this->getTypeArgDescription()); diff --git a/src/Bridges/SymfonyConsole/ResetCommand.php b/src/Bridges/SymfonyConsole/ResetCommand.php index 405f800..a82e1f9 100644 --- a/src/Bridges/SymfonyConsole/ResetCommand.php +++ b/src/Bridges/SymfonyConsole/ResetCommand.php @@ -16,17 +16,20 @@ class ResetCommand extends BaseCommand { - /** @var string */ - protected static $defaultName = 'migrations:reset'; + public static function getDefaultName(): string + { + return 'migrations:reset'; + } + - /** @var string */ - protected static $defaultDescription = 'Drops current database and recreates it from scratch'; + public static function getDefaultDescription(): string + { + return 'Drops current database and recreates it from scratch'; + } protected function configure(): void { - $this->setName(self::$defaultName); - $this->setDescription(self::$defaultDescription); $this->setHelp("Drops current database and runs all migrations"); } diff --git a/tests/matrix/symfony-bundle/symfony-3.0-php-5.5-to-7.2.sh b/tests/matrix/symfony-bundle/symfony-3.0-php-5.5-to-7.2.sh index afefdc1..f2e1b66 100644 --- a/tests/matrix/symfony-bundle/symfony-3.0-php-5.5-to-7.2.sh +++ b/tests/matrix/symfony-bundle/symfony-3.0-php-5.5-to-7.2.sh @@ -4,11 +4,11 @@ PHP_VERSION_MAX="70299" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle:~1.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.4" DBAL='doctrine' diff --git a/tests/matrix/symfony-bundle/symfony-3.0-php-7.3-to-7.4.sh b/tests/matrix/symfony-bundle/symfony-3.0-php-7.3-to-7.4.sh index ee64457..6a6ae5f 100644 --- a/tests/matrix/symfony-bundle/symfony-3.0-php-7.3-to-7.4.sh +++ b/tests/matrix/symfony-bundle/symfony-3.0-php-7.3-to-7.4.sh @@ -4,13 +4,13 @@ PHP_VERSION_MAX="70499" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.6.3" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle:~1.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.3" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.4" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/tester:~2.3" DBAL='doctrine'