From 71d3b034d822d20e52be0fc9b0173b276470f35e Mon Sep 17 00:00:00 2001 From: korridor <26689068+korridor@users.noreply.github.com> Date: Wed, 9 Feb 2022 12:34:30 +0100 Subject: [PATCH] Added laravel 9 support --- .gitignore | 1 + .php_cs => .php-cs-fixer.php | 2 +- .travis.yml | 22 +++++++++------------- composer.json | 15 +++++++-------- readme.md | 9 +++++---- 5 files changed, 23 insertions(+), 26 deletions(-) rename .php_cs => .php-cs-fixer.php (87%) diff --git a/.gitignore b/.gitignore index 48dae9d..d618a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ vendor coverage composer.lock .php_cs.cache +.php-cs-fixer.cache .phpunit.result.cache diff --git a/.php_cs b/.php-cs-fixer.php similarity index 87% rename from .php_cs rename to .php-cs-fixer.php index 398a1a5..4ca1909 100644 --- a/.php_cs +++ b/.php-cs-fixer.php @@ -1,6 +1,6 @@ setRiskyAllowed(false) ->setRules([ '@PSR2' => true, diff --git a/.travis.yml b/.travis.yml index e36d9d4..9286e70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,34 +4,30 @@ cache: language: php +dist: bionic + matrix: include: - # Laravel 5.8.* - - php: 7.2 - env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml.old' - - php: 7.3 - env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml.old' # Laravel 6.* - - php: 7.2 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml.old' - php: 7.3 env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' # Laravel 7.* - - php: 7.2 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml.old' - php: 7.3 env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' - php: 7.4 env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' # Laravel 8.* - - php: 7.3 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' - - php: 7.4 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest' PHP_UNIT_CONFIG='phpunit.xml' - php: 7.4 env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' - php: 8.0 env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' + - php: 8.1.0 + env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' + # Laravel 9.* + - php: 8.0 + env: LARAVEL='9.*' TESTBENCH='7.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' + - php: 8.1.0 + env: LARAVEL='9.*' TESTBENCH='7.*' COMPOSER_FLAGS='--prefer-stable' PHP_UNIT_CONFIG='phpunit.xml' fast_finish: true before_install: diff --git a/composer.json b/composer.json index c40e1cf..d41a708 100644 --- a/composer.json +++ b/composer.json @@ -10,18 +10,17 @@ "email": "26689068+korridor@users.noreply.github.com" } ], - "minimum-stability": "stable", "require": { - "php": "^7.2|^8.0", - "composer/composer": "^1.10 || ^2", - "illuminate/console": "^5.8|^6|^7|^8", - "illuminate/database": "^5.8|^6|^7|^8", - "illuminate/support": "^5.8|^6|^7|^8" + "php": "^7.2|^8", + "composer/composer": "^2", + "illuminate/console": "^5.8|^6|^7|^8|^9", + "illuminate/database": "^5.8|^6|^7|^8|^9", + "illuminate/support": "^5.8|^6|^7|^8|^9" }, "require-dev": { - "orchestra/testbench": "^3.6|^4.0|^5.0|^6.0", + "orchestra/testbench": "^3.6|^4.0|^5.0|^6.0|^7.0", "phpunit/phpunit": "^7.0|^8.0|^9.0", - "friendsofphp/php-cs-fixer": "^2.16", + "friendsofphp/php-cs-fixer": "2.*|^3", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { diff --git a/readme.md b/readme.md index 7b9e556..612f11e 100644 --- a/readme.md +++ b/readme.md @@ -21,11 +21,12 @@ composer require korridor/laravel-computed-attributes ### Requirements -This package is tested for the following Laravel versions: +This package is tested for the following Laravel and PHP versions: - - 8.* (PHP 7.3, 7.4, 8.0) - - 7.* (PHP 7.2, 7.3, 7.4) - - 6.* (PHP 7.2, 7.3) + - 9.* (PHP 8.0, 8.1) + - 8.* (PHP 7.4, 8.0, 8.1) + - 7.* (PHP 7.3, 7.4) + - 6.* (PHP 7.3) ## Usage examples