diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eac534c..5557fee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.3] + php: [8.4] runs-on: packages container: chialab/php:${{ matrix.php }} @@ -27,6 +27,7 @@ jobs: - name: Composer cache uses: actions/cache@v4 + if: ${{ !env.ACT }} with: path: vendor key: composer-${{ hashFiles('composer.json') }} @@ -40,13 +41,14 @@ jobs: php-cs-fixer: name: php-cs-fixer runs-on: packages - container: chialab/php:8.3 + container: chialab/php:8.4 steps: - name: Checkout code uses: actions/checkout@v4 - name: Composer cache uses: actions/cache@v4 + if: ${{ !env.ACT }} with: path: vendor key: composer-${{ hashFiles('composer.json') }} @@ -76,7 +78,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.3] + php: [8.4] runs-on: packages container: chialab/php:${{ matrix.php }} @@ -86,6 +88,7 @@ jobs: - name: Composer cache uses: actions/cache@v4 + if: ${{ !env.ACT }} with: path: vendor key: composer-${{ hashFiles('composer.json') }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d19c55e..ac3cbe0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,8 +2,8 @@ Here are some of the commands that you'll need: -- install dependencies: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer install` -- run tests with phpunit: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer test` -- reformat using php-cs-fixer: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer cs-fix` +- install dependencies: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.4 composer install` +- run tests with phpunit: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.4 composer test` +- reformat using php-cs-fixer: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.4 composer cs-fix` - reformat the rest with prettier: `docker run -it --rm -v $PWD:/app -w /app tmknom/prettier --write .` -- analyse with phpstan: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer phpstan` +- analyse with phpstan: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.4 composer phpstan` diff --git a/composer.json b/composer.json index d2b5815..8b7dae8 100644 --- a/composer.json +++ b/composer.json @@ -3,21 +3,21 @@ "description": "PHP data transfer objects", "license": "MIT", "require": { - "php": ">=8.2", + "php": ">=8.3", "ext-json": "*", "illuminate/support": "^9.0|^10.0|^11.0|^12.0", "spatie/macroable": "^1.0|^2.0", "tenantcloud/php-standard": "1.2 || ^1.4 || ^2.0" }, "require-dev": { - "pestphp/pest": "^2.8|^3.8", + "pestphp/pest": "^3.8", "orchestra/testbench": "^7.0|^8.5|^9.0|^10.0", - "php-cs-fixer/shim": "^3.54", - "tenantcloud/php-cs-fixer-rule-sets": "~3.3.1", - "phpstan/phpstan": "~1.10.21|^2.1.17", - "phpstan/phpstan-phpunit": "^1.3|^2.0", - "phpstan/phpstan-webmozart-assert": "^1.2|^2.0", - "phpstan/phpstan-mockery": "^1.1|^2.0" + "php-cs-fixer/shim": "^3.75", + "tenantcloud/php-cs-fixer-rule-sets": "~3.4.1", + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-webmozart-assert": "^2.0", + "phpstan/phpstan-mockery": "^2.0" }, "autoload": { "psr-4": { @@ -32,7 +32,7 @@ "scripts": { "test": "vendor/bin/pest", "coverage": "XDEBUG_MODE=coverage vendor/bin/pest --coverage-html coverage", - "cs-fix": "vendor/bin/php-cs-fixer fix -v --show-progress=dots", + "cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix -v --show-progress=dots", "phpstan": "vendor/bin/phpstan analyse --memory-limit=2G" }, "minimum-stability": "stable", diff --git a/phpstan.neon b/phpstan.neon index b4264fe..6f46732 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,4 +12,5 @@ parameters: - src ignoreErrors: - -'#Unsafe usage of new static\(\)\.#i' + - '#Unsafe usage of new static\(\)\.#i' + - '#Unsafe usage of new static\(\) in abstract class .* in static method create\(\).#'