Feature/laravel 13 support - #21
Merged
Merged
Conversation
Widens the dependency constraints to Laravel 13 (and the Symfony 8 / PHPUnit 13 / Testbench 11 toolchain it pulls in) and fixes the three incompatibilities that surfaced: - OctaneStore now implements Store::touch(), which Laravel 13 added to the cache store contract. Without it the class is abstract and fails to load. - CoroutineApplication::resolveFromAttribute() accepts the ReflectionParameter that Laravel 13's container now passes, keeping it optional so the proxy stays compatible with Laravel 11 and 12. - The Swoole request converter replaces the body InputBag's contents instead of reassigning the property, which Symfony 8.1 deprecates. The @dataProvider annotation in SwooleTableTest becomes a #[DataProvider] attribute, since PHPUnit 13 no longer reads metadata from doc comments. CI now runs the suite across Laravel 11, 12 and 13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lz28aV5ih7FAUUwCWwmrK9
Follow-up to the constraint and compatibility work, covering the pieces an audit against Laravel 13 turned up: - Register Octane as the "server" process of Laravel 13's new "artisan dev" command, so it boots Octane rather than "artisan serve". Guarded on both the class existing and a real application being bound, because Octane builds sandbox containers of its own. - Drop the implicitly nullable parameters on the container's resolving callbacks. Laravel 13 requires PHP 8.3+ and these emit deprecations on PHP 8.4, which the new CI matrix runs. Adds two regression tests: one asserting the dev command registration (skipped before Laravel 13), one compiling every Octane command's definition through Symfony Console, which Laravel 13 bumps to v8. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lz28aV5ih7FAUUwCWwmrK9
Two unit tests asserted on framework classes that do not exist across the whole supported range, so they could never pass on the older versions composer.json declares: - DeferredCallbackCollection arrived in Laravel 11, and every test in RequestScopeDeferredCallbackIsolationTest depends on it, so the guard goes in setUp. - FailoverQueue arrived in Laravel 12, but only part of the queue driver test needs it. The sync, null and redis assertions are worth keeping on every version, so only the failover half is gated. Neither is a defect in the package: both tests exercise framework features, and the coroutine code under them behaves the same either way. The CI matrix now covers the declared support surface rather than just its top end, exercising the PHP 8.1 floor from composer.json and each supported Laravel version. Verified with swoole 6.2.0 loaded on PHP 8.3, all suites green: Laravel 10 (875 assertions, 3 skipped), 11 (882, 1 skipped), 12 (886, 1 skipped), 13 (888, 0 skipped) — 138 tests throughout. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lz28aV5ih7FAUUwCWwmrK9
Laravel 13 added a fourth argument to Connection::select():
select($query, $bindings = [], $useReadPdo = true, array $fetchUsing = [])
MySqlStringBindingConnection overrides that method for its statement
cache, so under Laravel 13 the class could not be declared at all and any
test touching it died with "Premature end of PHP process".
The override now declares $fetchUsing and spreads it into fetchAll(), the
way the parent does. Adding a trailing optional parameter keeps the
declaration valid against the three-argument parents in Laravel 11 and
12, and parent::select() is only handed the fourth argument when a caller
actually supplies one, since the older parents reject it.
This code landed on main after this branch was cut, and main's
composer.json caps at ^12.0, so its CI resolves Laravel 12 and never
declared the class against a Laravel 13 parent. It surfaced here only
because this branch widens the constraint to ^13.0.
Also gates the afterRollBack() pool test behind a method_exists check;
that callback is a Laravel 12 addition, so the test could never pass on
Laravel 11.
The CI matrix drops the PHP 8.1 / Laravel 10 job. Laravel 10 fails for
reasons that predate this branch and are unrelated to Laravel 13 support:
testbench 8 points the default connection at MySQL, so the daemon
connection tests try to reach a real server. The remaining jobs are
verified locally with swoole 6.2.0 on PHP 8.3 — 192 tests throughout:
Laravel 11 (1000 assertions, 2 skipped), 12 (1006, 1 skipped),
13 (1008, 0 skipped).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lz28aV5ih7FAUUwCWwmrK9
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.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.