Skip to content

Sync Laravel updates: #58255 → #58336 - #576

Merged
binaryfire merged 24 commits into
0.4from
laravel-parity-58256
Sep 10, 2026
Merged

Sync Laravel updates: #58255 → #58336#576
binaryfire merged 24 commits into
0.4from
laravel-parity-58256

Conversation

@binaryfire

@binaryfire binaryfire commented Sep 10, 2026

Copy link
Copy Markdown
Member

Laravel updates

  • #58255, #58701 — Document resetting email verification after an address change. The trait method and verification contract are already present; the new example shows how to use them together.
  • #58259, #58266 — Document the not-between and OR variants of havingBetween, and bring the console trait comments into line with current upstream wording. Existing query behavior and native types remain unchanged.
  • #58262, #58283, #58289 — Complete encryption test typing, framework fixture names and package references. Restore the collection split description while preserving its generic types and lazy behavior. Readable environment encryption and the collection argument guards were already implemented and tested.
  • #58254 — Complete binary-cast exception annotations and test conventions. Preserve Symfony UUID conversion, exact binary identifier recognition, reusable PDO streams and worker-state cleanup. Keep the deterministic binary test instead of upstream's random input, which can occasionally be valid text.
  • #58287, #53779 — Restore the missing filesystem fake tests for enum disk names, missing files, inherited exception settings and explicit overrides. Exercise the real local adapter and retain Hypervel's existing zero-valued enum and parallel-isolation coverage.
  • #58290, #58441 — Accept closure subqueries across all eight between and between-columns methods. Their native parameter types previously rejected closures before the existing subquery implementation could handle them. Extend the SQL and binding assertions and document the public subquery argument without adding another execution path.
  • #58291, #58304 — Complete current validation coverage for literal-dot keys and rules added through appendRules and sometimes. Document appending rules to an existing validator and preserve Hypervel's encoded attribute handling and lookup invalidation.
  • #58299, #58302 — Complete resource test conventions and exception annotations. Correct request fixtures that passed the URI and method in reverse order, preserving all collection conversion and wrapping assertions.
  • #58317, #58288 — Restore the remaining strict array-filter assertions and correct the examples to show preserved keys. Replace cloned-connection tests that repeated SELECT queries with actual insert, update and delete operations, using Hypervel's interpolated pretend-mode SQL.
  • #58311, Laravel docs #10999 — Clarify isolated Blade includes: they exclude parent-scope variables but still receive shared view data. Existing compiler behavior, creators, composers and integration coverage remain intact.
  • #58293, #58561, #58624, #58638, #59875, #59876, #59887 — Complete migration repository record types, callback signatures, schema result inference and MySQL DDL option types. Include the later upstream typing corrections and type fixtures. Preserve coroutine-local connection selection and session-bound schema operations.
  • #58094, #59711, #60402, Laravel docs #11025, #11348 — Restore scalar and string-backed enum queue-route registration coverage and the current documentation examples. Correct the listener, broadcast, scheduler and mail tests so they verify the selected connection as well as the queue.
  • #58978, #59718 — Recover database queue records that cannot be reserved so one invalid job cannot block the queue indefinitely. Preserve valid jobs on transient database failures, cancellation and commit-listener errors, and wait for the reservation transaction to unwind before recovery. Widen the attempts column in generated and Testbench jobs migrations. Successful reservations perform no additional queries.
  • #61188 — Add Queue::forward with enum-aware boot-time registration, current upstream tests and adapted documentation. Resolve dynamic listener, broadcast and notification queues before choosing their connection; explicit connections still win. Apply forwarding across the supported queue drivers and preserve child defaults when failover receives no queue argument. Regenerate affected facades and document worker queue selection and draining an existing source backlog.

Additional Hypervel fixes

  • Preserve blueprint resolver registration across Schema facade calls. Store the boot-time default callback on the existing proxy and apply it to fresh builders, without retaining pooled connections or making local builder overrides global. Schema::connection() now honors facade mocks, so tests using a mocked Schema facade must set the corresponding expectation.
  • Reject PDO sessions marked unknown even when no session configurators are registered. Reuse the existing recovery path to reconnect outside a transaction and reject use inside an active transaction. Healthy unconfigured access retains its allocation-free path.
  • Preserve SQLSTATE and PDO error metadata when wrapping nested concurrency errors in DeadlockException. Losing that metadata prevented outer transactions from retrying and could cause a valid queued job to be classified as invalid.
  • Resolve logical queue names once at the storage boundary. Database reservation and release no longer forward a destination a second time. Redis totals and inspection operate on discovered physical queues, including existing backlogs, while preserving Cluster hash tags and pooled connection ownership. Global totals no longer call per-queue size overrides; queue discovery remains the extension point. SQS FIFO validation checks the final destination.
  • Make Horizon clearing purge metadata for the forwarded destination on the selected connection. This prevents deleting dashboard records for jobs still queued on separate storage. Add an optional connection argument to the job repository's purge contract while retaining queue-wide purge when it is omitted. Non-Horizon drivers leave Horizon metadata alone. If connection aliases share the exact same physical queue, clearing removes that queue's jobs but leaves other aliases' dashboard records until expiry or trimming; this behavior is documented and tested.
  • Fix ineffective queue-connection assertions. QueueFake::connection() does not filter recorded jobs, so chaining it before a queue assertion could hide incorrect connection selection. Verify the factory call directly and correct the scheduler fixture's concealed connection-name typo.
  • Correct migration creation-hook types to permit a null table and avoid promising an already-existing migration class. Share schema defaults with their reset values and document the creation callback's worker lifetime.
  • Remove the invalid MySQL instant()->lock('none') example and explain that INSTANT permits only DEFAULT locking. Remove unsupported SQL Server-only definition metadata.

Summary by CodeRabbit

  • New Features

    • Added queue forwarding between queues and connections for jobs, events, mail, notifications, failover queues, and supported queue drivers.
    • Added connection-scoped Horizon queue clearing and purge behavior.
    • whereBetween and related query methods now accept closures directly.
    • Added configurable schema blueprint resolvers.
  • Bug Fixes

    • Improved handling of unknown database sessions, deadlocks, transaction failures, and queue reservation errors.
    • Expanded queue-attempt storage capacity.
  • Documentation

    • Clarified queue forwarding, Horizon clearing, validation, migrations, verification, and helper behavior.

Document resetting an email verification status after an address change,
and describe the not-between and OR variants alongside havingBetween.
These APIs and the later MustVerifyEmail contract addition already match
the current Laravel source; no runtime changes are necessary.

Port both upstream human-readable comment corrections in the console
traits. Preserve Hypervel's native property types and existing behavior.

Upstream:
laravel/framework#58255
laravel/framework#58701
laravel/framework#58259
laravel/framework#58266

Compared complete PR diffs with Laravel 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Checked Laravel docs first;
the public usage explanations were absent. Formatting and diff checks
pass. No runtime tests or static analysis needed for prose and comments.
Reconcile Laravel framework PRs #58262, #58283 and #58289 against 13.x
at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Readable environment-file
encryption, format detection and all applicable upstream tests are already
present, as are eager/lazy collection argument guards and exception docs.

Complete the remaining Hypervel adaptations: natively type encryption
tests and their tampered-payload provider, use Hypervel fixture names in
both environment commands' tests, link the encryption package's existing
documentation and upstream, and restore the inherited split description.

Preserve atomic file replacement, permissions, cancellation behavior,
existing regression assertions, collection generic metadata and laziness.
This changes no production behavior and adds no tests.

All three affected test files pass. Scoped PHP-CS-Fixer and git diff
checks pass; production changes are documentation only.

laravel/framework#58262
laravel/framework#58283
laravel/framework#58289
Restore all seven current upstream filesystem fake tests covering missing
files, inherited throw settings, explicit overrides, and string-backed enum
disks. Merge them into the existing StorageFakeTest so integer-zero enum,
parallel-token, and temporary-URL coverage remain alongside the upstream
cases. Use Hypervel's config helper, typed methods, and configured camelCase
PHPUnit method names.

Complete the current AsBinary and BinaryCodec exception annotations and
required method/provider titles. Narrow the null/blank test parameters to
nullable strings. Preserve Symfony UUID conversion, exact binary identifier
recognition, reusable PDO streams, worker-state cleanup, and list-shaped
format names. No production executable code changes.

Add the filesystem documentation link and put its upstream reference after
the existing differences section without changing those explanations.

Laravel PRs:
laravel/framework#58254
laravel/framework#58287
laravel/framework#53779

Port source: Laravel 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
The binary exception annotations incorporate the relevant current changes
from #59016; its broader surface remains to be reconciled separately.

Validation: all three changed test files pass; scoped PHP CS Fixer and
whitespace checks pass. The filesystem tests exercise real local-adapter
failures and overrides rather than only inspecting configuration.
Complete the supported subquery surface introduced by Laravel PRs #58290
and #58441. Both implementation bodies and their original regression tests
were already present, but Hypervel's eight native column parameter unions
rejected closures before the existing subquery parser could execute them.

Add Closure to all eight between/between-columns signatures and their
existing detailed annotations. Keep query construction, binding order and
all method bodies unchanged: createSub already executes closures against a
fresh query and retains only the resulting SQL and bindings.

Extend the two existing forwarding tests with closure inputs alongside
builder inputs, preserving their full SQL and binding assertions. Document
the public subquery argument with a correlated example; the pinned Laravel
docs do not yet describe it.

Upstream:
laravel/framework#58290
laravel/framework#58441
Source: 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2
Docs: 2914ba0b06c6be40c2f1f992555853f6266707d6

Validation: full DatabaseQueryBuilderTest, scoped PHP-CS-Fixer, both
composer analyse passes, and git diff --check. Pre-fix probes reproduced
TypeError for all eight closure inputs; the regression assertions now
verify their SQL and binding order.
Port the four missing current Laravel validation cases for escaped-dot
keys through constructor rules, appendRules and sometimes, and for
successive pipe-separated appended rules. The implementation already
handles these paths; preserve Hypervel's placeholder encoding, wildcard
expansion and cached lookup invalidation.

Restore addRules' upstream internal annotation and the resource collector's
LogicException annotation. Correct two misleading upstream comments, and
document appendRules at the public manually-created-validator surface.

Resource collection conversion and wrapping coverage is already present.
Correct the two inherited Request::create fixtures that reverse the URI
and HTTP method, and complete the touched method/provider docblocks.
Preserve every resource dataset and assertion. No production method body
or native signature changes.

Upstream:
laravel/framework#58291
laravel/framework#58304
laravel/framework#58299
laravel/framework#58302
Source: 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2
Docs: 2914ba0b06c6be40c2f1f992555853f6266707d6

Validation: each changed test file passes (ValidationValidatorTest,
ResourceTest and ResourceCollectionTest); scoped configured PHP-CS-Fixer
and git diff --check pass. The final collection-stub docblock correction
was followed by another successful ResourceCollectionTest run.
Bring the remaining tests and documentation for Laravel #58317, #58288 and #58311 into parity with framework source 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 and docs source 2914ba0b06c6be40c2f1f992555853f6266707d6.

Port the five strict empty-array assertions and correct four array-filtering examples to show preserved keys. Replace three mislabeled SELECT assertions with actual insert, update and delete calls through the cloned connection in pretend mode. Assert the interpolated SQL emitted by Hypervel and retain schema and original-connection isolation coverage. Type the local test helpers and remove stale Laravel annotations.

Clarify that isolated Blade includes still receive shared view data. The array examples, duplicated SELECT checks and overly restrictive Blade wording also exist upstream; runtime behavior remains unchanged.

Validated both affected PHPUnit classes immediately, their combined focused ParaTest run, scoped PHP-CS-Fixer and diff checks.

Upstream: laravel/framework#58317
laravel/framework#58288
laravel/framework#58311
laravel/docs#10999
Port the current migration repository record shapes, batch maps, creation
and connection resolver callbacks, Blueprint callbacks, schema return
inference, and MySQL DDL lock value annotations. Include the later fixes
for malformed unions and incorrect array/object annotations rather than
reproducing the original typing defects.

Creation hooks accept a nullable table name for generic migrations. Keep
the prospective migration class name typed as string: the caller checks
whether that class exists. Preserve coroutine connection routing and
physical-session foreign-key suppression without changing runtime APIs.
Document the creation hook's worker lifetime and share schema defaults
with the existing static reset through typed constants.

Correct the inherited MySQL DDL example: ALGORITHM=INSTANT permits only
LOCK=DEFAULT. Keep the upstream compiler tests that verify clause
forwarding. Remove unsupported SQL Server-only definition metadata.

Add type fixtures for public repository records, callback inference,
schema refinements, and exact first-class callable lock signatures.
Schema facade generation remains unchanged because the generator
simplifies these refinements; no manual facade changes are included.

Upstream source: laravel/framework 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

laravel/framework#58293
laravel/framework#58561
laravel/framework#58624
laravel/framework#58638
laravel/framework#59875
laravel/framework#59876
laravel/framework#59887

Verified with full source/type analysis, focused migration and schema
tests, formatting, and facade-generation lint.
Schema::blueprintResolver() configured a throwaway builder, so subsequent
schema operations silently ignored the callback. Keep the facade default
on the existing SchemaProxy and apply it to each freshly selected builder.
Route Schema::connection() through that proxy as well, so named connections
and usingConnection() receive the same configuration.

Retain only the boot-time callback, never a builder or its pooled connection.
Builder::blueprintResolver() stays instance-local, allowing a retained
builder to override the default without affecting other builders. Document
the default registrar's worker lifetime.

The defect also exists in Laravel, whose Schema facade disables caching.
Its earlier static Builder fix was introduced and reverted in:
laravel/framework#55607
laravel/framework#55690
This fix preserves local builder state instead of restoring that design.
Current callback types already incorporate:
laravel/framework#55687
laravel/framework#56392
Upstream reference: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

Approved testing difference: Schema::connection() now honors a mocked
Schema facade instead of bypassing it for a real builder. Such tests must
configure the connection expectation; ordinary application calls retain
their API and connection selection.

Add two real-application SQLite regressions for resolver arguments,
default/named/temporary connection selection, create/alter callbacks, and
local override isolation. Both fail before the fix and pass afterward.
Focused database tests, full PHPStan analysis, formatting and Schema facade
lint pass.
Restore Laravel's scalar-route and string-backed enum registration tests,
including both direct and array registration. Preserve Hypervel's existing
unit-enum and integer-backed enum coverage.

Correct the listener, broadcast, scheduler and mail routing tests so they
verify the selected connection. QueueFake::connection() ignores its argument,
so chaining it before assertPushedOn() never tested connection selection and
even concealed a queue-name typo in the scheduler test. Observe the factory
call while preserving each test's queue and dispatch assertions. Explain the
partial fakes beside their construction to prevent losing this coverage.

Restore the current Laravel documentation's scalar queue-only example and
Concerns namespace. Production behavior and public APIs are unchanged.

Upstream framework:
laravel/framework#58094
laravel/framework#59711
laravel/framework#60402
Source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2

Upstream documentation:
laravel/docs#11025
laravel/docs#11348
Source: 2914ba0b06c6be40c2f1f992555853f6266707d6

Validation: each affected class passes, as does focused ParaTest including
unique-job scheduling. Wrong-connection probes fail in all four corrected
tests. Scoped formatting and diff checks pass.
Unconfigured connections bypassed session synchronization even after a physical transaction or cleanup failure marked their PDO state unknown. Subsequent reads and writes could continue inside a transaction whose rollback had failed.

Keep the allocation-free fast path only for known sessions. Reuse the existing synchronization path to replace an unknown PDO outside transactions and reject its use inside an active transaction. Raw PDO access and physical cleanup remain unchanged; no additional state or recovery mechanism is introduced.

Extend the existing write replacement, read replacement and active-transaction tests to run with and without registered configurators. Preserve the no-allocation regression for healthy unconfigured connections.

Found while investigating Laravel framework PR laravel/framework#58978; this commit fixes the independent Hypervel session-state defect and does not port reservation recovery.

Validation: focused database transaction/session tests, full source and type-fixture analysis, PHP-CS-Fixer and diff checks pass.
Port Laravel framework PRs #58978 and #59718 from the 13.x source at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2:
laravel/framework#58978
laravel/framework#59718

Fail records that cannot be reserved so one invalid job cannot block the
queue indefinitely. Recover only after the reservation transaction has
unwound to its original depth. Exclude concurrency failures, lost
connections and coroutine cancellation, and clear the recovery candidate
after successful marshalling so commit or completion-listener failures do
not delete a valid job. Preserve the original reservation error when
ordinary failure handling also throws, while propagating cancellation.

Widen attempts to unsignedSmallInteger in the generated jobs migration
and Testbench skeleton. The upstream DatabaseJob record typing and
Controller formatting changes are already present.

Correct an adjacent transaction defect: nested concurrency failures lost
their SQLSTATE and PDO errorInfo when wrapped in DeadlockException. That
prevented outer transactions from retrying and misclassified valid queued
jobs as invalid. Preserve the driver metadata while retaining the existing
exception constructor arguments and defaults, adding string-code support.

Add focused coverage for blocked queues, nested recovery, transient errors,
cancellation, commit-listener failures, failed physical rollback and nested
transaction retry with preserved error metadata. All recovery state is
local to the invocation; no extra queries run on successful reservations.

Validation: changed test files, focused queue/database ParaTest suites,
Testbench package-mode suite, full source and type-fixture PHPStan,
formatting and whitespace checks pass. Independent review also verified
the full database package and the original nested-failure reproduction.
…ations

Port laravel/framework#61188 from Laravel 13.x
at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2, including all applicable
upstream tests and current forwarding documentation.

Add Queue::forward with enum-aware boot-time registration. Resolve forwarded
connections after dynamic listener, broadcast and notification queue selection;
retain explicit connection precedence and class-route fallback. Adapt storage
boundaries for Database, Redis, Beanstalkd and SQS, including FIFO validation.
Failover applies only its own connection-scoped forwards before delegation,
leaving omitted defaults and unscoped forwarding to each storage driver.

Correct upstream repeated forwarding during database reservation/release and
Redis global size calculations. Jobs retain logical queue names while storage
operations resolve them once. Redis totals and inspection use discovered physical
keys directly, preserving pinned pooled connections, Cluster hash tags and
pre-forward backlogs. Global totals no longer call per-queue size overrides;
allQueueNames remains the discovery extension point.

Correct Horizon clearing to purge the forwarded destination on the selected
connection, preserving records for live jobs on separate storage. Add optional
connection filtering to the existing purge operation and its repository contract.
Retain one-argument queue-wide purge. Non-Horizon clearable drivers do not purge
Horizon records, and unsupported drivers fail before any purge. When connection
aliases share physical storage, clearing removes all queued jobs but leaves other
aliases' dashboard records until expiry/trim; document and test this deliberate
tradeoff without adding draining or temporary-key machinery.

Regenerate affected facades and document forwarding, default-queue semantics,
worker queue lists, draining existing backlogs and clear behavior. Add focused
regressions for dynamic selection, zero identifiers, failover delegation,
reservation/release chains, physical totals and Horizon metadata isolation.

Validation: full source/type PHPStan, formatting and facade lint; affected
ParaTest packages; SQLite reservation tests; Redis and Horizon integration tests
on standalone Redis and Redis Cluster. Final review corrections and affected
tests pass, including both separate and shared physical queue storage.
Integrate the database extensibility, query execution, schema typing and Testbench cleanup changes from 0.4.

Resolve the two test-file conflicts by retaining both PHPUnit attribute imports and both sets of schema type assertions and custom-column fixtures. Preserve the parity branch session invalidation guards, closure subquery support and Schema facade behavior alongside the new driver boundaries.

Validation: the changed connection test and composer fix pass on PHP 8.4, including formatting, full source and type-fixture analysis, the full parallel suite, Testbench package-mode tests and the dogfood package tests. Redis coverage used a dedicated local instance; unconfigured external-service cases were skipped.
Limit destructive reservation recovery to QueryException. Before-query callbacks, query-executed listeners and duration handlers can throw after a valid job is selected; treating every exception as an invalid record deleted that job after rollback.

Keep transaction-state, concurrency and lost-connection checks for actual query failures. Cancellation now naturally bypasses recovery, while cleanup still preserves the original query error or propagates cancellation. No additional successful-path work or shared state is introduced.

Add SQLite regressions for all three observer phases and use QueryException fixtures so the existing transient-error and cleanup tests continue exercising recovery. Preserve the overflow recovery regression.

Corrects an upstream defect in laravel/framework#58978, compared against Laravel 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Verified affected queue/database suites, full PHPStan source/type checks, and formatting.
Describe the optional queue argument as the logical queue already selected by the caller. It overrides queueable queue metadata when choosing a forwarded connection; an explicit class-route connection still takes precedence.

Document the same contract on QueueRoutes and the shared resolver concern used by dispatchers and mailables. This is a PHPDoc-only clarification with no runtime, signature or generated facade change.

Follows the port of laravel/framework#61188. Verified resolver callers and precedence, existing QueueRoutes tests, formatting and source/type analysis.
Restore current Laravel tests for terminal PHP extension removal, view-name directory conversion, embedded extension preservation and case-insensitive reserved class names. Keep the separate Hypervel unit tests for generator behavior.

Copy from Laravel 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 and adapt namespaces, Testbench, strict/native types and provider documentation. Preserve every upstream case and assertion. Additionally assert that reserved names create no class file, registering only that exact path for existing published-file cleanup.

Relevant upstream history: laravel/framework#48667, laravel/framework#51842, laravel/framework#51847 and laravel/framework#51924.

Verified the new test, combined generator and queue-route coverage, console integration tests and formatting. Generated files use the disposable Testbench application and existing cleanup lifecycle.
The schema facade delegates named connections through SchemaProxy so registered blueprint resolvers apply. That proxy previously resolved the database manager from the global container, bypassing the application configured on the facade.

Pass the binding container into the proxy and resolve its database manager for each operation. This preserves container swaps, coroutine-local connection selection and fresh builders without retaining pooled connections.

Add a regression covering named and default facade calls with a different global container. Verified affected schema, database and facade tests, formatting and full static analysis.
A connection-scoped forward applies only on its configured connection. queue:clear selects its connection before resolving a destination, so using another connection clears the source queue instead.

Document that selection next to queue forwarding and retain the warning that clearing a shared destination also removes jobs sent through other logical names. Unscoped forwards continue to apply on every connection.

Checked the wording against ClearCommand and QueueRoutes, including scoped and unscoped forwarding.
QueueFake records the logical dispatch while storage drivers apply the destination forward. Explain that distinction beside the assertion so the source queue is not mistaken for missing forwarding coverage.

Keep the existing connection-selection expectation and logical-queue assertion intact. Verified the queued mail test file independently.
Capsule bootstrap installed Fluent as the configuration service, whose string getter returns Stringable. QueueManager requires a native string for the default connection, so resolving that connection could throw a TypeError.

Install Config Repository when no config binding exists and preserve any supplied binding unchanged. Database and Queue Capsules sharing a container now use the same typed configuration API. No compatibility branch or cast is added to the queue manager.

Cover the native string getter and supplied configuration identity. Verified the Support Capsule tests, composed SQLite Capsules, affected database and queue tests, full source/type analysis, and formatting.
Queue Capsule constructed a service provider that requires an Application, passing a bare Container instead. The existing comment and analysis suppression hid a real constructor TypeError.

Extract connector registration into a shared concern used by the provider and Capsule. Preserve the nine connector hooks, their signatures, lazy construction, and exception reporting. Failover captures the manager receiving the connector registration rather than resolving an unrelated or missing queue binding.

Have the provider route binding reuse the container-owned concrete registry, preserving routes registered before the provider. This completes the standalone bootstrap boundary used by the queue forwarding port from laravel/framework#61188.

Add real standalone sync dispatch, named connection, and failover ownership coverage. Verified affected queue and database tests, existing lazy connector and exception-reporting coverage, full source/type analysis, and formatting.
Queue routing consulted the global container even when a manager or dispatcher belonged to another container. Without a provider binding, it created a fresh registry for every lookup, immediately losing route and forwarding registrations.

Resolve routes from the existing owner across queue managers, queues, bus and event dispatchers, broadcasting, and notifications. Honor explicit route-service replacements and use the native auto-singleton for unbound registries. Preserve supported container-less queue access and the routing trait default. No per-job shared state, collaborator cache, additional I/O, or new lifecycle mechanism is introduced.

Complete the standalone routing behavior associated with laravel/framework#61188. Cover owner/global isolation, replacements, persistent registrations, provider boot, and a real forwarded SQLite queue shared by Database and Queue Capsules.

Correct existing reservation fixtures to register routes with their queue owner. Use partial concrete container mocks only where queue tests now require real routing resolution, preserving event counts, payload assertions, cancellation and error behavior, and the assertion that small SQS payloads do not resolve overflow storage.

Validated each changed test file, affected Queue/Bus/Events/Notifications/Broadcasting/Capsule/Database tests with ParaTest, real Redis integration, full source/type analysis, and formatting. Final review confirmed the regression assertions fail against the previous behavior.
Adding the caller-selected queue parameter description made its PHPDoc union authoritative for facade generation. The generated Broadcast, Bus, Event, Notification, and Queue annotations still reflected the native union order, causing FacadeDocblocksTest to fail in both PHP 8.4 and PHP 8.5 CI.

Regenerate the five affected method annotations with composer facade. The accepted types and runtime behavior are unchanged; only the union member order differs.

Follow-up to the queue forwarding port: laravel/framework#61188. Verified the existing facade consistency regression fails before regeneration and passes afterward. Full formatting and source/type analysis pass; the final generated diff was reviewed.
Database reservation recovery could mistake a query issued by an observer for a failed reservation update and delete an otherwise valid job after rollback. Restrict recovery to exceptions matching the held database connection name, reservation SQL and prepared bindings.

Compile the expected update with the existing query grammar using the already-mutated job record. This adds no SQL execution, shared state or work to successful reservations. Preserve transient-error, transaction-depth, cancellation and cleanup behavior; document the predicate alongside the reservation override boundary.

Extend SQLite regressions across before-query, executed-query and duration observers, including identical SQL with different job bindings. Name the storage fixture distinctly from the queue and resolver identities. Keep the cleanup unit test focused on cleanup failure.

Validation: changed test files, complete queue and database package suites, full source/type analysis, formatting and diff checks pass. All four new regression cases fail without the predicate.

Corrects recovery ported from Laravel framework PRs:
laravel/framework#58978
laravel/framework#59718
@binaryfire
binaryfire merged commit af1bc4f into 0.4 Sep 10, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add queue forwarding and synchronize Laravel framework behavior

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Adds enum-aware queue forwarding across dispatchers, drivers, failover, and Horizon.
• Hardens database sessions, deadlock retries, schema resolvers, and queue reservation recovery.
• Synchronizes Laravel documentation, type declarations, fixtures, and regression coverage.
Diagram

graph TD
  A["Queue Producers"] --> B["Queue Routes"] --> C["Connection Selection"] --> D["Queue Drivers"] --> E["Physical Queue"]
  D --> F["Horizon Metadata"]
  D --> G["Reservation Recovery"]
  E --> H["Queue Workers"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Driver-specific forwarding configuration
  • ➕ Keeps destination mapping close to each storage backend.
  • ➕ Avoids changing dispatch-time connection selection.
  • ➖ Duplicates forwarding semantics across drivers.
  • ➖ Cannot consistently route all queue producers by connection.
  • ➖ Makes failover and Horizon behavior harder to coordinate.
2. Dispatch middleware forwarding
  • ➕ Could transform queueable objects before they reach a driver.
  • ➕ Offers per-job customization hooks.
  • ➖ Misses raw pushes, inspection, clearing, and worker operations.
  • ➖ Mutating queueable state obscures logical queue identity.
  • ➖ Requires separate integration for every producer type.

Recommendation: Keep the centralized QueueRoutes registry and resolve names at the storage boundary. This provides one boot-time API across all producers while preserving explicit connections and logical worker names; the added driver, failover, Horizon, and recovery tests address the primary double-forwarding and consistency risks.

Files changed (103) +2813 / -467

Enhancement (15) +227 / -44
BroadcastManager.phpResolve broadcast connections from the selected queue +10/-4

Resolve broadcast connections from the selected queue

• Uses the final broadcast queue when resolving forwarded connections and binds route lookup to the manager's application container.

src/broadcasting/src/BroadcastManager.php

Dispatcher.phpBind bus queue routes to the dispatcher container +8/-0

Bind bus queue routes to the dispatcher container

• Provides the owning container for persistent, container-local queue route resolution.

src/bus/src/Dispatcher.php

Builder.phpAccept closure subqueries in between clauses +13/-13

Accept closure subqueries in between clauses

• Expands all eight between and between-columns method signatures to accept closure subqueries.

src/database/src/Query/Builder.php

Dispatcher.phpRoute queued listeners using their final queue +13/-5

Route queued listeners using their final queue

• Defers connection selection until dynamic queue resolution completes and uses the dispatcher's container for routes.

src/events/src/Dispatcher.php

JobRepository.phpAdd connection-aware purge contract +5/-0

Add connection-aware purge contract

• Defines queue metadata purging with an optional connection scope.

src/horizon/src/Contracts/JobRepository.php

RedisJobRepository.phpSupport connection-scoped metadata purges +3/-2

Support connection-scoped metadata purges

• Accepts an optional connection and forwards it to the iterative Redis purge script.

src/horizon/src/Repositories/RedisJobRepository.php

ChannelManager.phpBind notification routes to their container +9/-0

Bind notification routes to their container

• Provides the channel manager's owning container for queue route resolution.

src/notifications/src/ChannelManager.php

BeanstalkdQueue.phpApply queue forwarding to Beanstalkd +1/-1

Apply queue forwarding to Beanstalkd

• Resolves the final queue name before returning the Beanstalkd tube.

src/queue/src/BeanstalkdQueue.php

FailoverQueue.phpApply connection-scoped failover forwarding +24/-8

Apply connection-scoped failover forwarding

• Resolves scoped forwards before delegated queue operations while leaving unscoped forwarding to child drivers.

src/queue/src/FailoverQueue.php

Queue.phpResolve physical queues in base drivers +19/-0

Resolve physical queues in base drivers

• Adds shared route access and destination resolution using each queue's owning container.

src/queue/src/Queue.php

QueueManager.phpExpose the queue forwarding API +21/-0

Expose the queue forwarding API

• Adds boot-time enum-aware forward registration and binds route lookup to the manager's application.

src/queue/src/QueueManager.php

QueueRoutes.phpStore and resolve queue forwarding rules +81/-5

Store and resolve queue forwarding rules

• Adds enum-aware queue and connection forwards, explicit-route precedence, queue attribute lookup, and connection-scoped resolution.

src/queue/src/QueueRoutes.php

SqsQueue.phpResolve final SQS queue destinations +1/-1

Resolve final SQS queue destinations

• Applies forwarding before URL construction and FIFO option or delay validation.

src/queue/src/SqsQueue.php

Queue.phpExpose queue forwarding on the facade +2/-1

Expose queue forwarding on the facade

• Adds the forward method and queue-aware connection resolution to generated facade metadata.

src/support/src/Facades/Queue.php

ResolvesQueueRoutes.phpMake queue routes container-local and queue-aware +17/-4

Make queue routes container-local and queue-aware

• Accepts the selected queue when resolving connections and reuses the owning container's registry.

src/support/src/Queue/Concerns/ResolvesQueueRoutes.php

Bug fix (15) +216 / -47
ManagesTransactions.phpPreserve deadlock exception codes +1/-1

Preserve deadlock exception codes

• Passes string SQLSTATE codes through nested deadlock wrappers instead of replacing them with zero.

src/database/src/Concerns/ManagesTransactions.php

DatabaseServiceProvider.phpInject the application into SchemaProxy +2/-2

Inject the application into SchemaProxy

• Constructs the schema proxy with its owning application container.

src/database/src/DatabaseServiceProvider.php

DeadlockException.phpPreserve nested PDO deadlock metadata +15/-0

Preserve nested PDO deadlock metadata

• Retains string or integer codes, previous exceptions, and PDO error information for retry detection.

src/database/src/DeadlockException.php

MigrationCreator.phpCorrect migration creation hook signatures +7/-0

Correct migration creation hook signatures

• Types post-create hooks with a nullable table name and documents their worker-lifetime persistence.

src/database/src/Migrations/MigrationCreator.php

PdoConnection.phpRecover unknown unconfigured PDO sessions +3/-2

Recover unknown unconfigured PDO sessions

• Routes unknown read and write sessions through synchronization even when no session configurators exist.

src/database/src/PdoConnection.php

ColumnDefinition.phpCorrect column DDL option types +1/-2

Correct column DDL option types

• Restricts MySQL lock values and removes unsupported persisted-column metadata.

src/database/src/Schema/ColumnDefinition.php

IndexDefinition.phpCorrect index DDL metadata +2/-2

Correct index DDL metadata

• Restricts MySQL lock values and removes SQL Server from the online index annotation.

src/database/src/Schema/IndexDefinition.php

SchemaProxy.phpPersist facade blueprint resolvers safely +39/-2

Persist facade blueprint resolvers safely

• Stores a boot-time resolver on the proxy and applies it to fresh builders without retaining pooled connections. Operations now use the proxy's owning container.

src/database/src/Schema/SchemaProxy.php

ClearCommand.phpClear Horizon metadata by destination and connection +19/-4

Clear Horizon metadata by destination and connection

• Validates clearable drivers and purges forwarded Redis destination metadata only for the selected connection.

src/horizon/src/Console/ClearCommand.php

LuaScripts.phpFilter Horizon purge records by connection +6/-3

Filter Horizon purge records by connection

• Extends the purge script to inspect job connections and optionally restrict pending and reserved record deletion.

src/horizon/src/LuaScripts.php

NotificationSender.phpResolve notification connections after channel queues +3/-3

Resolve notification connections after channel queues

• Selects forwarded connections from each channel's final queue while preserving explicit overrides.

src/notifications/src/NotificationSender.php

DatabaseQueue.phpRecover invalid reservations and forward once +73/-6

Recover invalid reservations and forward once

• Preserves logical queues while resolving storage destinations once. Invalid reservation updates remove blocking jobs, while transient and transaction failures remain recoverable.

src/queue/src/DatabaseQueue.php

RedisQueue.phpSeparate logical Redis queues from physical keys +42/-13

Separate logical Redis queues from physical keys

• Applies forwarding once, preserves cluster hash tags, and makes global inspection and totals use discovered physical queues.

src/queue/src/RedisQueue.php

Schema.phpRoute Schema connection calls through the facade +1/-5

Route Schema connection calls through the facade

• Uses the facade root so mocks and persistent proxy blueprint resolvers are honored.

src/support/src/Facades/Schema.php

CapsuleManagerTrait.phpProvide full configuration repositories to capsules +2/-2

Provide full configuration repositories to capsules

• Replaces the Fluent placeholder with a typed configuration Repository for standalone managers.

src/support/src/Traits/CapsuleManagerTrait.php

Refactor (10) +231 / -133
DatabaseMigrationRepository.phpDescribe concrete migration record types +12/-0

Describe concrete migration record types

• Adds precise return and parameter shapes for migration repository records and batches.

src/database/src/Migrations/DatabaseMigrationRepository.php

MigrationRepositoryInterface.phpType migration repository contracts +12/-0

Type migration repository contracts

• Adds concrete migration record, batch map, and deletion parameter shapes to the interface.

src/database/src/Migrations/MigrationRepositoryInterface.php

Migrator.phpType migration resolver callbacks and records +5/-0

Type migration resolver callbacks and records

• Documents rollback record shapes and the custom connection resolver callback signature.

src/database/src/Migrations/Migrator.php

Blueprint.phpType blueprint callbacks +4/-0

Type blueprint callbacks

• Documents constructor and after-column callbacks as receiving the active Blueprint.

src/database/src/Schema/Blueprint.php

Builder.phpShare typed schema defaults with reset behavior +35/-14

Share typed schema defaults with reset behavior

• Introduces constants for schema defaults, improves callback and result types, and reuses the constants during static-state reset.

src/database/src/Schema/Builder.php

ForeignKeyDefinition.phpRefine foreign-key option types +2/-2

Refine foreign-key option types

• Restricts MySQL lock values and declares references as a string or string list.

src/database/src/Schema/ForeignKeyDefinition.php

Manager.phpShare connector registration with queue capsules +11/-7

Share connector registration with queue capsules

• Uses the common connector trait so standalone capsules resolve dependencies from their own container.

src/queue/src/Capsule/Manager.php

RegistersQueueConnectors.phpExtract reusable queue connector registration +138/-0

Extract reusable queue connector registration

• Adds shared registration for all built-in queue connectors and optional in-process exception reporting.

src/queue/src/Concerns/RegistersQueueConnectors.php

DatabaseJobRecord.phpType database job reservation timestamps +1/-0

Type database job reservation timestamps

• Documents the nullable reserved_at field on database queue records.

src/queue/src/Jobs/DatabaseJobRecord.php

QueueServiceProvider.phpReuse connectors and preserve early routes +11/-110

Reuse connectors and preserve early routes

• Moves connector setup into the shared trait and aliases queue.routes to the container-managed registry.

src/queue/src/QueueServiceProvider.php

Tests (39) +2019 / -218
BusDispatcherTest.phpTest forwarded bus connections and precedence +46/-0

Test forwarded bus connections and precedence

• Covers queue-name connection forwarding and explicit connection overrides for commands.

tests/Bus/BusDispatcherTest.php

DatabaseConnectionTest.phpTest nested deadlock metadata and retries +40/-0

Test nested deadlock metadata and retries

• Verifies SQLSTATE and PDO metadata survive nested wrappers and enable outer transaction retries.

tests/Database/DatabaseConnectionTest.php

DatabaseEloquentAsBinaryCastTest.phpDocument binary cast test fixture +3/-0

Document binary cast test fixture

• Adds a descriptive docblock to the fixture's casts method.

tests/Database/DatabaseEloquentAsBinaryCastTest.php

DatabaseEloquentIntegrationWithTablePrefixTest.phpExercise cloned connection write grammars +21/-23

Exercise cloned connection write grammars

• Adds native typing and verifies pretend-mode insert, update, and delete SQL uses the cloned prefix.

tests/Database/DatabaseEloquentIntegrationWithTablePrefixTest.php

DatabaseQueryBuilderTest.phpTest closure range subqueries +34/-26

Test closure range subqueries

• Runs all between and between-columns variants with builders and closures, asserting SQL and bindings.

tests/Database/DatabaseQueryBuilderTest.php

DatabaseSchemaProxyTest.phpTest persistent and local blueprint resolvers +112/-0

Test persistent and local blueprint resolvers

• Covers fresh builders, selected connections, facade application ownership, and local resolver isolation.

tests/Database/DatabaseSchemaProxyTest.php

DatabaseSessionConfiguratorTest.phpTest unknown sessions without configurators +34/-8

Test unknown sessions without configurators

• Runs read, write, and active-transaction recovery cases with configured and unconfigured session states.

tests/Database/DatabaseSessionConfiguratorTest.php

EncrypterTest.phpComplete encryption test typing +30/-27

Complete encryption test typing

• Adds return and parameter types plus provider documentation across encryption tests.

tests/Encryption/EncrypterTest.php

QueuedEventsTest.phpTest listener forwarding and connection selection +57/-5

Test listener forwarding and connection selection

• Replaces ineffective fake assertions and covers forwarded and dynamically selected listener queues.

tests/Events/QueuedEventsTest.php

BroadcastManagerTest.phpTest forwarded broadcast connections +63/-2

Test forwarded broadcast connections

• Verifies route and forward connection selection, including dynamic queues and explicit overrides.

tests/Integration/Broadcasting/BroadcastManagerTest.php

EnvironmentDecryptCommandTest.phpUse Hypervel environment fixtures +22/-22

Use Hypervel environment fixtures

• Replaces remaining Laravel application and database fixture names in decryption tests.

tests/Integration/Console/EnvironmentDecryptCommandTest.php

EnvironmentEncryptCommandTest.phpUse Hypervel encryption fixtures +3/-3

Use Hypervel encryption fixtures

• Replaces Laravel application names in blob and readable environment encryption fixtures.

tests/Integration/Console/EnvironmentEncryptCommandTest.php

GeneratorCommandTest.phpAdd generator filename and reserved-name coverage +79/-0

Add generator filename and reserved-name coverage

• Tests PHP extension trimming, nested paths containing .php, and case-insensitive reserved names.

tests/Integration/Console/GeneratorCommandTest.php

JobSchedulingTest.phpVerify scheduled job connection selection +8/-2

Verify scheduled job connection selection

• Replaces ineffective fake chaining with direct factory expectations and corrects the connection-name assertion.

tests/Integration/Console/JobSchedulingTest.php

StorageFakeTest.phpRestore filesystem fake behavior coverage +65/-6

Restore filesystem fake behavior coverage

• Covers missing files, inherited and overridden throw settings, persistent fakes, and enum disk names.

tests/Integration/Filesystem/StorageFakeTest.php

ClearCommandTest.phpTest connection-aware forwarded queue clearing +90/-4

Test connection-aware forwarded queue clearing

• Covers destination metadata purge, separate and shared storage, non-Horizon drivers, and unsupported connections.

tests/Integration/Horizon/Feature/ClearCommandTest.php

QueueProcessingTest.phpTest forwarded Horizon job lifecycles +34/-0

Test forwarded Horizon job lifecycles

• Verifies workers retain logical queues while Horizon events and records report physical destinations.

tests/Integration/Horizon/Feature/QueueProcessingTest.php

RedisJobRepositoryTest.phpTest connection-scoped Horizon purges +20/-2

Test connection-scoped Horizon purges

• Ensures purging removes matching pending and reserved records while preserving completed jobs and other connections.

tests/Integration/Horizon/Feature/RedisJobRepositoryTest.php

ResourceTest.phpCorrect resource request fixture arguments +4/-1

Correct resource request fixture arguments

• Passes URI before method to Request::create and documents the anonymous transformation.

tests/Integration/Http/ResourceTest.php

ResourceCollectionTest.phpCorrect resource collection fixtures +7/-1

Correct resource collection fixtures

• Fixes request argument order and documents collection providers and transformations.

tests/Integration/Http/Resources/Json/ResourceCollectionTest.php

SendingQueuedMailTest.phpTest routed and forwarded mail connections +34/-2

Test routed and forwarded mail connections

• Verifies actual queue factory connection selection and forwarding for queued mail.

tests/Integration/Mail/SendingQueuedMailTest.php

DatabaseQueueReservationTest.phpAdd database reservation recovery integration tests +390/-0

Add database reservation recovery integration tests

• Covers double-forward prevention, invalid records, nested concurrency, observers, commit listeners, and failed transaction unwind behavior.

tests/Integration/Queue/Database/Sqlite/DatabaseQueueReservationTest.php

QueueCapsuleTest.phpTest standalone database queue forwarding +44/-0

Test standalone database queue forwarding

• Verifies database and queue capsules share configuration and store jobs on the forwarded destination.

tests/Integration/Queue/Database/Sqlite/QueueCapsuleTest.php

RedisQueueTest.phpTest physical Redis inspection and forwarding +56/-2

Test physical Redis inspection and forwarding

• Covers aggregate counts across physical queues and release back to the resolved destination.

tests/Integration/Queue/Redis/RedisQueueTest.php

NotificationSenderTest.phpTest notification channel forwarding precedence +40/-0

Test notification channel forwarding precedence

• Verifies channel queues control forwarding while explicit notification and channel connections win.

tests/Notifications/NotificationSenderTest.php

FailoverQueueTest.phpTest failover forwarding boundaries +39/-0

Test failover forwarding boundaries

• Covers scoped forwarding for each delegated operation and preserves child defaults for omitted queues.

tests/Queue/FailoverQueueTest.php

QueueBeanstalkdQueueTest.phpAdapt Beanstalkd tests for route resolution +8/-5

Adapt Beanstalkd tests for route resolution

• Uses partial concrete containers so queues can resolve forwarding registries while retaining event coverage.

tests/Queue/QueueBeanstalkdQueueTest.php

QueueCapsuleManagerTest.phpTest standalone queue connector registration +59/-0

Test standalone queue connector registration

• Verifies capsule connections execute jobs and failover uses the capsule's own manager.

tests/Queue/QueueCapsuleManagerTest.php

QueueDatabaseQueueUnitTest.phpTest database reservation failure classification +98/-3

Test database reservation failure classification

• Covers transient errors, cancellation, cleanup failures, and invalid-reservation recovery.

tests/Queue/QueueDatabaseQueueUnitTest.php

QueueRedisQueueTest.phpTest direct Redis physical totals +37/-27

Test direct Redis physical totals

• Verifies global totals bypass per-queue overrides and query physical keys inside one pinned connection.

tests/Queue/QueueRedisQueueTest.php

QueueRouteContainerTest.phpTest queue route registry ownership +90/-0

Test queue route registry ownership

• Ensures routing consumers use their owning container, honor replacements, preserve early registrations, and remain isolated.

tests/Queue/QueueRouteContainerTest.php

QueueRoutesTest.phpTest enum-aware queue forwarding rules +163/-0

Test enum-aware queue forwarding rules

• Covers destinations, arrays, enums, zero values, attributes, explicit precedence, and failover scoping.

tests/Queue/QueueRoutesTest.php

QueueSqsQueueTest.phpTest forwarded SQS and FIFO destinations +64/-33

Test forwarded SQS and FIFO destinations

• Verifies final URLs, FIFO options, and delay validation while adapting container spies.

tests/Queue/QueueSqsQueueTest.php

SupportArrTest.phpUse strict empty array assertions +5/-5

Use strict empty array assertions

• Changes empty exceptValues and onlyValues expectations to strict assertions.

tests/Support/SupportArrTest.php

SupportBinaryCodecTest.phpComplete binary codec test typing +8/-2

Complete binary codec test typing

• Types nullable string inputs and documents binary value data providers.

tests/Support/SupportBinaryCodecTest.php

SupportCapsuleManagerTraitTest.phpTest capsule configuration repositories +10/-5

Test capsule configuration repositories

• Verifies capsules receive a functional Repository and preserve existing configuration bindings.

tests/Support/SupportCapsuleManagerTraitTest.php

ValidationValidatorTest.phpTest literal-dot rules added after construction +18/-2

Test literal-dot rules added after construction

• Covers escaped-dot attributes through initial, appended, and conditional rules plus repeated appends.

tests/Validation/ValidationValidatorTest.php

Migrations.phpAdd migration static-analysis fixtures +46/-0

Add migration static-analysis fixtures

• Asserts repository record shapes and migration creation and connection resolver callback types.

types/Database/Migrations.php

Schema.phpExpand schema static-analysis fixtures +38/-0

Expand schema static-analysis fixtures

• Asserts schema defaults, callback returns, parsed references, blueprint callbacks, and DDL option signatures.

types/Database/Schema.php

Documentation (22) +118 / -23
LazyCollection.phpRestore lazy collection split documentation +2/-0

Restore lazy collection split documentation

• Documents the purpose of the lazy collection split operation.

src/collections/src/LazyCollection.php

InteractsWithIO.phpAlign verbosity comment wording +1/-1

Align verbosity comment wording

• Hyphenates the human-readable verbosity description to match upstream wording.

src/console/src/Concerns/InteractsWithIO.php

ManagesAttributes.phpAlign scheduler description wording +1/-1

Align scheduler description wording

• Hyphenates the human-readable event description comment.

src/console/src/Scheduling/ManagesAttributes.php

AsBinary.phpComplete binary cast annotations +11/-0

Complete binary cast annotations

• Documents invalid-format exceptions and anonymous caster transformation methods.

src/database/src/Eloquent/Casts/AsBinary.php

blade.mdClarify isolated include data visibility +1/-1

Clarify isolated include data visibility

• Explains that isolated includes exclude parent variables but retain globally shared view data.

src/docs/blade.md

helpers.mdDocument preserved array filter keys +6/-6

Document preserved array filter keys

• Corrects exceptValues and onlyValues examples to show their original array keys.

src/docs/helpers.md

horizon.mdDocument connection-scoped Horizon clearing +8/-0

Document connection-scoped Horizon clearing

• Adds connection-specific clearing usage and explains metadata behavior for aliases sharing physical storage.

src/docs/horizon.md

migrations.mdCorrect MySQL instant locking guidance +1/-5

Correct MySQL instant locking guidance

• Removes an invalid instant-plus-no-lock example and states that INSTANT permits only DEFAULT locking.

src/docs/migrations.md

queries.mdDocument range subqueries and having variants +20/-0

Document range subqueries and having variants

• Adds closure subquery examples for between clauses and documents not-between and OR having methods.

src/docs/queries.md

queues.mdDocument queue forwarding workflows +27/-2

Document queue forwarding workflows

• Adds forwarding examples, precedence rules, failover constraints, worker migration guidance, and clearing behavior.

src/docs/queues.md

validation.mdDocument appending validation rules +10/-0

Document appending validation rules

• Shows how to add rules to an existing validator before validation.

src/docs/validation.md

verification.mdDocument resetting email verification +6/-0

Document resetting email verification

• Shows how to mark a user unverified after changing their email address.

src/docs/verification.md

README.mdAdd encryption package references +5/-1

Add encryption package references

• Links the Hypervel encryption documentation and Laravel source package.

src/encryption/README.md

README.mdAdd filesystem documentation link +3/-1

Add filesystem documentation link

• Adds the public documentation URL and moves the upstream source reference below Hypervel differences.

src/filesystem/README.md

RedisQueue.phpDocument pre-resolved migration keys +3/-0

Document pre-resolved migration keys

• Clarifies that delayed-job migration keys have already passed through queue forwarding.

src/horizon/src/RedisQueue.php

CollectsResources.phpDocument invalid resource collection exceptions +2/-0

Document invalid resource collection exceptions

• Declares that resource class inference may throw a LogicException.

src/http/src/Resources/CollectsResources.php

BinaryCodec.phpDocument unsupported binary formats +4/-0

Document unsupported binary formats

• Declares invalid-format exceptions for binary encoding and decoding.

src/support/src/BinaryCodec.php

Broadcast.phpRegenerate broadcast route signature +1/-1

Regenerate broadcast route signature

• Updates facade metadata for queue-aware forwarded connection resolution.

src/support/src/Facades/Broadcast.php

Bus.phpRegenerate bus route signature +1/-1

Regenerate bus route signature

• Updates facade metadata for queue-aware forwarded connection resolution.

src/support/src/Facades/Bus.php

Event.phpRegenerate event route signature +1/-1

Regenerate event route signature

• Updates facade metadata for queue-aware forwarded connection resolution.

src/support/src/Facades/Event.php

Notification.phpRegenerate notification route signature +1/-1

Regenerate notification route signature

• Updates facade metadata for queue-aware forwarded connection resolution.

src/support/src/Facades/Notification.php

Validator.phpClarify internal rule expansion behavior +3/-1

Clarify internal rule expansion behavior

• Marks addRules as internal and corrects its wildcard expansion comment.

src/validation/src/Validator.php

Other (2) +2 / -2
jobs.stubWiden generated queue attempt counters +1/-1

Widen generated queue attempt counters

• Changes generated jobs tables from an unsigned tiny integer to an unsigned small integer.

src/queue/src/Console/stubs/jobs.stub

0001_01_01_000006_testbench_create_jobs_table.phpWiden Testbench queue attempt counters +1/-1

Widen Testbench queue attempt counters

• Uses an unsigned small integer for job attempts in the Testbench migration.

src/testbench/hypervel/migrations/0001_01_01_000006_testbench_create_jobs_table.php

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Failover jobs stay on source queues 🐞 Bug ≡ Correctness
Description
FailoverQueue::push(), pushRaw(), and later() assign the forwarded queue to their local
$queue parameter but pass func_get_args() to attemptOnAllConnections(), which retains the
original call arguments. When a forward is scoped to the failover connection, underlying drivers
receive the source queue and do not match that failover-scoped rule, while pop() does use the
forwarded destination and cannot retrieve the dispatched job.
Code

src/queue/src/FailoverQueue.php[R177-179]

+        $queue = $this->resolveForwardedQueue($queue);
+
        return $this->attemptOnAllConnections(__FUNCTION__, func_get_args(), $job);
Evidence
The changed dispatch methods rewrite a local parameter and then delegate with func_get_args(),
which returns the originally supplied arguments for these by-value parameters.
attemptOnAllConnections() splats that array into the underlying connection; those drivers only
apply forwards whose connection equals their own name, whereas failover's read path resolves using
the failover connection name first.

src/queue/src/FailoverQueue.php[175-199]
src/queue/src/FailoverQueue.php[205-222]
src/queue/src/FailoverQueue.php[249-253]
src/queue/src/Queue.php[668-682]
src/queue/src/QueueManager.php[378-405]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Failover dispatch rewrites the local queue variable, but forwarding delegates the original method arguments through `func_get_args()`. As a result, failover-scoped forwards are skipped for `push`, `pushRaw`, and `later`, even though reads use the forwarded queue.

## Fix Focus Areas
- src/queue/src/FailoverQueue.php[175-199]

## Recommended Fix
Build the delegated argument arrays explicitly after resolving `$queue` (or replace the relevant queue element in the argument array) before calling `attemptOnAllConnections()`. Preserve the existing argument order for `push`, `pushRaw`, and `later`, including options and delay values.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Failover forwarding documentation is wrong 🐞 Bug ≡ Correctness
Description
The sentence in src/docs/queues.md says a connection-scoped failover forward without an explicit
destination queue makes each child connection use its own default queue.
QueueRoutes::forwardedQueue() instead retains the source queue when the configured destination is
null, and FailoverQueue passes that retained queue to every child connection.
Code

src/docs/queues.md[1710]

+A forward scoped to a `failover` connection requires an explicit queue name; otherwise, each child connection uses its own default queue.
Evidence
The queue-route registry stores a null destination for a forward declared with only connection:
and explicitly returns the original source queue when that destination is null. The failover driver
resolves this connection-scoped forwarding before passing the queue to its child connections.

src/queue/src/QueueRoutes.php[85-105]
src/queue/src/QueueRoutes.php[165-174]
src/queue/src/FailoverQueue.php[216-222]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
The failover forwarding documentation incorrectly says that omitting a destination queue makes child connections use their individual default queues. A connection-scoped forward with a null destination preserves the source queue instead.

Fix Focus Areas
- src/docs/queues.md[1710-1710]

Recommended Fix
Replace the claim with wording that explains a connection-scoped failover forward without a destination retains the original queue name for each child connection. Clarify that child defaults are used only when the dispatched job itself has no queue name to forward.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Direct schema proxy construction crashes 🐞 Bug ≡ Correctness
Description
SchemaProxy::__construct() now requires a Container, replacing the class's previous implicit
no-argument constructor. Applications that directly instantiate this public proxy with `new
SchemaProxy() fail with ArgumentCountError` before they can perform schema operations, while the
provider change only updates the framework-owned construction site.
Code

src/database/src/Schema/SchemaProxy.php[24]

+    public function __construct(protected Container $app)
Evidence
The proxy is public and its newly added constructor has a required parameter. The only repository
construction site was updated to supply $app, confirming that the previous zero-argument
construction path was removed rather than preserved.

src/database/src/Schema/SchemaProxy.php[14-25]
src/database/src/DatabaseServiceProvider.php[131-133]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
`SchemaProxy` was previously constructible without arguments and resolved its container globally. Requiring a `Container` now breaks direct consumers of this public class.

Fix Focus Areas
- src/database/src/Schema/SchemaProxy.php[24-25]

Recommended Fix
Make the constructor argument optional and fall back to the current container when it is omitted, while retaining the injected application container for framework-managed instances.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: 🧠 Deep: This cross-cutting 103-file Laravel parity sync has 299 independent hunks spanning queue, database, schema, broadcasting, validation, and other core paths, creating many independent logic risks that materially benefit from redundant review passes.

Grey Divider

Tip of the day
💡 Did you know, you can turn these tips off under Display preferences

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +177 to 179
$queue = $this->resolveForwardedQueue($queue);

return $this->attemptOnAllConnections(__FUNCTION__, func_get_args(), $job);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Failover jobs stay on source queues 🐞 Bug ≡ Correctness

FailoverQueue::push(), pushRaw(), and later() assign the forwarded queue to their local
$queue parameter but pass func_get_args() to attemptOnAllConnections(), which retains the
original call arguments. When a forward is scoped to the failover connection, underlying drivers
receive the source queue and do not match that failover-scoped rule, while pop() does use the
forwarded destination and cannot retrieve the dispatched job.
Agent Prompt
## Issue description
Failover dispatch rewrites the local queue variable, but forwarding delegates the original method arguments through `func_get_args()`. As a result, failover-scoped forwards are skipped for `push`, `pushRaw`, and `later`, even though reads use the forwarded queue.

## Fix Focus Areas
- src/queue/src/FailoverQueue.php[175-199]

## Recommended Fix
Build the delegated argument arrays explicitly after resolving `$queue` (or replace the relevant queue element in the argument array) before calling `attemptOnAllConnections()`. Preserve the existing argument order for `push`, `pushRaw`, and `later`, including options and delay values.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread src/docs/queues.md

An explicit connection configured on a job takes precedence over a forwarded connection.

A forward scoped to a `failover` connection requires an explicit queue name; otherwise, each child connection uses its own default queue.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Failover forwarding documentation is wrong 🐞 Bug ≡ Correctness

The sentence in src/docs/queues.md says a connection-scoped failover forward without an explicit
destination queue makes each child connection use its own default queue.
QueueRoutes::forwardedQueue() instead retains the source queue when the configured destination is
null, and FailoverQueue passes that retained queue to every child connection.
Agent Prompt
Issue description
The failover forwarding documentation incorrectly says that omitting a destination queue makes child connections use their individual default queues. A connection-scoped forward with a null destination preserves the source queue instead.

Fix Focus Areas
- src/docs/queues.md[1710-1710]

Recommended Fix
Replace the claim with wording that explains a connection-scoped failover forward without a destination retains the original queue name for each child connection. Clarify that child defaults are used only when the dispatched job itself has no queue name to forward.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

/**
* Create a new schema proxy.
*/
public function __construct(protected Container $app)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

3. Direct schema proxy construction crashes 🐞 Bug ≡ Correctness

SchemaProxy::__construct() now requires a Container, replacing the class's previous implicit
no-argument constructor. Applications that directly instantiate this public proxy with `new
SchemaProxy() fail with ArgumentCountError` before they can perform schema operations, while the
provider change only updates the framework-owned construction site.
Agent Prompt
Issue description
`SchemaProxy` was previously constructible without arguments and resolved its container globally. Requiring a `Container` now breaks direct consumers of this public class.

Fix Focus Areas
- src/database/src/Schema/SchemaProxy.php[24-25]

Recommended Fix
Make the constructor argument optional and fall back to the current container when it is omitted, while retaining the injected application container for framework-managed instances.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@hypervel hypervel deleted a comment from cubic-dev-ai Bot Sep 10, 2026
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