feat: add Laravel 13 support - #1
Merged
Merged
Conversation
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
added this pull request to stack #3
September 12, 2026 01:41
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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^11, Pest^4, Larastan^3with PHPStan^2No 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
trait.unusedforHasWorkflowStatesandCanManageWorkflowStates. Those traits are the package's public API — used by the applications that install it, not from withinsrc— so the identifier is ignored with that reason recorded rather than the traits being moved or the level dropped.main(three models wantfully_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
One note for the maintainer
This package isn't published on Packagist —
composer require solution-forest/workflow-state-machinefails. 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