diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index fd8a427..ff1380f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -119,7 +119,7 @@ jobs: uses: shivammathur/setup-php@v2 with: # Should be the lowest supported version - php-version: '8.1' + php-version: '8.2' extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml tools: composer coverage: none @@ -159,7 +159,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.2', '8.3', '8.4'] steps: - name: Setup PHP, with composer and extensions @@ -199,15 +199,15 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Run unit tests with coverage - if: ${{ matrix.php-versions == '8.3' }} + if: ${{ matrix.php-versions == '8.4' }} run: vendor/bin/phpunit - name: Run unit tests (no coverage) - if: ${{ matrix.php-versions != '8.3' }} + if: ${{ matrix.php-versions != '8.4' }} run: vendor/bin/phpunit --no-coverage - name: Save coverage data - if: ${{ matrix.php-versions == '8.3' }} + if: ${{ matrix.php-versions == '8.4' }} uses: actions/upload-artifact@v4 with: name: coverage-data @@ -221,7 +221,7 @@ jobs: fail-fast: true matrix: operating-system: [windows-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.2', '8.3', '8.4'] steps: - name: Setup PHP, with composer and extensions @@ -258,7 +258,7 @@ jobs: restore-keys: ${{ runner.os }}-composer- - name: Install Composer dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader --ignore-platform-req=ext-posix + run: composer install --no-progress --prefer-source --optimize-autoloader --ignore-platform-req=ext-posix - name: Run unit tests run: vendor/bin/phpunit --no-coverage diff --git a/composer.json b/composer.json index 26d042a..2455630 100644 --- a/composer.json +++ b/composer.json @@ -3,12 +3,12 @@ "description": "Ratelimit certain actions, such as username + password login", "type": "simplesamlphp-module", "require": { - "php": "^8.1", + "php": "^8.2", "ext-openssl": "*", - "simplesamlphp/assert": "~1.8", - "simplesamlphp/composer-module-installer": "~1.4", + "simplesamlphp/assert": "^1.8 || ~2.0", + "simplesamlphp/composer-module-installer": "~1.3.6 || ~1.4", "simplesamlphp/simplesamlphp": "~2.3", - "symfony/http-foundation": "^6.4" + "symfony/http-foundation": "^6.4 || ~7.4" }, "autoload": { "psr-4": { @@ -25,6 +25,12 @@ "simplesamlphp/simplesamlphp-test-framework": "~1.8" }, "config": { + "audit": { + "ignore": [ + "PKSA-4y26-97zb-p98g", + "PKSA-11bv-m3wk-h9sn" + ] + }, "allow-plugins": { "composer/package-versions-deprecated": true, "simplesamlphp/composer-module-installer": true, @@ -32,5 +38,14 @@ "phpstan/extension-installer": false, "simplesamlphp/composer-xmlprovider-installer": true } + }, + "scripts": { + "pre-commit": [ + "vendor/bin/phpunit --no-coverage --testdox", + "vendor/bin/phpcs -p" + ], + "tests": [ + "vendor/bin/phpunit --no-coverage" + ] } } diff --git a/phpunit.xml b/phpunit.xml index 678f923..062bc09 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,5 +1,5 @@ - +