From 51fead0ddf81d6284524619261c22ad691465a74 Mon Sep 17 00:00:00 2001 From: Roberto Butti Date: Sun, 17 Mar 2024 22:01:06 +0100 Subject: [PATCH] Add PHP 8.3, Laravel 11 and Node 20 to GitHub Actions Workflow - Adding select for PHP 8.3 in the workflow files - Adding select for Laravel 11 in the workflow files - Adding select for Node 20 in the workflow files --- CHANGELOG.md | 6 ++++++ README.md | 4 ++-- app/Livewire/ConfiguratorForm.php | 2 ++ app/Traits/Form/BaseWorkflow.php | 6 +++--- app/Traits/Form/LaravelStuff.php | 1 + resources/templates/json/laravelapp.json | 8 ++++---- resources/templates/json/laravelpackage.json | 12 ++++++------ resources/templates/json/laravelpostgresql.json | 8 ++++---- resources/templates/json/phppackage.json | 8 ++++---- resources/views/livewire/configurator-form.blade.php | 6 +++--- .../views/livewire/form/laravel-stuff.blade.php | 4 ++-- 11 files changed, 37 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5c22b7..fe5eab6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog +## 1.0.1 - 2024-03-17 +- Adding select for PHP 8.3 in the workflow files +- Adding select for Laravel 11 in the workflow files +- Adding select for Node 20 in the workflow files + + ## 1.0.0 - 2024-03-17 - Upgrading to Laravel v11 - Upgrading to PestPHP v2 diff --git a/README.md b/README.md index 99428d2..2b21b7c 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ __Ghygen__ allows you creating your __Yaml__ file for __GitHub Actions__, for La - select branches; - enable caching for all vendors; - enable __caching__ PHP packages; -- select __multiple__ PHP versions (8.2, 8.1, 8.0, 7.4); -- select __multiple Laravel__ versions (10, 9, 8, 7, 6), useful if you are developing a Laravel Package and you want to test it with multiple Laravel version; +- select __multiple__ PHP versions (8.3, 8.2, 8.1, 8.0, 7.4); +- select __multiple Laravel__ versions (11, 10, 9, 8, 7, 6), useful if you are developing a Laravel Package and you want to test it with multiple Laravel version; - select __Node__ version for NPM (executing scripts via `npm run`); - caching node packages; - setup __Mysql__ Database service; diff --git a/app/Livewire/ConfiguratorForm.php b/app/Livewire/ConfiguratorForm.php index 649e6ad..041300d 100644 --- a/app/Livewire/ConfiguratorForm.php +++ b/app/Livewire/ConfiguratorForm.php @@ -84,7 +84,9 @@ private function loadFromJson(object $j): void public function mount(): void { + $this->fill(request()->only('code')); + Log::debug(__METHOD__.' Code : '.$this->code); $codeNotFound = false; $this->loadDefaults(); diff --git a/app/Traits/Form/BaseWorkflow.php b/app/Traits/Form/BaseWorkflow.php index c122382..da2be83 100644 --- a/app/Traits/Form/BaseWorkflow.php +++ b/app/Traits/Form/BaseWorkflow.php @@ -57,7 +57,7 @@ trait BaseWorkflow /** * @var array */ - public array $stepPhpVersions; // 8.2 + public array $stepPhpVersions; // 8.3 public bool $stepNodejs; // false @@ -97,9 +97,9 @@ public function loadDefaultsBaseWorkflow(): void $this->postgresqlVersion = 'latest'; $this->postgresqlDatabaseName = 'db_test_laravel'; $this->postgresqlDatabasePort = 55432; - $this->stepPhpVersions = ['8.2', '8.1', '8.0', '7.4']; + $this->stepPhpVersions = ['8.3', '8.2', '8.1', '8.0', '7.4']; $this->stepNodejs = false; - $this->stepNodejsVersion = '18.x'; + $this->stepNodejsVersion = '20.x'; $this->stepCachePackages = true; $this->stepCacheVendors = true; $this->stepCacheNpmModules = true; diff --git a/app/Traits/Form/LaravelStuff.php b/app/Traits/Form/LaravelStuff.php index ae8b701..881add3 100644 --- a/app/Traits/Form/LaravelStuff.php +++ b/app/Traits/Form/LaravelStuff.php @@ -38,6 +38,7 @@ public function loadDefaultsLaravelStuff(): void $this->matrixLaravel = false; $this->matrixLaravelVersions = []; $this->matrixTestbenchDependencies = [ + '11.*' => '9.*', '10.*' => '8.*', '9.*' => '7.*', '8.*' => '6.*', diff --git a/resources/templates/json/laravelapp.json b/resources/templates/json/laravelapp.json index a6f353a..f30c87f 100644 --- a/resources/templates/json/laravelapp.json +++ b/resources/templates/json/laravelapp.json @@ -12,8 +12,8 @@ "on_pullrequest": false, "stepGenerateKey": true, "stepPhpVersions": [ - "8.2", - "8.1" + "8.3", + "8.2" ], "on_push_branches": [ "main", @@ -26,7 +26,7 @@ "mysqlPasswordType": "skip", "postgresqlVersion": "latest", "stepCachePackages": true, - "stepNodejsVersion": "18.x", + "stepNodejsVersion": "20.x", "stepRunMigrations": true, "postgresqlDatabase": "postgresql", "postgresqlPassword": "postgres", @@ -36,7 +36,7 @@ "stepEnvTemplateFile": ".env.example", "matrixLaravelVersions": [], "stepDirStaticAnalysis": "app", - "stepPhpVersionsString": "[ '8.2','8.1' ]", + "stepPhpVersionsString": "[ '8.3','8.2' ]", "postgresqlDatabaseName": "db_test_laravel", "postgresqlDatabasePort": 55432, "postgresqlPasswordType": "hardcoded", diff --git a/resources/templates/json/laravelpackage.json b/resources/templates/json/laravelpackage.json index 4e67a3e..3a28651 100644 --- a/resources/templates/json/laravelpackage.json +++ b/resources/templates/json/laravelpackage.json @@ -12,8 +12,8 @@ "on_pullrequest": false, "stepGenerateKey": false, "stepPhpVersions": [ - "8.2", - "8.1" + "8.3", + "8.2" ], "on_push_branches": [ "main", @@ -26,7 +26,7 @@ "mysqlPasswordType": "skip", "postgresqlVersion": "latest", "stepCachePackages": false, - "stepNodejsVersion": "18.x", + "stepNodejsVersion": "20.x", "stepRunMigrations": false, "postgresqlDatabase": "postgresql", "postgresqlPassword": "postgres", @@ -35,9 +35,9 @@ "stepCacheNpmModules": false, "stepEnvTemplateFile": ".env.example", "matrixLaravel": true, - "matrixLaravelVersions": ["10.*"], + "matrixLaravelVersions": ["11.*"], "stepDirStaticAnalysis": "src", - "stepPhpVersionsString": "[ '8.2','8.1' ]", + "stepPhpVersionsString": "[ '8.3','8.2' ]", "postgresqlDatabaseName": "db_test_laravel", "postgresqlDatabasePort": 55432, "postgresqlPasswordType": "hardcoded", @@ -51,6 +51,6 @@ "stepExecuteStaticAnalysis": "1", "stepFixStoragePermissions": false, "stepInstallStaticAnalysis": true, - "matrixLaravelVersionsString": "[ '10.*' ]" + "matrixLaravelVersionsString": "[ '11.*' ]" } diff --git a/resources/templates/json/laravelpostgresql.json b/resources/templates/json/laravelpostgresql.json index f920077..6db4e6b 100644 --- a/resources/templates/json/laravelpostgresql.json +++ b/resources/templates/json/laravelpostgresql.json @@ -12,8 +12,8 @@ "on_pullrequest": false, "stepGenerateKey": true, "stepPhpVersions": [ - "8.2", - "8.1" + "8.3", + "8.2" ], "on_push_branches": [ "main", @@ -26,7 +26,7 @@ "mysqlPasswordType": "skip", "postgresqlVersion": "latest", "stepCachePackages": true, - "stepNodejsVersion": "18.x", + "stepNodejsVersion": "20.x", "stepRunMigrations": true, "postgresqlDatabase": "postgresql", "postgresqlPassword": "postgres", @@ -36,7 +36,7 @@ "stepEnvTemplateFile": ".env.example", "matrixLaravelVersions": [], "stepDirStaticAnalysis": "app", - "stepPhpVersionsString": "[ '8.2','8.1' ]", + "stepPhpVersionsString": "[ '8.3','8.2' ]", "postgresqlDatabaseName": "db_test_laravel", "postgresqlDatabasePort": 55432, "postgresqlPasswordType": "hardcoded", diff --git a/resources/templates/json/phppackage.json b/resources/templates/json/phppackage.json index dee680b..ad0b9d5 100644 --- a/resources/templates/json/phppackage.json +++ b/resources/templates/json/phppackage.json @@ -12,8 +12,8 @@ "on_pullrequest": false, "stepGenerateKey": false, "stepPhpVersions": [ - "8.2", - "8.1" + "8.3", + "8.2" ], "on_push_branches": [ "master", @@ -27,7 +27,7 @@ "mysqlPasswordType": "skip", "postgresqlVersion": "latest", "stepCachePackages": false, - "stepNodejsVersion": "18.x", + "stepNodejsVersion": "20.x", "stepRunMigrations": false, "postgresqlDatabase": "postgresql", "postgresqlPassword": "postgres", @@ -37,7 +37,7 @@ "stepEnvTemplateFile": ".env.example", "matrixLaravelVersions": [], "stepDirStaticAnalysis": "src", - "stepPhpVersionsString": "[ '8.2','8.1' ]", + "stepPhpVersionsString": "[ '8.3','8.2' ]", "postgresqlDatabaseName": "db_test_laravel", "postgresqlDatabasePort": 55432, "postgresqlPasswordType": "hardcoded", diff --git a/resources/views/livewire/configurator-form.blade.php b/resources/views/livewire/configurator-form.blade.php index 999db00..e585e65 100644 --- a/resources/views/livewire/configurator-form.blade.php +++ b/resources/views/livewire/configurator-form.blade.php @@ -299,7 +299,7 @@ model="stepPhpVersions" name="stepPhpVersions" label="PHP Versions" - :list="['8.2' => '8.2', '8.1' => '8.1', '8.0'=>'8.0','7.4'=>'7.4','7.3'=>'7.3']" + :list="['8.3' => '8.3', '8.2' => '8.2', '8.1' => '8.1', '8.0'=>'8.0','7.4'=>'7.4','7.3'=>'7.3']" help="Select PHP Versions (Multiple)" multiselect=1> @@ -317,8 +317,8 @@ model="stepNodejsVersion" name="stepNodejsVersion" label="Node Js Version" - help="Define the nodejs Version. 19.x is the last stable and it is the default value. -Select 18.x if you want to use LTS version."> + help="Define the nodejs Version. 21.x is the latest stable version. +Select 20.x if you want to use LTS version and it is the default value."> diff --git a/resources/views/livewire/form/laravel-stuff.blade.php b/resources/views/livewire/form/laravel-stuff.blade.php index ce1d54d..dce04f6 100644 --- a/resources/views/livewire/form/laravel-stuff.blade.php +++ b/resources/views/livewire/form/laravel-stuff.blade.php @@ -14,8 +14,8 @@ model="matrixLaravelVersions" name="matrixLaravelVersions" label="Laravel Versions" - :list="['10.*'=>'10.*', '9.*'=>'9.*', '8.*'=>'8.*','7.*'=>'7.*','6.*'=>'6.*']" - help="Select Laravel Versions (Multiple). This is useful if you are building a package and want to test your package with Laravel 10, 9, 8 , 7 and 6" + :list="['11.*'=>'11.*', '10.*'=>'10.*', '9.*'=>'9.*', '8.*'=>'8.*','7.*'=>'7.*','6.*'=>'6.*']" + help="Select Laravel Versions (Multiple). This is useful if you are building a package and want to test your package with Laravel 11, 10, 9, 8 , 7 and 6" multiselect=1>