feat: add support for Laravel 13 and PHP 8.5 - #20
Merged
Conversation
Widen `illuminate/contracts` to `^13.0` and allow `orchestra/testbench` `^11.0`, which is the Testbench line that targets Laravel 13. Extend the test matrix to PHP 8.5 and Laravel 13 (Testbench 11). Laravel 11 is excluded on PHP 8.5, as it predates that release and is not tested against it upstream. PHPStan and the tag/release workflow now run on the highest supported PHP. The `php` constraint stays `^8.0` — it already admits 8.5.
Three fixes to make `composer run rector` usable again: - `strictBooleans:` was removed from Rector's `withPreparedSets()` upstream, so the config threw `Unknown named parameter $strictBooleans` and the pre-commit hook aborted. The corresponding set no longer ships with Rector, so the flag is simply dropped. - Bump the PHP set from 8.4 to 8.5. - Skip `ForeachToArrayAnyRector` on `src/polyfills.php`. That polyfill *is* the PHP < 8.4 implementation of `array_any()`, so rewriting its body into a call to `array_any()` made it recurse forever.
11 tasks
alright
force-pushed
the
feat/laravel-13-php-8.5
branch
2 times, most recently
from
August 25, 2026 13:35
a823411 to
2f684eb
Compare
teofanis
approved these changes
Aug 26, 2026
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.
What / Why
Adds support for Laravel 13 and PHP 8.5 without dropping any currently supported version.
How
composer.jsonilluminate/contracts:^9.0||^10.0||^11.0||^12.0→…||^13.0orchestra/testbench(dev):^10.0.0||^9.0.0→^11.0.0||…(Testbench 11 is the line targeting Laravel 13)phpstays^8.0— it already admits 8.5, so no change was needed there.CI
run-tests.yml: matrix is nowphp: [8.5, 8.4]×laravel: [13.*, 12.*, 11.*], withtestbench: 11.*mapped to Laravel 13. Laravel 11 is excluded on PHP 8.5 since it predates that release and isn't tested against it upstream — 20 jobs, up from 8.phpstan.ymlandtag.yamlnow run on PHP 8.5.rector.php(separate commit,chore(rector): …— see notes below)No source changes were required: the suite runs clean on 8.5 with zero PHP deprecations.
Screenshots / Output (if applicable)
Ran locally against real installs on each new matrix combination (plus L11 as a regression check):
pest --display-deprecations --display-warnings --display-noticeson PHP 8.5 / Laravel 13: no deprecations reported.spatie/laravel-package-tools: ^1.16resolves to 1.93.x under Laravel 13, so no bump is needed there.Type of change
Checklist
composer test) — no new tests; the existing 47 cover the change, and they were run against every new matrix combination./vendor/bin/pint) —rector.phpis the only PHP file touched and it passespint --testvendor/composer/autoload_classmap.php(tests usehookpress.composer.classmap_path)Notes for reviewers
The second commit is tooling, split out so you can drop it if you'd rather handle it separately.
composer run rectoris currently broken on a fresh install, and one of its rules is actively dangerous:strictBooleans:has been removed from Rector'swithPreparedSets()upstream, sorector.phpthrowsUnknown named parameter $strictBooleansand thepre-commithook aborts. The set no longer ships with Rector, so the flag is just dropped.ForeachToArrayAnyRector(PHP 8.4 set) rewrites the body ofsrc/polyfills.php::array_any()into a call toarray_any()— i.e. infinite recursion. It's now skipped for that one file.Two things I deliberately left alone:
PHPStan reports 3 errors, but they already fail on
main. I checked outmainin a separate worktree, installed on PHP 8.4 / Laravel 12, and got the identical three. Sincecomposer.lockis gitignored, CI always resolves the newest larastan/PHPStan, so this is pre-existing drift rather than fallout from this PR:src/Commands/ShowCommand.php:21—is_string()on anon-falsy-stringalways evaluates to truesrc/Conditions/HasMethod.php:57,src/Conditions/HasProperty.php:52—(string) $typeonReflectionType, whose__toString()is doc-deprecated since PHP 8.0 (it emits no runtime notice on 8.4 or 8.5 — I verified).fix: stop relying on the deprecated ReflectionType::__toString() #21 fixes all of these, off
mainand independent of this PR, so neither diff carries the other's changes. PHPStan goes green here once it lands.Repo-wide
pintchurn. A current Pint reformats 18 unrelated files (fully_qualified_strict_typesnow applies more broadly). Per CONTRIBUTING's "no unrelated changes bundled in the PR", I left that out — it's independent of this change and belongs in its ownchore(style)commit.