Skip to content

Commit 580f35f

Browse files
committed
Setup for PHP 8.2
commit 650d0a6 Author: Peter Fox <[email protected]> Date: Wed Nov 9 20:57:01 2022 +0000 refactor to improve 8.2 circumstances commit ca90622 Author: Peter Fox <[email protected]> Date: Wed Nov 9 20:32:03 2022 +0000 Running tests under PHP 8.2
1 parent 8c1c130 commit 580f35f

File tree

4 files changed

+31
-9
lines changed

4 files changed

+31
-9
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup PHP
2323
uses: shivammathur/setup-php@v2
2424
with:
25-
php-version: 8.1
25+
php-version: 8.2
2626
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql
2727
tools: composer:v2
2828
coverage: pcov

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.0'
19+
php-version: 8.2
2020
coverage: none
2121

2222
- name: Install composer dependencies

.github/workflows/pint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Check & fix styling
22

3-
on: [push]
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'pint.json'
48

59
jobs:
610
pint:

.github/workflows/run-tests.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,21 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ ubuntu-latest ]
16-
php: [ 8.0, 8.1 ]
16+
php: [ 8.0, 8.1, 8.2 ]
1717
laravel: [ 9.*, 8.* ]
1818
cockroachdb: [ v21.2.15, v22.1.7 ]
19-
stability: [ prefer-stable, prefer-lowest ]
19+
dependencies: [ stable, lowest ]
2020
include:
2121
- laravel: 9.*
2222
testbench: ^7.0
2323
- laravel: 8.*
2424
testbench: ^6.24
25+
- php: 8.2
26+
dependencies: lowest
27+
dotenv: ^5.5.0
28+
carbon: ^2.62.1
2529

26-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - crdb.${{ matrix.cockroachdb }} ${{ matrix.os }}
30+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - crdb.${{ matrix.cockroachdb }} ${{ matrix.os }}
2731

2832
steps:
2933
- name: Checkout code
@@ -47,10 +51,24 @@ jobs:
4751
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
4852
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
4953
54+
- name: Require Laravel Version
55+
run: >
56+
composer require
57+
"laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}"
58+
--no-interaction --no-update
59+
60+
- name: Require Minimum Packages for version
61+
if: ${{ matrix.php == '8.2' && matrix.dependencies == 'lowest' }}
62+
run: >
63+
composer require
64+
"vlucas/phpdotenv:${{ matrix.dotenv }}" "nesbot/carbon:${{ matrix.carbon }}"
65+
--no-interaction --no-update
66+
5067
- name: Install dependencies
51-
run: |
52-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
53-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
68+
uses: ramsey/composer-install@v2
69+
with:
70+
dependency-versions: ${{ matrix.dependencies }}
71+
composer-options: ${{ matrix.composer-options }}
5472

5573
- name: Configure Database
5674
run: |

0 commit comments

Comments
 (0)