Skip to content
Open
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
34 changes: 33 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,30 @@ jobs:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
stability: [prefer-lowest, prefer-stable]
laravel: [9.x, 10.x, 11.x, 12.x]
laravel: [9.x, 10.x, 11.x, 12.x, 13.x]
exclude:
- laravel: 11.x
php: 8.1
- laravel: 12.x
php: 8.1
# Laravel 13 requires PHP ^8.3
- laravel: 13.x
php: 8.1
- laravel: 13.x
php: 8.2
include:
# Laravel 13 accepts symfony/console ^7.4 || ^8.0, and symfony/console 8
# requires PHP >= 8.4.1. So PHP 8.3 can only resolve Symfony 7, and PHP 8.4
# resolves Symfony 8. Both paths must work; these cells pin that contract so
# a future resolution change cannot silently drop one of them.
- laravel: 13.x
php: 8.3
stability: prefer-stable
symfony_major: 7
- laravel: 13.x
php: 8.4
stability: prefer-stable
symfony_major: 8

name: L${{ matrix.laravel }} - PHP ${{ matrix.php }} - ${{ matrix.stability }}

Expand All @@ -39,12 +57,26 @@ jobs:
composer config -g audit.block-insecure false
composer create-project --prefer-dist laravel/laravel=${{ matrix.laravel }} laravel-${{ matrix.laravel }} --no-interaction --no-audit

# Deliberately no -W. If Lucid's Symfony constraint is ever too narrow for the
# host's resolved version, this must fail loudly. With -W, Composer would
# instead silently downgrade the host application's Symfony - which is the
# exact bug this change fixes.
- name: Require Lucid
run: |
cd laravel-${{ matrix.laravel }}
composer config repositories.lucid '{"type": "path", "url": "$GITHUB_WORKSPACE", "options": {"symlink": true}}'
composer require lucidarch/lucid:@dev --no-audit

- name: Assert resolved Symfony major
if: matrix.symfony_major
run: |
cd laravel-${{ matrix.laravel }}
MAJOR=$(composer show --format=json symfony/console \
| php -r '$v = json_decode(stream_get_contents(STDIN), true)["versions"][0]; echo explode(".", ltrim($v, "v"))[0];')
echo "resolved symfony/console major: $MAJOR (expected ${{ matrix.symfony_major }})"
[ "$MAJOR" = "${{ matrix.symfony_major }}" ] \
|| { echo "::error::expected Symfony ${{ matrix.symfony_major }}, resolved $MAJOR"; exit 1; }

- name: Run Tests
run: |
chmod +x $GITHUB_WORKSPACE/bin/test-commands.sh
Expand Down
14 changes: 9 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `lucidarch/lucid` Composer package — the actual library that implements th

**Current version:** 2.0.0 (in progress — see upgrade plan)
**Packagist name:** `lucidarch/lucid`
**PHP:** ^8.1 | **Laravel:** 9.x, 10.x, 11.x, 12.x
**PHP:** ^8.1 | **Laravel:** 9.x, 10.x, 11.x, 12.x, 13.x

---

Expand Down Expand Up @@ -84,7 +84,7 @@ There are no PHPUnit tests in the package source itself — tests are integratio
**`bin/test-local.sh`** — run this for local development. Requires a sibling `../Testbench/` directory.

```sh
# Test all versions (9.x 10.x 11.x 12.x)
# Test all versions (9.x 10.x 11.x 12.x 13.x)
./bin/test-local.sh

# Test a single version
Expand Down Expand Up @@ -115,8 +115,12 @@ FRESH=1 ./bin/test-local.sh 11.x

### CI (GitHub Actions)

Matrix: PHP 8.1/8.2/8.3/8.4 × Laravel 9.x/10.x/11.x/12.x × prefer-lowest/prefer-stable.
Exclusions: Laravel 11+ requires PHP 8.2+; Laravel 12+ requires PHP 8.2+.
Matrix: PHP 8.1/8.2/8.3/8.4 × Laravel 9.x/10.x/11.x/12.x/13.x × prefer-lowest/prefer-stable.
Exclusions: Laravel 11+ requires PHP 8.2+; Laravel 12+ requires PHP 8.2+; Laravel 13 requires PHP 8.3+.

Two `include:` cells pin the Symfony major on Laravel 13 — PHP 8.3 → 7, PHP 8.4 → 8, `prefer-stable`
only — asserted by the "Assert resolved Symfony major" step. `symfony/console` 8 requires PHP >= 8.4.1,
which is what makes that split deterministic.

---

Expand Down Expand Up @@ -185,7 +189,7 @@ Critical items already addressed (verify before assuming done):
- `src/Units/Model.php` — explicit `Illuminate\Database\Eloquent\Model` import
- `src/Bus/UnitDispatcher.php` — explicit `Illuminate\Support\Facades\App` import
- `bin/test-commands.sh` — Laravel 11 path conditionals
- `.github/workflows/tests.yml` — updated matrix (PHP 8.1–8.4, Laravel 9–12)
- `.github/workflows/tests.yml` — updated matrix (PHP 8.1–8.4, Laravel 9–13)

---

Expand Down
2 changes: 1 addition & 1 deletion bin/test-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
if [[ $# -gt 0 ]]; then
VERSIONS=($@)
else
VERSIONS=(9.x 10.x 11.x 12.x)
VERSIONS=(9.x 10.x 11.x 12.x 13.x)
fi

# Safe removal: only removes a direct laravel-* child of TESTBENCH_DIR
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"require": {
"php": "^8.1",
"ext-dom": "*",
"symfony/console": "^5.4|^6.0|^7.0",
"symfony/filesystem": "^5.4|^6.0|^7.0",
"symfony/finder": "^5.4|^6.0|^7.0",
"symfony/process": "^5.4|^6.0|^7.0"
"symfony/console": "^5.4|^6.0|^7.0|^8.0",
"symfony/filesystem": "^5.4|^6.0|^7.0|^8.0",
"symfony/finder": "^5.4|^6.0|^7.0|^8.0",
"symfony/process": "^5.4|^6.0|^7.0|^8.0"
},
"require-dev": {
"mockery/mockery": "^1.5"
Expand Down
2 changes: 1 addition & 1 deletion lucid
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ $commands = [
];

$app = new Symfony\Component\Console\Application('Lucid', '2.0.0');
array_walk($commands, [$app, 'add']);
$app->addCommands($commands);

$app->run();
2 changes: 1 addition & 1 deletion src/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ trait Command
*
* @return void
*/
protected function configure()
protected function configure(): void
{
$this
->setName($this->name)
Expand Down