diff --git a/docs/do.tree b/docs/do.tree index bae2b06f..6e4afdba 100644 --- a/docs/do.tree +++ b/docs/do.tree @@ -9,7 +9,7 @@ - + diff --git a/docs/redirection-rules.xml b/docs/redirection-rules.xml index b4ff0037..43760968 100644 --- a/docs/redirection-rules.xml +++ b/docs/redirection-rules.xml @@ -9,10 +9,6 @@ Created after removal of "Running Operations" from Deploy Operations guide/basic.html - - Created after removal of "Running Operations" from Deploy Operations - upgrade-guide/ - Created after removal of "Running Operations" from Deploy Operations guide/running.html diff --git a/docs/topics/rolling-back-operations.topic b/docs/topics/rolling-back-operations.topic index 11660384..e85cff3f 100644 --- a/docs/topics/rolling-back-operations.topic +++ b/docs/topics/rolling-back-operations.topic @@ -31,45 +31,12 @@ %artisan% %command_rollback% --step=5 -

- The %command_reset% command will roll back all of your application's operations: -

- - - %artisan% %command_reset% - -

For example:

- -

- The - %command_refresh% command will roll back all of your operations and then execute the operations command. - This command effectively re-creates your entire database: -

- - - %artisan% %command_refresh% - - -

- You may roll back and re-run a limited number of operations by providing the step option to the - %command_refresh% command. - For example, the following command will roll back and re-run the last five operations: -

- - - %artisan% %command_refresh% --step=5 - -
-

The diff --git a/docs/topics/upgrade-7.topic b/docs/topics/upgrade-7.topic index 471f37e9..1e960a52 100644 --- a/docs/topics/upgrade-7.topic +++ b/docs/topics/upgrade-7.topic @@ -21,6 +21,8 @@ + + @@ -57,6 +59,16 @@ It does not exist now. + + We decided to drop support for the php artisan operations:refresh console command. + It does not exist now. + + + + We decided to drop support for the php artisan operations:reset console command. + It does not exist now. + +

A strict typification has been added to all the project files. diff --git a/docs/v.list b/docs/v.list index 7d50fb15..2b62328b 100644 --- a/docs/v.list +++ b/docs/v.list @@ -8,8 +8,6 @@ - - diff --git a/src/Console/RefreshCommand.php b/src/Console/RefreshCommand.php deleted file mode 100644 index a5eb5f47..00000000 --- a/src/Console/RefreshCommand.php +++ /dev/null @@ -1,28 +0,0 @@ -options->connection; - $path = $this->options->path; - - $this->runReset($connection, $path); - $this->runOperations($connection, $path); - } - - protected function runReset(?string $connection, ?string $path, bool $realPath = true): void - { - $this->runCommand(Names::Reset, [ - '--' . Options::Connection => $connection, - '--' . Options::Path => $path, - '--' . Options::Realpath => $realPath, - '--' . Options::Force => true, - ]); - } - - protected function runOperations(?string $connection, ?string $path, bool $realPath = true): void - { - $this->runCommand(Names::Operations, [ - '--' . Options::Connection => $connection, - '--' . Options::Path => $path, - '--' . Options::Realpath => $realPath, - ]); - } -} diff --git a/src/Processors/ResetProcessor.php b/src/Processors/ResetProcessor.php deleted file mode 100644 index 2c62e37c..00000000 --- a/src/Processors/ResetProcessor.php +++ /dev/null @@ -1,36 +0,0 @@ -rollback( - $this->options->connection, - $this->options->path, - $this->count() - ); - } - - protected function rollback(?string $connection, ?string $path, int $step): void - { - $this->runCommand(Names::Rollback, [ - '--' . Options::Connection => $connection, - '--' . Options::Path => $path, - '--' . Options::Realpath => true, - '--' . Options::Step => $step, - '--' . Options::Force => true, - ]); - } - - protected function count(): int - { - return $this->repository->getLastBatchNumber(); - } -} diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index d90c4447..c841b958 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -44,8 +44,6 @@ protected function registerCommands(): void Console\FreshCommand::class, Console\InstallCommand::class, Console\MakeCommand::class, - Console\RefreshCommand::class, - Console\ResetCommand::class, Console\RollbackCommand::class, Console\StatusCommand::class, ]); diff --git a/tests/Commands/RefreshTest.php b/tests/Commands/RefreshTest.php deleted file mode 100644 index 522c5aed..00000000 --- a/tests/Commands/RefreshTest.php +++ /dev/null @@ -1,33 +0,0 @@ -assertDatabaseDoesntTable($this->table); - - $this->artisan(Names::Install)->assertExitCode(0); - - $this->assertDatabaseHasTable($this->table); - $this->assertDatabaseCount($this->table, 0); - - $this->artisan(Names::Make, ['name' => 'Refresh'])->assertExitCode(0); - $this->artisan(Names::Operations)->assertExitCode(0); - - $this->assertDatabaseHasTable($this->table); - $this->assertDatabaseCount($this->table, 1); - - $this->artisan(Names::Refresh)->assertExitCode(0); - - $this->assertDatabaseHasTable($this->table); - $this->assertDatabaseCount($this->table, 1); - $this->assertDatabaseOperationHas($this->table, 'refresh'); - } -} diff --git a/tests/Commands/ResetTest.php b/tests/Commands/ResetTest.php deleted file mode 100644 index 445635de..00000000 --- a/tests/Commands/ResetTest.php +++ /dev/null @@ -1,34 +0,0 @@ -assertDatabaseDoesntTable($this->table); - - $this->artisan(Names::Install)->assertExitCode(0); - - $this->assertDatabaseHasTable($this->table); - $this->assertDatabaseCount($this->table, 0); - - $this->artisan(Names::Make, ['name' => 'Reset'])->assertExitCode(0); - $this->artisan(Names::Operations)->assertExitCode(0); - - $this->assertDatabaseHasTable($this->table); - $this->assertDatabaseCount($this->table, 1); - $this->assertDatabaseOperationHas($this->table, 'reset'); - - $this->artisan(Names::Reset)->assertExitCode(0); - - $this->assertDatabaseHasTable($this->table); - $this->assertDatabaseCount($this->table, 0); - $this->assertDatabaseOperationDoesntLike($this->table, 'reset'); - } -}