Skip to content

Commit 650d0a6

Browse files
committed
refactor to improve 8.2 circumstances
1 parent ca90622 commit 650d0a6

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

.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: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ jobs:
1616
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: |

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
"require": {
1919
"php": "^8.0",
2020
"spatie/laravel-package-tools": "^1.9.2",
21-
"illuminate/contracts": "9.*|8.*",
22-
"vlucas/phpdotenv": "^5.5.0",
23-
"nesbot/carbon": "^2.62.1"
21+
"illuminate/contracts": "9.*|8.*"
2422
},
2523
"require-dev": {
2624
"doctrine/dbal": "^3.2",

0 commit comments

Comments
 (0)