Skip to content

Commit

Permalink
Allow Symfony 7 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas authored Nov 30, 2023
1 parent 2489aa3 commit a26825e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 38 deletions.
64 changes: 33 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: 8.2
php-version: 8.3

- name: "Install Dependencies with Composer"
uses: ramsey/composer-install@v2
Expand All @@ -33,13 +33,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: 8.1
php-version: 8.3
tools: cs2pr

- name: "Install Dependencies with Composer"
Expand All @@ -53,45 +53,47 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dependencies: ['highest']
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
include:
- php-version: 7.4
composer-flags: --prefer-stable --prefer-lowest
dependencies: 'lowest'
- php-version: 8.0
composer-flags: --prefer-stable --prefer-lowest
dependencies: 'lowest'
- php-version: 8.1
composer-flags: --prefer-stable --prefer-lowest
dependencies: 'lowest'
- php-version: 8.2
composer-flags: --prefer-stable --prefer-lowest
- php-version: 7.4
symfony-version: 5.4.*
- php-version: 8.0
symfony-version: 6.0.*
- php-version: 8.1
symfony-version: 6.0.*
- php-version: 8.2
symfony-version: 6.0.*
dependencies: 'lowest'
- php-version: 8.3
dependencies: 'lowest'
- php-version: 8.2
symfony-version: 6.1.*
symfony-version: 6.3.*
- php-version: 8.2
symfony-version: 6.2.*
symfony-version: 6.4.*
- php-version: 8.3
symfony-version: 6.3.*
- php-version: 8.3
symfony-version: 6.4.*
- php-version: 8.3
symfony-version: 7.0.*
steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
- name: "Install dependencies (fixed Symfony version) with composer"
if: matrix.symfony-version
run: |
composer remove --dev friendsofphp/php-cs-fixer
composer require symfony/options-resolver:${{ matrix.symfony-version }} --no-interaction --no-update
composer update --no-interaction --no-progress --no-suggest
- name: "Install dependencies (lowest dependencies) with composer"
if: matrix.composer-flags
run: |
composer update ${{ matrix.composer-flags }} --no-interaction --no-progress --no-suggest
tools: flex
coverage: none

- name: "Install Dependencies with Composer"
uses: ramsey/composer-install@v2
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
with:
composer-options: "--optimize-autoloader"
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run tests with PHPUnit"
env:
Expand All @@ -103,13 +105,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
coverage: pcov
php-version: 8.2
php-version: 8.3

- name: "Install Dependencies with Composer"
uses: ramsey/composer-install@v2
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"psr/http-factory": "^1.0",
"psr/http-factory-implementation": "^1.0",
"symfony/deprecation-contracts": "^2.1|^3.0",
"symfony/options-resolver": "^4.4|^5.0|^6.0"
"symfony/options-resolver": "^4.4|^5.0|^6.0|^7.0"
},
"require-dev": {
"nyholm/psr7": "^1.5.1",
"php-cs-fixer/shim": "^3.13.2",
"phpstan/phpstan": "^1.9.3",
"phpstan/phpstan-phpunit": "^1.3.2",
"symfony/http-client": "^5.0|^6.2",
"symfony/phpunit-bridge": "^5.3|^6.2"
"nyholm/psr7": "^1.8.1",
"php-cs-fixer/shim": "^v3.40.0",
"phpstan/phpstan": "^1.10.46",
"phpstan/phpstan-phpunit": "^1.3.15",
"symfony/http-client": "^5.0|^6.2|^7.0",
"symfony/phpunit-bridge": "^5.3|^6.2|^7.0"
},
"autoload": {
"psr-4": { "OneSignal\\": "src/" }
Expand Down

0 comments on commit a26825e

Please sign in to comment.