Skip to content

Commit

Permalink
Update composer.json and InstallComposerPackagesCommand.php debs. (#17)
Browse files Browse the repository at this point in the history
* Update composer.json and InstallComposerPackagesCommand.php files.

The changes were made to update the required versions of certain packages and add new packages to the composer.json file. In InstallComposerPackagesCommand.php, a new method was added to execute shell commands and display information and error messages.

* Fix styling

---------

Co-authored-by: thejmitchener <[email protected]>
  • Loading branch information
thejmitchener and thejmitchener committed Dec 20, 2024
1 parent 3533d77 commit 26164c4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"php":"8.3.14","version":"3.65.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces_position":true,"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","do","else","elseif","final","for","foreach","function","if","interface","namespace","private","protected","public","static","switch","trait","try","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}},"single_trait_insert_per_statement":true},"hashes":{"src\/AppInitServiceProvider.php":"66c62559d6588bba8ac864307459072d","src\/Facades\/AppInit.php":"679a4aa07ef5dc2f0a3d9ccfe901d455","src\/Commands\/InstallTailwindCssCommand.php":"fac59dc698a1bb6fa268191b83aff2c2","src\/Commands\/InstallCommand.php":"99949ea2172e7078edbf70b674585ee7","src\/Commands\/InstallGitDotFilesCommand.php":"74163d4bec8a5e68f189487eece9b2e8","src\/Commands\/InstallComposerPackagesCommand.php":"e3abc6bcbcc2b04c513758e8061a06a3","src\/Commands\/ProcessImagesCommand.php":"f4b32ec96702e9c111e8078d418fa290","src\/Commands\/ConfigureEnvCommand.php":"bff4a2e5d2a7cb78fce4ef647d175931","src\/Commands\/InstallPrettierCommand.php":"11b614fe35e88ca4ac8daa5e1709f0c8","src\/Commands\/InstallViteCommand.php":"19b748e17c54ece6d5bdd55ef1541344","src\/Commands\/InstallChangeLogCommand.php":"7127ba50ce9fb50f71f2da8375410286","src\/AppInit.php":"6396e2c783844f7a8e0d63c6f7a4ab29","tests\/Pest.php":"5b2122d0e0474fb9f568a8cb9fb479d7","tests\/ArchTest.php":"3ee5b69122c072917aa2cac591256b77","tests\/TestCase.php":"f707c59c644ad648e719c8eb6c3615c7"}}
{"php":"8.3.14","version":"3.65.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces_position":true,"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","do","else","elseif","final","for","foreach","function","if","interface","namespace","private","protected","public","static","switch","trait","try","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}},"single_trait_insert_per_statement":true},"hashes":{"src\/AppInitServiceProvider.php":"66c62559d6588bba8ac864307459072d","src\/Facades\/AppInit.php":"679a4aa07ef5dc2f0a3d9ccfe901d455","src\/Commands\/InstallTailwindCssCommand.php":"fac59dc698a1bb6fa268191b83aff2c2","src\/Commands\/InstallCommand.php":"99949ea2172e7078edbf70b674585ee7","src\/Commands\/InstallGitDotFilesCommand.php":"74163d4bec8a5e68f189487eece9b2e8","src\/Commands\/InstallComposerPackagesCommand.php":"0f5a07ba131108d357d4c0e0f3282859","src\/Commands\/ProcessImagesCommand.php":"f4b32ec96702e9c111e8078d418fa290","src\/Commands\/ConfigureEnvCommand.php":"bff4a2e5d2a7cb78fce4ef647d175931","src\/Commands\/InstallPrettierCommand.php":"11b614fe35e88ca4ac8daa5e1709f0c8","src\/Commands\/InstallViteCommand.php":"19b748e17c54ece6d5bdd55ef1541344","src\/Commands\/InstallChangeLogCommand.php":"7127ba50ce9fb50f71f2da8375410286","src\/AppInit.php":"6396e2c783844f7a8e0d63c6f7a4ab29","tests\/Pest.php":"5b2122d0e0474fb9f568a8cb9fb479d7","tests\/ArchTest.php":"3ee5b69122c072917aa2cac591256b77","tests\/TestCase.php":"f707c59c644ad648e719c8eb6c3615c7"}}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to `app-init` will be documented in this file.

## v1.0.5 - 2024-12-20

### What's Changed

* Update composer.json and InstallComposerPackagesCommand.php debs. by @thejmitchener in https://github.com/fuelviews/app-init/pull/17

**Full Changelog**: https://github.com/fuelviews/app-init/compare/v1.0.2...v1.0.5

## v1.0.4 - 2024-12-20

### What's Changed
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"pestphp/pest": "^2.20",
"pestphp/pest-plugin-arch": "^2.5",
"pestphp/pest-plugin-laravel": "^2.0",
"intervention/image": "^2.7.2||^3.9",
"spatie/image-optimizer": "^1.8"
"intervention/image": ">=2.7.2||>=3.9",
"spatie/image-optimizer": ">=1.8"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions src/Commands/InstallComposerPackagesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ public function handle(): void
private function installComposerPackages(): void
{
$packages = [
'fuelviews/app-wrapper',
'fuelviews/laravel-cloudflare-cache',
'fuelviews/laravel-robots-txt',
'fuelviews/laravel-sitemap',
'ralphjsmit/laravel-seo',
'ralphjsmit/laravel-glide',
'livewire/livewire',
'spatie/laravel-google-fonts',
'fuelviews/app-wrapper:">=0.0"',
'fuelviews/laravel-cloudflare-cache:">=0.0"',
'fuelviews/laravel-robots-txt:">=0.0"',
'fuelviews/laravel-sitemap:">=0.0"',
'ralphjsmit/laravel-seo:">=0.0"',
'ralphjsmit/laravel-glide:">=0.0"',
'livewire/livewire:">=0.0"',
'spatie/laravel-google-fonts:">=0.0"',
'spatie/image-optimizer:">=0.0"',
];

// Install Composer packages
Expand Down Expand Up @@ -88,6 +89,8 @@ private function runPackageInstallCommands(): void
*/
private function runShellCommand($command): void
{
$this->info("Executing command: {$command}");

$process = Process::fromShellCommandline($command);

$process->setTty(Process::isTtySupported());
Expand All @@ -97,6 +100,8 @@ private function runShellCommand($command): void
});

if (! $process->isSuccessful()) {
$this->error("Command failed: {$command}");

throw new ProcessFailedException($process);
}
}
Expand Down

0 comments on commit 26164c4

Please sign in to comment.