Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for PHP 8.2 ✨ #2359

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ branchProtectionRules:
- pattern: master
isAdminEnforced: true
requiredStatusCheckContexts:
- 'PHP 5.6 Unit Test'
- 'PHP 5.6 --prefer-lowest Unit Test'
- 'PHP 7.0 Unit Test'
- 'PHP 7.1 Unit Test'
- 'PHP 7.2 Unit Test'
- 'PHP 7.3 Unit Test'
- 'PHP 7.4 Unit Test'
- 'PHP 8.0 Unit Test'
- 'PHP 8.0 --prefer-lowest Unit Test'
- 'PHP 5.6 prefer-lowest'
- 'PHP 5.6 prefer-stable'
- 'PHP 7.0 prefer-stable'
- 'PHP 7.1 prefer-stable'
- 'PHP 7.2 prefer-stable'
- 'PHP 7.3 prefer-stable'
- 'PHP 7.4 prefer-lowest'
- 'PHP 7.4 prefer-stable'
- 'PHP 8.0 prefer-lowest'
- 'PHP 8.0 prefer-stable'
- 'PHP 8.1 prefer-stable'
- 'PHP 8.2 prefer-lowest'
- 'PHP 8.2 prefer-stable'
- 'PHP Style Check'
- 'cla/google'
requiredApprovingReviewCount: 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/asset-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php: [ "5.6", "7.0", "7.4", "8.0" ]
php: [ "5.6", "7.0", "7.4", "8.0", "8.1", "8.2" ]

name: Upload Release Assets
steps:
Expand All @@ -33,7 +33,7 @@ jobs:
php-version: ${{ matrix.php }}

- name: Install Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Install Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
Expand Down
51 changes: 33 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Test Suite
name: Tests

on:
push:
branches:
Expand All @@ -12,42 +13,56 @@ jobs:
fail-fast: false
matrix:
php: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2" ]
composer-flags: [""]
include:
- php: "5.6"
composer-flags: "--prefer-lowest "
- php: "8.0"
composer-flags: "--prefer-lowest "
name: PHP ${{ matrix.php }} ${{ matrix.composer-flags }}Unit Test
stability: [prefer-lowest, prefer-stable]
exclude:
- php: "7.0"
stability: prefer-lowest
- php: "7.1"
stability: prefer-lowest
- php: "7.2"
stability: prefer-lowest
- php: "7.3"
stability: prefer-lowest
- php: "8.1"
stability: prefer-lowest

name: PHP ${{ matrix.php }} ${{ matrix.stability }}

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: ${{ matrix.php }}
coverage: none

- name: Install Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: composer update ${{ matrix.composer-flags }}
- if: ${{ matrix.php == '8.0' && matrix.composer-flags == '--prefer-lowest ' }}
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- if: ${{ matrix.stability == 'prefer-lowest' }}
name: Update guzzlehttp/ringphp dependency
run: composer update guzzlehttp/ringphp

- name: Run Script
run: vendor/bin/phpunit

style:
runs-on: ubuntu-latest
name: PHP Style Check
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.3"
php-version: "8.1"
- name: Install Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
Expand All @@ -58,11 +73,11 @@ jobs:
runs-on: ubuntu-latest
name: PHPStan Static Analysis
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.2'
- name: Run Script
run: |
composer install
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"composer/composer": "^1.10.22",
"yoast/phpunit-polyfills": "^1.0",
"phpspec/prophecy-phpunit": "^1.1||^2.0",
"phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
"phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.5.20 || ^8.5.23 || ^9.0"
},
"suggest": {
"cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)"
Expand Down
1 change: 1 addition & 0 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public function offsetExists($offset)
}

/** @return mixed */
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if (!is_numeric($offset)) {
Expand Down