From e097148217ad6490b763679b203c280f6ee5f542 Mon Sep 17 00:00:00 2001 From: tonyyb Date: Fri, 22 Mar 2024 11:45:09 +0100 Subject: [PATCH] Laravel 11 compatibility * Upgrade support for PHP >= 8.2 * Upgrade dependencies * Add github flow --- .github/workflows/main.yml | 43 +++++++++++++++++++++++++++++++++ README.md | 4 ++- composer.json | 10 ++++---- src/Console/Database/Create.php | 2 +- 4 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..249382d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +name: Novius CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + lint-php: + + runs-on: ubuntu-latest + + steps: + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - name: Lint PHP code via Laravel Pint + run: composer run-script lint + + test-app: + runs-on: ubuntu-latest + + steps: + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - name: Run tests + run: composer test diff --git a/README.md b/README.md index a5abe73..e21b7dc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ This package contains some useful Artisan commands. ## Requirements -This version is compatible with Laravel 10 and PHP >= 8.1. +This version is compatible with Laravel 11 and PHP >= 8.2. + +For Laravel 10.0 please use 4.* version. For Laravel >= 7.0 and < 10.0 please use 3.* version. diff --git a/composer.json b/composer.json index b69fc1c..9c9c723 100644 --- a/composer.json +++ b/composer.json @@ -17,13 +17,13 @@ } ], "require": { - "php": "^8.1", - "laravel/framework": "~10.0" + "php": "^8.2", + "laravel/framework": "~11.0" }, "require-dev": { - "laravel/pint": "^1.0", - "phpunit/phpunit": "^10.0", - "orchestra/testbench": "^8.0" + "laravel/pint": "^v1.14", + "phpunit/phpunit": "^11.0", + "orchestra/testbench": "^v9.0" }, "autoload": { "psr-4": { diff --git a/src/Console/Database/Create.php b/src/Console/Database/Create.php index 49f3ee7..2e0a2b0 100644 --- a/src/Console/Database/Create.php +++ b/src/Console/Database/Create.php @@ -72,7 +72,7 @@ public function handle() /** * Dynamicaly change "database" key into database config, and rebound "db". * - * @param $databaseName string + * @param $databaseName string * @return void */ protected function changeDatabaseName(string $databaseName)