Skip to content

Commit

Permalink
Merge pull request #641 from Slamdunk/drop_old_php
Browse files Browse the repository at this point in the history
Drop support for PHP < 8.1, upgrade to PHPUnit 10
  • Loading branch information
asgrim authored Nov 21, 2023
2 parents 1e81084 + 04e7517 commit d5c7dcc
Show file tree
Hide file tree
Showing 8 changed files with 673 additions and 836 deletions.
83 changes: 18 additions & 65 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ jobs:
validate:
name: "Validate composer"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "8.1"

Expand Down Expand Up @@ -55,20 +52,15 @@ jobs:

needs: "validate"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down Expand Up @@ -97,20 +89,15 @@ jobs:

needs: "lint"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: ${{ matrix.experimental }}

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand All @@ -122,24 +109,16 @@ jobs:
experimental: [false]

include:
- operating-system: "ubuntu-20.04"
php-version: "8.0"
- php-version: "8.1"
dependencies: "locked"
experimental: false
- operating-system: "ubuntu-20.04"
php-version: "8.1"
- php-version: "8.2"
dependencies: "locked"
experimental: false
- operating-system: "ubuntu-20.04"
php-version: "8.2"
- php-version: "8.3"
dependencies: "locked"
experimental: false
- operating-system: "ubuntu-20.04"
php-version: "8.3"
dependencies: "locked"
experimental: false
- operating-system: "ubuntu-20.04"
php-version: "8.4"
- php-version: "8.4"
dependencies: "highest"
experimental: true

Expand Down Expand Up @@ -195,17 +174,14 @@ jobs:

needs: "lint"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "8.1"

Expand Down Expand Up @@ -242,20 +218,15 @@ jobs:

needs: "lint"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down Expand Up @@ -292,21 +263,16 @@ jobs:
name: "UnitTests with PHPUnit"

needs: "lint"

runs-on: "${{ matrix.operating-system }}"

runs-on: "ubuntu-latest"
continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down Expand Up @@ -344,20 +310,15 @@ jobs:

needs: "tests"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down Expand Up @@ -388,7 +349,7 @@ jobs:
composer-options: "${{ env.COMPOSER_OPTIONS }} --prefer-stable"

- name: "Collect code coverage with Xdebug and phpunit/phpunit"
run: "vendor/bin/phpunit -c phpunit.xml.dist --verbose --exclude-group compare --coverage-clover=coverage.clover --coverage-text --colors"
run: "vendor/bin/phpunit -c phpunit.xml.dist --exclude-group compare --coverage-clover=coverage.clover --coverage-text --colors"

- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v3.1.4"
Expand All @@ -402,20 +363,15 @@ jobs:

needs: "tests"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down Expand Up @@ -452,24 +408,21 @@ jobs:
cp /tmp/browscap.ini resources/browscap.ini
- name: "Compare get_browser to browscap-php results"
run: "vendor/bin/phpunit -c phpunit.xml.dist --verbose --no-coverage --group compare --colors"
run: "vendor/bin/phpunit -c phpunit.xml.dist --no-coverage --group compare --colors"

roave-backwards-compatibility-check:
name: "Check for Backward Compatibility breaks"

needs: "lint"

runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"

continue-on-error: false

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-20.04"

php-version:
- "8.1"

Expand All @@ -493,7 +446,7 @@ jobs:
tools: "${{ env.TOOLS }}"

- name: "Require Roave/BackwardCompatibilityCheck"
run: "composer require --no-update --no-interaction --prefer-dist --prefer-stable \"roave/backward-compatibility-check:^6.1.1\""
run: "composer require --no-update --no-interaction --prefer-dist --prefer-stable \"roave/backward-compatibility-check:^8\""

- name: "Update dependencies with composer"
uses: "ramsey/composer-install@v2"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
vendor/
.idea/
.phpunit.cache/
.buildpath
.settings
.project
Expand Down
32 changes: 16 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
"source": "https://github.com/browscap/browscap-php"
},
"require": {
"php": ">=7.4.3,<8.4.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.5.0",
"league/flysystem": "^2.5.0 || ^3.12.0",
"matthiasmullie/scrapbook": "^1.4.9",
"monolog/monolog": "^2.8.0 || ^3.2.0",
"psr/log": "^1.1.4 || ^2.0.0 || ^3.0.0",
"psr/simple-cache": "^1.0.1 || ^2.0.0 || ^3.0.0",
"symfony/console": "^v5.4.17 || ^v6.2.3",
"symfony/filesystem": "^v5.4.13 || ^v6.2.0"
"guzzlehttp/guzzle": "^7.8.0",
"league/flysystem": "^3.21.0",
"matthiasmullie/scrapbook": "^1.5.1",
"monolog/monolog": "^3.5.0",
"psr/log": "^2.0.0 || ^3.0.0",
"psr/simple-cache": "^2.0.0 || ^3.0.0",
"symfony/console": "^6.3.8",
"symfony/filesystem": "^6.3.1"
},
"require-dev": {
"doctrine/coding-standard": "^12.0.0",
"mikey179/vfsstream": "^v1.6.11",
"phpstan/extension-installer": "^1.2.0",
"phpstan/phpstan": "^1.9.4",
"phpstan/phpstan-beberlei-assert": "^1.0.1",
"phpstan/phpstan-deprecation-rules": "^1.1.1",
"phpstan/phpstan-phpunit": "^1.3.3",
"phpunit/phpunit": "^9.5.27"
"mikey179/vfsstream": "^1.6.11",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.43",
"phpstan/phpstan-beberlei-assert": "^1.1.2",
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.15",
"phpunit/phpunit": "^10.4.2"
},
"suggest": {
"ext-curl": "to use curl requests to get the ini file"
Expand Down
Loading

0 comments on commit d5c7dcc

Please sign in to comment.