From 9fd3fc8d8b9281efc25dfeaea6fde9b987e96e35 Mon Sep 17 00:00:00 2001 From: Jay Klehr Date: Thu, 18 Apr 2024 12:12:38 -0600 Subject: [PATCH] Preparing for PHP 8.3 --- .github/workflows/build.yml | 84 ++++++++++----------- .github/workflows/dependabot-auto-merge.yml | 2 +- composer.json | 8 +- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4ab81b..c310b16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,45 +1,45 @@ name: Build on: - push: - branches: - - master - pull_request: - branches: - - master + push: + branches: + - master + pull_request: + branches: + - master jobs: - build: - name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-args }} - strategy: - fail-fast: false - matrix: - operating-system: [ubuntu-latest] - php-versions: ['7.4', '8.0', '8.1', '8.2'] - composer-args: ['', '--prefer-lowest'] - runs-on: ${{ matrix.operating-system }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup PHP - uses: shivammathur/setup-php@2.25.1 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring - tools: cs2pr - - name: Get composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}-${{ hashFiles('**/composer.json') }} - restore-keys: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}- - - name: Install Dependencies - run: | - composer update --no-progress --no-suggest --prefer-stable --optimize-autoloader ${{ matrix.composer-args }} - - name: PHPStan - run: composer phpstan - - name: Code Style Check - env: - PHP_CS_FIXER_IGNORE_ENV: true - run: composer style-check -- --format=checkstyle | cs2pr + build: + name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-args }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest] + php-versions: ["8.0", "8.1", "8.2", "8.3"] + composer-args: ["", "--prefer-lowest"] + runs-on: ${{ matrix.operating-system }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@2.30.2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring + tools: cs2pr + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}-${{ hashFiles('**/composer.json') }} + restore-keys: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}- + - name: Install Dependencies + run: | + composer update --no-progress --no-suggest --prefer-stable --optimize-autoloader ${{ matrix.composer-args }} + - name: PHPStan + run: composer phpstan + - name: Code Style Check + env: + PHP_CS_FIXER_IGNORE_ENV: true + run: composer style-check -- --format=checkstyle | cs2pr diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index cc4b7bf..3aaaca1 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1 + uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-merge for Dependabot PRs diff --git a/composer.json b/composer.json index 4e46827..34a7bef 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "license": "BSD-3-Clause", "prefer-stable": true, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "diablomedia/zendframework1-ldap": "^1.0.0", "diablomedia/zendframework1-validate": "^1.0.0" }, @@ -20,10 +20,10 @@ } }, "require-dev": { - "phpstan/phpstan": "1.10.15", - "friendsofphp/php-cs-fixer": "3.16.0", + "phpstan/phpstan": "1.10.67", + "friendsofphp/php-cs-fixer": "3.54.0", "maglnet/composer-require-checker": "^3.0.0", - "phpro/grumphp-shim": "^1.5.0" + "phpro/grumphp-shim": "^2.0.0" }, "scripts": { "phpstan": "phpstan analyze -c phpstan.neon --no-progress --ansi",