Skip to content

feat: add Laravel 13 support - #1

Merged
lam0819 merged 3 commits into
mainfrom
feat/laravel-13-support
Sep 12, 2026
Merged

lam0819 merged 3 commits into
mainfrom
feat/laravel-13-support

Conversation

@lam0819

@lam0819 lam0819 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

The HRM / Talent Management build (solutionforest/hrm-management) runs on Laravel 13 and wants this package for its approval workflow. It currently caps at ^12, so it cannot be installed there at all.

What changed

  • laravel/framework^11.0|^12.0|^13.0
  • Dev tooling widened to the versions that work alongside it: Testbench ^11, Pest ^4, Larastan ^3 with PHPStan ^2
  • CI matrix gains Laravel 13

No source changes were needed. The whole suite passes on Laravel 13 as it stands — 61 tests, 182 assertions.

PHP 8.2 stays supported for existing Laravel 11/12 users. Composer already refuses Laravel 13 on 8.2 because the framework itself requires 8.3, and the matrix excludes that cell rather than failing it.

Two things the newer tooling surfaced

  • PHPStan 2 reports trait.unused for HasWorkflowStates and CanManageWorkflowStates. Those traits are the package's public API — used by the applications that install it, not from within src — so the identifier is ignored with that reason recorded rather than the traits being moved or the level dropped.
  • Pint was already failing on main (three models want fully_qualified_strict_types / ordered_imports). Fixed here so the pipeline is green rather than leaving a red job that this PR appears to have caused.

Verified

./vendor/bin/pest                    61 passed (Laravel 13.31, Testbench 11.2)
./vendor/bin/phpstan analyse         level 5, no errors
./vendor/bin/pint --test             clean

One note for the maintainer

This package isn't published on Packagist — composer require solution-forest/workflow-state-machine fails. Consumers have to add a VCS repository entry by hand. Worth publishing if it's meant to be reused across projects; happy to open a separate PR for the release workflow if useful.

🤖 Generated with Claude Code

Widen the framework constraint to accept Laravel 13, and the dev tooling
to the versions that work alongside it (Testbench 11, Pest 4, Larastan 3
with PHPStan 2).

No source changes were needed: the whole suite passes on Laravel 13 as
it stands, 61 tests.

PHP 8.2 stays supported for existing Laravel 11 and 12 users. Composer
already refuses Laravel 13 there because the framework itself requires
8.3, and the CI matrix excludes that cell rather than failing it.

Two things the newer tooling surfaced:

- PHPStan 2 reports `trait.unused` for HasWorkflowStates and
  CanManageWorkflowStates. Those traits are the package's public API,
  used by the applications that install it rather than from within src,
  so the identifier is ignored with that reason recorded.
- The current Pint release wants `fully_qualified_strict_types` and
  `ordered_imports` on three models. That was already failing on main
  before this change; fixed here so the pipeline is green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lam0819
lam0819 added this pull request to stack #3 September 12, 2026 01:41
lam0819 and others added 2 commits September 12, 2026 09:50
…el 11

The failing job was my fault twice over, and uncovered a third problem
that predates this branch.

1. I committed a composer.lock resolved for Laravel 13 on PHP 8.5. Every
   older cell then failed at `composer install` because Symfony 8.1
   requires PHP >= 8.4.1. A library resolves against the consuming
   application, so the lock is no longer committed.

2. The workflow ran `composer install` from that lock, which means the
   laravel-versions matrix has never installed the version in the job
   name — every cell tested whatever the lock happened to hold. It now
   requires the matrix version and updates, and prints what it installed
   so the job cannot silently drift again.

3. With the matrix actually applied, Laravel 11 does not resolve at all:
   every v11 release is flagged by Packagist security advisories, so
   Composer refuses the line. Claiming ^11.0 support meant claiming
   support for something nobody can install safely, so the constraint and
   the matrix drop to ^12.0|^13.0.

The vendor directory is no longer cached and the download cache is keyed
per matrix cell. Without a lock file the old keys collapsed to one value,
so cells would have restored each other's dependencies.

PHPStan's memory limit goes to 1G; 256M is not enough for Larastan 3.

Verified locally on both remaining cells: 61 tests, PHPStan and Pint
green on Laravel 12.69 and 13.31.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The diagnostic step I added to prove which Laravel version each matrix
cell installs used `composer show a b c`, which the command rejects.
Dependency resolution itself was already working; only the line that
reports it failed. `composer show --direct` lists them all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lam0819
lam0819 merged commit fa00f44 into main Sep 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant