File tree Expand file tree Collapse file tree 5 files changed +43
-33
lines changed
src/Bridges/SymfonyConsole
tests/matrix/symfony-bundle Expand file tree Collapse file tree 5 files changed +43
-33
lines changed Original file line number Diff line number Diff line change 1616
1717class ContinueCommand extends BaseCommand
1818{
19- /** @var string */
20- protected static $ defaultName = 'migrations:continue ' ;
19+ public static function getDefaultName (): string
20+ {
21+ return 'migrations:continue ' ;
22+ }
23+
2124
22- /** @var string */
23- protected static $ defaultDescription = 'Updates database schema by running all new migrations ' ;
25+ public static function getDefaultDescription (): string
26+ {
27+ return 'Updates database schema by running all new migrations ' ;
28+ }
2429
2530
2631 protected function configure (): void
2732 {
28- $ this ->setName (self ::$ defaultName );
29- $ this ->setDescription (self ::$ defaultDescription );
3033 $ this ->setHelp ("If table 'migrations' does not exist in current database, it is created automatically. " );
3134 }
3235
Original file line number Diff line number Diff line change @@ -28,13 +28,19 @@ class CreateCommand extends BaseCommand
2828 const CONTENT_SOURCE_EMPTY = 'empty ' ;
2929
3030 /** @var string */
31- protected static $ defaultName = ' migrations:create ' ;
31+ protected $ defaultContentSource = self :: CONTENT_SOURCE_DIFF ;
3232
33- /** @var string */
34- protected static $ defaultDescription = 'Creates new migration file with proper name (e.g. 2015-03-14-130836-label.sql) ' ;
3533
36- /** @var string */
37- protected $ defaultContentSource = self ::CONTENT_SOURCE_DIFF ;
34+ public static function getDefaultName (): string
35+ {
36+ return 'migrations:create ' ;
37+ }
38+
39+
40+ public static function getDefaultDescription (): string
41+ {
42+ return 'Creates new migration file with proper name (e.g. 2015-03-14-130836-label.sql) ' ;
43+ }
3844
3945
4046 public function setDefaultContentSource (string $ defaultContentSource ): void
@@ -45,8 +51,6 @@ public function setDefaultContentSource(string $defaultContentSource): void
4551
4652 protected function configure (): void
4753 {
48- $ this ->setName (self ::$ defaultName );
49- $ this ->setDescription (self ::$ defaultDescription );
5054 $ this ->setHelp ('Prints path of the created file to standard output. ' );
5155
5256 $ this ->addArgument ('type ' , InputArgument::REQUIRED , $ this ->getTypeArgDescription ());
Original file line number Diff line number Diff line change 1616
1717class ResetCommand extends BaseCommand
1818{
19- /** @var string */
20- protected static $ defaultName = 'migrations:reset ' ;
19+ public static function getDefaultName (): string
20+ {
21+ return 'migrations:reset ' ;
22+ }
23+
2124
22- /** @var string */
23- protected static $ defaultDescription = 'Drops current database and recreates it from scratch ' ;
25+ public static function getDefaultDescription (): string
26+ {
27+ return 'Drops current database and recreates it from scratch ' ;
28+ }
2429
2530
2631 protected function configure (): void
2732 {
28- $ this ->setName (self ::$ defaultName );
29- $ this ->setDescription (self ::$ defaultDescription );
3033 $ this ->setHelp ("Drops current database and runs all migrations " );
3134 }
3235
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ PHP_VERSION_MAX="70299"
44COMPOSER_REQUIRE=" $COMPOSER_REQUIRE doctrine/dbal:~2.5"
55COMPOSER_REQUIRE=" $COMPOSER_REQUIRE doctrine/orm:~2.5"
66COMPOSER_REQUIRE=" $COMPOSER_REQUIRE doctrine/doctrine-bundle:~1.0"
7- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/config:~3.3 "
8- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/console:~3.3 "
9- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/dependency-injection:~3.3 "
10- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3 "
11- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/framework-bundle:~3.3 "
12- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/http-kernel:~3.3 "
13- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/yaml:~3.3 "
7+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/config:~3.4 "
8+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/console:~3.4 "
9+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/dependency-injection:~3.4 "
10+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/doctrine-bridge:~3.4 "
11+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/framework-bundle:~3.4 "
12+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/http-kernel:~3.4 "
13+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/yaml:~3.4 "
1414DBAL=' doctrine'
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ PHP_VERSION_MAX="70499"
44COMPOSER_REQUIRE=" $COMPOSER_REQUIRE doctrine/dbal:~2.5"
55COMPOSER_REQUIRE=" $COMPOSER_REQUIRE doctrine/orm:~2.6.3"
66COMPOSER_REQUIRE=" $COMPOSER_REQUIRE doctrine/doctrine-bundle:~1.0"
7- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/config:~3.3 "
8- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/console:~3.3 "
9- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/dependency-injection:~3.3 "
10- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3 "
11- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/framework-bundle:~3.3 "
12- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/http-kernel:~3.3 "
13- COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/yaml:~3.3 "
7+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/config:~3.4 "
8+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/console:~3.4 "
9+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/dependency-injection:~3.4 "
10+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/doctrine-bridge:~3.4 "
11+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/framework-bundle:~3.4 "
12+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/http-kernel:~3.4 "
13+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE symfony/yaml:~3.4 "
1414COMPOSER_REQUIRE=" $COMPOSER_REQUIRE nette/tester:~2.3"
1515
1616DBAL=' doctrine'
You can’t perform that action at this time.
0 commit comments