Skip to content

Commit

Permalink
Tweak cli scripts to run composer dump-autoload upon successful compl…
Browse files Browse the repository at this point in the history
…etion
  • Loading branch information
rotimi committed May 26, 2024
1 parent a27e0b1 commit 2e9cb02
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/scripts/cli-script-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ function createController($argc, array $argv): CreateControllerReturnValue {
}

$success_messages .= PHP_EOL . "All done!!";
$success_messages .= PHP_EOL . "Remember to run `composer dumpautoload` so that composer can pick up the newly created controller class `$studly_controller_name` in `{$dest_controller_class_file}`.";

return new CreateControllerReturnValue(
CliExitCodes::SUCCESS_EXIT,
Expand Down
4 changes: 0 additions & 4 deletions tests/CliScriptHelperFunctionsNamespacedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ public function testThatCreateControllerWorksAsExpectedWithValidParamsAndNoNames
$expected_message3 = PHP_EOL . "Creating index view for `BlogComments::actionIndex()` in `{$dest_view_file}` ....";
$expected_message4 = PHP_EOL . "Successfully created `{$dest_view_file}` ....".PHP_EOL;
$expected_message5 = PHP_EOL . "All done!!";
$expected_message6 = PHP_EOL . "Remember to run `composer dumpautoload` so that composer can pick up the newly created controller class `BlogComments` in `{$dest_controller_class_file}`.";

self::assertEquals(\SlimMvcTools\Functions\CliHelpers\CliExitCodes::SUCCESS_EXIT, $return_val->getReturnCode());

Expand All @@ -503,7 +502,6 @@ public function testThatCreateControllerWorksAsExpectedWithValidParamsAndNoNames
self::assertStringContainsString($expected_message3, $return_val->getReturnMessage());
self::assertStringContainsString($expected_message4, $return_val->getReturnMessage());
self::assertStringContainsString($expected_message5, $return_val->getReturnMessage());
self::assertStringContainsString($expected_message6, $return_val->getReturnMessage());

// clean-up
$this->rmdirRecursive($src_path . DIRECTORY_SEPARATOR . 'controllers');
Expand Down Expand Up @@ -550,7 +548,6 @@ public function testThatCreateControllerWorksAsExpectedWithValidParamsAndNamespa
$expected_message3 = PHP_EOL . "Creating index view for `BlogComments::actionIndex()` in `{$dest_view_file}` ....";
$expected_message4 = PHP_EOL . "Successfully created `{$dest_view_file}` ....".PHP_EOL;
$expected_message5 = PHP_EOL . "All done!!";
$expected_message6 = PHP_EOL . "Remember to run `composer dumpautoload` so that composer can pick up the newly created controller class `BlogComments` in `{$dest_controller_class_file}`.";

self::assertEquals(\SlimMvcTools\Functions\CliHelpers\CliExitCodes::SUCCESS_EXIT, $return_val->getReturnCode());

Expand All @@ -567,7 +564,6 @@ public function testThatCreateControllerWorksAsExpectedWithValidParamsAndNamespa
self::assertStringContainsString($expected_message3, $return_val->getReturnMessage());
self::assertStringContainsString($expected_message4, $return_val->getReturnMessage());
self::assertStringContainsString($expected_message5, $return_val->getReturnMessage());
self::assertStringContainsString($expected_message6, $return_val->getReturnMessage());

// clean-up
$this->rmdirRecursive($src_path . DIRECTORY_SEPARATOR . 'controllers');
Expand Down

0 comments on commit 2e9cb02

Please sign in to comment.