From 6e70aea0384e1ab5065135a2e5e625af86360d27 Mon Sep 17 00:00:00 2001 From: howyi Date: Thu, 16 Jan 2020 13:43:01 +0900 Subject: [PATCH 1/2] add Return 0; for symfony/console v5 --- src/Command/DiffDb2DbCommand.php | 2 ++ src/Command/DiffSchema2DbCommand.php | 2 ++ src/Command/ReflectCommand.php | 2 ++ src/DebugCommand/CheckAlterCommand.php | 2 ++ src/DebugCommand/ReflectCommand.php | 2 ++ src/DebugCommand/SetupCommand.php | 2 ++ 6 files changed, 12 insertions(+) diff --git a/src/Command/DiffDb2DbCommand.php b/src/Command/DiffDb2DbCommand.php index a4b9e6a..c2e89d6 100644 --- a/src/Command/DiffDb2DbCommand.php +++ b/src/Command/DiffDb2DbCommand.php @@ -53,5 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output) ); $this->displayAlterMigration($alterMigrations, $operator); + + return 0; } } diff --git a/src/Command/DiffSchema2DbCommand.php b/src/Command/DiffSchema2DbCommand.php index fd83339..0ed9ec1 100644 --- a/src/Command/DiffSchema2DbCommand.php +++ b/src/Command/DiffSchema2DbCommand.php @@ -62,5 +62,7 @@ protected function execute(InputInterface $input, OutputInterface $output) ); $this->displayAlterMigration($alterMigrations, $operator); + + return 0; } } diff --git a/src/Command/ReflectCommand.php b/src/Command/ReflectCommand.php index d657669..e4fdce7 100644 --- a/src/Command/ReflectCommand.php +++ b/src/Command/ReflectCommand.php @@ -46,5 +46,7 @@ protected function execute(InputInterface $input, OutputInterface $output) (string) $input->getOption('dir'), $this->getOperator($input, $output) ); + + return 0; } } diff --git a/src/DebugCommand/CheckAlterCommand.php b/src/DebugCommand/CheckAlterCommand.php index 8fa6d9b..db928be 100644 --- a/src/DebugCommand/CheckAlterCommand.php +++ b/src/DebugCommand/CheckAlterCommand.php @@ -48,5 +48,7 @@ protected function execute(InputInterface $input, OutputInterface $output) ); $operator->output(sprintf('DBとの差分:%d', count($alter->getMigrationList()))); + + return 0; } } diff --git a/src/DebugCommand/ReflectCommand.php b/src/DebugCommand/ReflectCommand.php index 7c33bc1..96d7729 100644 --- a/src/DebugCommand/ReflectCommand.php +++ b/src/DebugCommand/ReflectCommand.php @@ -31,5 +31,7 @@ protected function execute(InputInterface $input, OutputInterface $output) 'conv' ); CreateQueryReflector::fromPDO($this->getPDO('conv'), 'conv', 'database', new DropOnlySilentOperator()); + + return 0; } } diff --git a/src/DebugCommand/SetupCommand.php b/src/DebugCommand/SetupCommand.php index 190f621..d35bcbe 100644 --- a/src/DebugCommand/SetupCommand.php +++ b/src/DebugCommand/SetupCommand.php @@ -48,5 +48,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $output->writeln('setup success'); + + return 0; } } From 6ab4c5f520078d355ca635f6c559defca5df02d4 Mon Sep 17 00:00:00 2001 From: howyi Date: Thu, 16 Jan 2020 13:43:32 +0900 Subject: [PATCH 2/2] update composer libraries --- composer.json | 6 +++--- tests/MigrationGeneratorMultiTest.php | 18 +++++++++--------- tests/MigrationGeneratorSingleTest.php | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 4089111..210b554 100644 --- a/composer.json +++ b/composer.json @@ -52,11 +52,11 @@ "require-dev": { "phpunit/phpunit": "^6.2", "symfony/var-dumper": "^3.3", - "php-coveralls/php-coveralls": "^2.1", "phpspec/prophecy": "^1.7", - "phpstan/phpstan": "^0.8.0", + "phpstan/phpstan": "^0.12.5", "squizlabs/php_codesniffer": "^3.0", - "laminaria/conv-test-suite": "dev-master" + "howyi/conv-test-suite": "dev-master", + "php-coveralls/php-coveralls": "^2.2" }, "bin": ["bin/conv"] } diff --git a/tests/MigrationGeneratorMultiTest.php b/tests/MigrationGeneratorMultiTest.php index c9475fc..6026985 100644 --- a/tests/MigrationGeneratorMultiTest.php +++ b/tests/MigrationGeneratorMultiTest.php @@ -75,7 +75,7 @@ public function generateProvider() { $values = [ [ - 'vendor/laminaria/conv-test-suite/cases/unit/000', + 'vendor/howyi/conv-test-suite/cases/unit/000', [], [ TableCreateMigration::class, @@ -90,14 +90,14 @@ public function generateProvider() ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/001', + 'vendor/howyi/conv-test-suite/cases/unit/001', [], [ TableAlterMigration::class, ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/002', + 'vendor/howyi/conv-test-suite/cases/unit/002', [], [ TableDropMigration::class, @@ -105,14 +105,14 @@ public function generateProvider() ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/003', + 'vendor/howyi/conv-test-suite/cases/unit/003', [], [ ViewAlterMigration::class, ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/004', + 'vendor/howyi/conv-test-suite/cases/unit/004', [ [ 'message' => 'Table tbl_country is missing. Choose an action.', @@ -130,7 +130,7 @@ public function generateProvider() ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/005', + 'vendor/howyi/conv-test-suite/cases/unit/005', [ [ 'message' => 'View view_user2 is missing. Choose an action.', @@ -147,7 +147,7 @@ public function generateProvider() ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/006', + 'vendor/howyi/conv-test-suite/cases/unit/006', [ [ 'message' => 'Column tbl_music.name is missing. Choose an action.', @@ -163,14 +163,14 @@ public function generateProvider() ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/007', + 'vendor/howyi/conv-test-suite/cases/unit/007', [], [ TableAlterMigration::class, ] ], [ - 'vendor/laminaria/conv-test-suite/cases/unit/008', + 'vendor/howyi/conv-test-suite/cases/unit/008', [], [ TableAlterMigration::class, diff --git a/tests/MigrationGeneratorSingleTest.php b/tests/MigrationGeneratorSingleTest.php index e94704c..091c3f8 100644 --- a/tests/MigrationGeneratorSingleTest.php +++ b/tests/MigrationGeneratorSingleTest.php @@ -103,7 +103,7 @@ public function testGenerate($name, $beforeDir, $afterDir, $upPath, $downPath, $ public function generateProvider() { - $dir = 'vendor/laminaria/conv-test-suite/cases/part/'; + $dir = 'vendor/howyi/conv-test-suite/cases/part/'; foreach (TestUtility::getPdoArray() as $pdo) { foreach (new \DirectoryIterator($dir) as $fileInfo) {