Skip to content

Commit 580e48e

Browse files
authored
Feature/Add Laravel 12 support (#26)
Widen illuminate/collections constraint to ^11.0.0 || ^12.0.0, add PHP x Illuminate version matrix to CI (6 combinations), and update phpunit.xml for PHPUnit 11 compatibility.
1 parent 7658806 commit 580e48e

3 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/test.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ jobs:
6868
continue-on-error: true
6969

7070
test:
71-
name: Test (PHP ${{ matrix.php-version }})
71+
name: Test (PHP ${{ matrix.php-version }}, Illuminate ${{ matrix.illuminate }})
7272
runs-on: ubuntu-latest
7373
needs: [lint]
7474

7575
strategy:
7676
fail-fast: false
7777
matrix:
7878
php-version: ["8.2", "8.3", "8.4"]
79+
illuminate: ["^11.0", "^12.0"]
7980

8081
steps:
8182
- name: Checkout
@@ -92,17 +93,19 @@ jobs:
9293
uses: actions/cache@v4
9394
with:
9495
path: ~/.composer/cache
95-
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
96-
restore-keys: php-${{ matrix.php-version }}-composer-
96+
key: php-${{ matrix.php-version }}-illuminate-${{ matrix.illuminate }}-composer-${{ hashFiles('**/composer.json') }}
97+
restore-keys: php-${{ matrix.php-version }}-illuminate-${{ matrix.illuminate }}-composer-
9798

9899
- name: Install dependencies
99-
run: composer install --prefer-dist --no-progress
100+
run: |
101+
composer require "illuminate/collections:${{ matrix.illuminate }}" --no-update
102+
composer install --prefer-dist --no-progress
100103
101104
- name: Run tests
102105
run: composer test
103106

104107
- name: Upload coverage artifact
105-
if: matrix.php-version == '8.4'
108+
if: matrix.php-version == '8.4' && matrix.illuminate == '^12.0'
106109
uses: actions/upload-artifact@v4
107110
with:
108111
name: coverage-report

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"ext-json": "*",
1616
"ramsey/uuid": "^4.1.0",
1717
"nesbot/carbon": "^3.2.0",
18-
"illuminate/collections": "^11.0.0",
18+
"illuminate/collections": "^11.0.0 || ^12.0.0",
1919
"lambdish/phunctional": "^2.1.0",
2020
"doctrine/instantiator": "^2.0.0",
2121
"complex-heart/contracts": "^3.0.0"

phpunit.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
bootstrap="vendor/autoload.php"
44
colors="true"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
66
cacheDirectory=".phpunit.cache">
7-
<coverage>
8-
<report>
9-
<clover outputFile="./coverage.xml"/>
10-
</report>
11-
</coverage>
127
<testsuites>
138
<testsuite name="unit">
149
<directory>./tests</directory>

0 commit comments

Comments
 (0)