Sync Laravel updates: #58337 → #58564 - #578
Conversation
Port the current AsVector caster and grammar-owned vector distance support for PostgreSQL and MariaDB. Preserve stateless caster reuse across long-lived workers, native Expression handling, existing vector bindings, and the current Stringable embedding hook. Fix inherited alias defects by quoting column aliases as single identifiers and resolving expression-backed default vector aliases. Aggregate queries normalize relation constraints without eager-loading parent expansion, so a dotted alias produces exactly one aggregate. The owner approved the narrow change for custom builders overriding only parseWithRelations; eager loading and the underlying normalization extension point remain unchanged. Disable object caching for the vector caster so assigned Arrayable values read back as float arrays. Reject unsupported vector grammars before any embedding generation. Port all applicable current upstream tests, add focused regressions for these defects, and adapt the Laravel documentation for AsVector and MariaDB, including PostgreSQL-only extension setup. Upstream framework source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 Upstream documentation: 89e91b5cff48e1b9b1a7921300653eb1ceb7bfcb laravel/framework#58337 laravel/framework#61250 laravel/framework#61337 Query Builder substitutions from laravel/framework#60852 (the remaining files of that PR are tracked separately). Validation: changed test files, database unit suite through ParaTest, real MariaDB 11.8 vector integration, formatting, full source and type-fixture PHPStan. The unsupported-string regression fails before the guard and passes afterward; complete SQL assertions cover alias and aggregate fixes.
Complete Laravel framework PR #60852 using source revision 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Replace the remaining internal helper calls with direct construction and use the negative punctuation predicate. The public string helpers and their behavior remain unchanged. Preserve nullable application URLs, narrow terminal widths, generated view class casing, console cancellation handling and native Stringable interfaces. Query Builder substitutions were completed with the vector port; JSON:API and view compiler behavior already match, and Laravel Cloud integration remains unsupported. Validated the affected console, generator, mail and support suites with ParaTest, full source and type-fixture PHPStan, formatting, and generated facade consistency. Upstream: laravel/framework#60852
Complete the Tailwind health-view update from Laravel framework PR #58344 with the literal directive escape from PR #60340, using source revision 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Tailwind v4 was already present, but an application-defined theme directive could consume the CSS rule during Blade compilation. Use the normal Blade escape so the browser receives the literal CSS at-rule. Add a real health-route regression with compiled-view caching disabled for that test, preventing an older artifact from hiding the collision. The regression fails on the original template and passes with the escape; all existing health responses remain covered. Validated the health test file, affected ParaTest suites, full PHPStan source and type checks, and formatting. Upstream: laravel/framework#58344 Upstream fix: laravel/framework#60340
Keep small fractions at their original scale and omit the minus sign when rounding a negative magnitude to zero. Compare against zero at the same precision and locale so formatted zeros such as 0.00 and 0,00 agree. Preserve callback return types through withLocale and withCurrency while retaining Hypervel's coroutine-local overrides and exact finally cleanup. Correct formatting failure return types and document the list-of-tuples result from pairs. Preserve explicit integer exponent normalization. Complete the upstream regression cases for decimal formatting, rounding across unit boundaries, negative file sizes, nonfinite values, and pair steps. Keep the existing Hypervel tests and consistently type the touched test class. No new state, parser, cache, or public API is introduced. Ported from Laravel framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2: laravel/framework#58358 laravel/framework#58408 laravel/framework#58409 laravel/framework#59692 laravel/framework#60147 laravel/framework#60263 laravel/framework#60322 laravel/framework#60324 laravel/framework#60617 laravel/framework#60625 laravel/framework#60736 laravel/framework#60768 Validated the decimal regressions before and after the source corrections, both Number test classes through ParaTest, formatting, full PHPStan and type fixtures. Final review corrections passed the affected test class and targeted formatting check.
Describe useCollectionClass's nullable argument as an Eloquent collection class, matching the stored property and the serialization/restoration path. Import Collection for both annotations without changing the native signature, serialized property order, or morph-map behavior. Completes the remaining applicable change from the separately inspected post-cutoff Laravel typing PR. Its other four changes are already covered by Hypervel's native signatures and current annotations. laravel/framework#61457 Upstream merge: baedec2039f6fcbbb6578532c12f9aaebc5a6151 Validated with full PHPStan including the committed type fixtures, the repository formatter, and review of the queue serialization callers.
Port Laravel #60073's string connection/queue columns and compound connection/queue/failed_at index into the generator, Testbench schema and both local migration fixtures. The index's useful leftmost prefix serves connection-scoped counts; this does not add an index dedicated to pruning or queue-only lookups. Keep Laravel's bundled migration checks for apps that retain their original migration layout and explain their purpose. Correct the generated jobs and failed_jobs schemas to retain raw payloads as text. JSON storage rejects malformed jobs that must remain available for failure investigation and normalizes ordinary payloads. Failed-job storage uses string identifiers because the provider accepts non-UUID identifiers; native PostgreSQL UUID columns rejected supported input. The schema fix adds no runtime encoding, validation, compatibility branches or state. Port the complete upstream generator test and exercise both real generated migrations through database queue push/pop and failed-provider storage. Two payload cases cover malformed JSON, generated IDs, supplied string IDs and exact payload preservation. Proved each strict-column failure before its correction on PostgreSQL; final coverage passes on SQLite, PostgreSQL, MySQL and MariaDB. Affected tests, Testbench package-mode tests, formatting and full source/type analysis pass. Upstream: laravel/framework#60073 Source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2
Adapt Laravel #58357's service-port correction to Hypervel's container jobs. The database, Redis, Valkey, Reverb, Meilisearch and Typesense clients run inside their job containers and reach services by DNS name and internal port. Publishing those ports on the host serves no consumer. Remove eleven publication blocks across four workflows. Keep service images, health checks, internal port settings, matrices and test commands unchanged. Redis Cluster nodes and Reverb test servers run inside the job container and retain their existing loopback configuration. No dynamic host-port plumbing is required and no Hypervel port collision is claimed. Parsed all four YAML files and compared their structures with the base: only the eleven service publication fields differ, and every affected job declares a container. Live GitHub orchestration runs at the PR checkpoint. Upstream: laravel/framework#58357 Source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2
Complete the PendingRequest callback annotations from Laravel PR #58386 and correct an adjacent upstream retry defect. Async requests previously retried redirect responses without an exception and returned null when retry throwing was enabled. Require an exception before retrying and preserve the response when there is none. Compute the request exception once inside the existing failure handler and reuse it for the retry policy, delay and final return. Preserve cancellation handling, request-method capture, public APIs and protected helper signatures. Correct the documented delay callback type and missing ConnectionException import. Add synchronous and asynchronous regression cases with both retry throw settings. Both async cases fail before the correction. HTTP package tests, source and type-fixture analysis, formatting and generated-facade validation pass. Upstream: laravel/framework#58386 Porting source: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Merge the missing decimal condition fallback and fractional pluralization assertions from the current Laravel translation tests. Keep the stronger Hypervel assertions that exercise fractional modulo conversion and distinguish non-integral plural forms; the upstream additions supplement them. The existing numeric condition parser and local modulo casts already provide the intended source behavior. Add the provider title required by local conventions without changing translation runtime behavior. The edited test file, translation package tests, formatting and full static analysis pass. Upstream: laravel/framework#58367 laravel/framework#59174 laravel/framework#59268 Porting source: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Complete the user-facing documentation for the existing HandleCors::skipWhen API from Laravel PR #58361. Show registration in AppServiceProvider::boot, explain that a matching callback also bypasses the dynamic configuration resolver, and note that callbacks run before path matching. Place the section before dynamic configuration and link it from the contents and resolver discussion. The pinned upstream documentation has no equivalent usage example. Existing HTTP middleware tests pass; no runtime change or duplicate tests are needed. Upstream: laravel/framework#58361 Framework source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Documentation reference: 89e91b5cff48e1b9b1a7921300653eb1ceb7bfcb.
Record why deferred queue attempts may drain DeferredCallbackCollection. DeferredQueue schedules jobs through native coroutine-exit callbacks, so this collection does not contain the job being completed and cannot recursively run it. Laravel PR #58373 excludes deferred queue events because its scheduling uses the same collection. Copying that exclusion would suppress valid Hypervel callback execution. Preserve the existing behavior and document its owning boundary. DeferredCallbacksTest passes, including deferred and background connections; formatting and full static analysis pass. Upstream: laravel/framework#58373 Compared with laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Extend the existing teardown regression from Laravel PRs #58390 and #58440 beyond callback registration. Run process setup, test-case setup and process teardown, then verify that the nonempty process directory is removed while the shared root and sibling file survive. Use the standard process-isolated temporary directory and real filesystem binding. Retain facade application cleanup and rely on the central subscriber for duplicate framework-static resets. Preserve Hypervel’s stateless, idempotent compiled-view path handling. Validation: focused TestViews tests, related parallel-testing suites, formatting, and full source/type analysis pass. Upstream: laravel/framework#58390 laravel/framework#58440 Source reference: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Port all four mixed-value merge assertions from Laravel PR #58405 into the existing combined eager and lazy collection fixture. Preserve integer/string literals and verify both merge directions. Collection and Enumerable already expose the correct TMergeValue union, so no runtime or contract changes are needed. Validation: the focused type fixture and full source/type analysis pass; formatting is clean. Upstream: laravel/framework#58405 Source reference: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Complete the public documentation accompanying Laravel PRs #55941, #58399, #58413 and #58414. Describe startup and stopping registration from provider boot, the configured queue selection before a pop, the retrieved job after a successful pop, and exception-release metadata including backoff seconds. Runtime implementations and upstream assertions are already present. Keep the documentation concise and pair related hooks without duplicating listener examples. Verify every described field and dispatch condition against current source; no queue behavior or APIs change. Upstream: laravel/framework#55941 laravel/framework#58399 laravel/framework#58413 laravel/framework#58414 Source reference: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2; docs at 89e91b5cff48e1b9b1a7921300653eb1ceb7bfcb.
Port the remaining int-mask annotations and the original Response type fixture from Laravel framework PR #58379. Carry the same accepted flag set through Hypervel's existing decode helper so the public and internal boundaries agree without changing native signatures or runtime behavior. Preserve custom decoder precedence, flag-aware caching, falsy payload caching and centralized static cleanup. The upstream runtime assertions are already present; add only the missing upstream PHPStan fixture. Upstream: laravel/framework#58379 Source: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 Validation: complete source and type analysis, affected HTTP/Bus/response consumer tests, formatting and independent code review pass.
Complete the public documentation for Laravel framework PR #58379's JSON decoding flags. Show the flags arguments on object, collect and fluent, and explain per-call overrides and configuring the shared default during worker startup. Describe custom decoder precedence because decodeUsing replaces JSON decoding and makes flags inapplicable. Correct the object return type in the method list to cover scalar JSON and custom decoder results. Upstream: laravel/framework#58379 Compared with laravel/docs at 89e91b5cff48e1b9b1a7921300653eb1ceb7bfcb; its current page does not explain these defaults or custom decoding. Validation: checked examples and prose against response methods and existing decoding regressions; independent review completed.
Forward the supplied handler to dispatchSync when dispatchAfterResponse runs inline. Previously withoutDispatchingAfterResponses caused that argument to be discarded, invoking the command's own handler or failing for commands that rely exclusively on the explicit handler. Found while reconciling Laravel framework PR #58428. The contract and fake already include and forward the handler; the concrete dispatcher has the same omission in pinned upstream. Correct it at that single boundary, without changing deferred execution, queue handling or worker state. Add one regression using the existing immediate-command fixture. Verify that the explicit handler receives the identical command and that the command's own handle method does not run. The test fails before the fix and passes after it. Related upstream: laravel/framework#58428 Compared against laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: BusDispatcherTest, affected HTTP/Bus/response consumer tests, complete source/type analysis, formatting and independent review pass.
Complete the direct middleware coverage from Laravel framework PR #58400, using the current 13.x tests at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Hypervel's nullable-string token getter threw TypeError for array or numeric request input before tokensMatch could reject it. Return the raw value as mixed so the existing string predicate owns validation and the normal token mismatch response is preserved. No coercion or duplicate guard is added. Port all nine origin/token cases and add one regression for an array token. Use Hypervel's test base, session API, native types and centralized cleanup. Record the existing omission of deprecated CSRF middleware aliases and apply the imported exception and strict comparison conventions in the touched code. The regression fails with the former getter signature. Affected middleware, configuration, broadcasting and Sanctum tests pass, as do full formatting and both PHPStan checks. Peer review also verified reverse-order static cleanup. laravel/framework#58400
Port the five exclusion tests and fixture from the current Laravel 13.x implementation of PR #58400 at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Preserve path, URL, slash and wildcard assertions, using native types and Hypervel Testbench. Keep these service-free tests under tests/Http. Correct the upstream global-exclusion test: installing the same path as a local exclusion made its assertion pass without global registration. Supply an empty local list so the assertion depends on the global exclusion itself. Framework test cleanup owns resetting that static configuration. The test file and the affected middleware, configuration, broadcasting and Sanctum suite pass. Formatting and full source/type analysis also pass. laravel/framework#58400
Complete the existing omission record for Laravel's deprecated VerifyCsrfToken and ValidateCsrfToken aliases introduced by PR #58400. Hypervel already omits those classes and the validateCsrfTokens method. Direct application and package ports to PreventRequestForgery and the preventRequestForgery configuration method. Mention the native array type needed when overriding the exclusions property, and link to the canonical CSRF documentation instead of duplicating its feature examples. Checked the replacement names and property type against current source, and the guide anchor and link against the existing documentation. laravel/framework#58400
Complete Laravel framework PRs #58436, #58469 and #58753 against source revision 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Remove automatic aliases inferred from array keys, which can wrap already-aliased raw SQL into an invalid expression. Preserve the explicit selectExpression API and accept its current string form. Keep Hypervel single-identifier alias quoting and source-aware default columns. Adapt withCan to explicitly alias expression results while preserving model columns and caller selections; bound policy subqueries keep their existing path. Preserve source-alias regression assertions using supported keyed subqueries, and cover raw SQL preservation, model hydration, explicit selections and bindings. Verified the affected query and grammar tests, Auth suite and SQLite database integration suite, full source and type-fixture analysis, and formatting. No extra database queries or shared state are introduced. Upstream: laravel/framework#58436 Upstream partial revert: laravel/framework#58469 Upstream string support: laravel/framework#58753
Document selectExpression beside selectRaw, including string and expression inputs, single-identifier alias quoting, and when to use bindings instead. This completes the public documentation for Laravel framework PRs #58436 and #58753 while following the selection behavior restored by #58469. Explain how callers composing Gate selections use selectExpression for raw expressions and keyed addSelect for query builders. Name the model-column requirement and point callers to withCan when they want that composition handled for them. Checked the examples and descriptions against the query builder and Gate contracts; the accompanying runtime correction passed Auth and SQLite integration suites, static analysis and formatting. Upstream: laravel/framework#58436 Upstream: laravel/framework#58469 Upstream: laravel/framework#58753
Port the repeated-send regression from Laravel #58452 and the channel-reported failure case from #55507 against the current 13.x source at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Exercise the real provider listener for channel-owned failures and verify that a reported failure without an exception leaves no attempt state behind. Preserve the existing nested, sequential and coroutine-isolation regressions, moving their service-free test class into tests/Notifications. Retain Hypervel’s per-invocation sender and provider-owned listener instead of caching Laravel’s sender. The existing implementation avoids accumulating listeners, freezing a previous locale, or suppressing a later failure after a channel returns normally. Validation: affected test files, the Notifications ParaTest suite, formatting and full source/type analysis pass. Upstream: laravel/framework#58452 laravel/framework#55507
Complete Laravel #58457 and #60646 from 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Pass the requested encoding to the final mask slice, including both upstream Latin-1 assertions. Use the same internal encoding for afterLast, beforeLast and unwrap positions, lengths and slices. The previous mixed byte/character and internal/UTF-8 operations could split or corrupt correctly encoded SJIS input. Keep cheap suffix checks in chopEnd and unwrap, then verify character alignment before removing a character-counted suffix; a rejected chopEnd candidate continues to the next needle. Add one encoding-scoped regression covering extraction, wrapping, a backslash byte inside an SJIS character, real trailing backslashes and multiple suffix candidates. Restore process encoding in finally without yielding. Keep substrReplace and the byte-search APIs unchanged; this does not impose a new class-wide encoding policy. As with current Laravel, afterLast now follows mbstring substitution for invalid input bytes. Validation: SupportStrTest, the Support ParaTest suite, formatting and full source/type analysis pass. Upstream: laravel/framework#58457 laravel/framework#60646
Complete the user documentation for Laravel #58443 by showing preserveKeys on the anonymous collection returned by UserResource::collection. The method and its upstream runtime regression were already present; this example makes the per-collection option discoverable beside the existing class-level guidance. Checked the example against AnonymousResourceCollection and the pinned Laravel 13.x source at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. No source behavior or new test machinery is needed. Upstream: laravel/framework#58443
Honor the morph-map setting when restoring model identifiers so a class-name map key cannot redirect an ordinary queued model while alias serialization is disabled. Store integer morph aliases as integers, matching Laravel payloads and allowing Hypervel workers to deserialize them. Keep the nullable-string getter contract through explicit scalar normalization under strict typing. Preserve public property order and constructor class-name input. Extend the owning tests for opt-in gating, exact integer payloads, restoration, unmapped alias conversion and null classes. Rely on the existing global test subscriber for static cleanup. Upstream: laravel/framework#58939 Related feature: laravel/framework#58482 Source: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: owning serialization tests, Queue/Log/Scout suites, full source and type-fixture analysis, formatting and diff checks pass. Regression assertions fail against the previous implementation.
Recognize WithoutRelations on parent job classes while retaining cached metadata lookup for long-lived workers. Cache concrete and inherited presence separately; inspect parent classes without constructing attributes or inheriting trait attributes. Existing callers retain concrete-only lookup by default, and the existing reset clears both modes. Correct the old inherited-attribute expectation and port the upstream parent-class integration case. Restore the original one-model morph-map collection regression, including its exact serialized bytes and identity assertions, while preserving the custom collection ordering test. Remove duplicate static teardown and complete the touched test files native typing and method titles. Upstream: laravel/framework#59568 laravel/framework#58939 Source: laravel/framework 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: all four owning test files and Queue/Log/Scout suites pass, along with full source/type analysis and formatting. The inherited fixture retains relations with the old trait and excludes them with this fix. Cache tests cover independent modes, negative caching, trait exclusion and reset behavior.
Correct the stale claim that queued Eloquent collections never restore relationships. Explain that shared loaded relations are restored, distinguish plain arrays that carry full model state, and describe WithoutRelations on parent job classes. Document the existing morph-map serialization opt-in at its application-facing surface. Explain how stable aliases support model renames and require producers and workers to retain matching maps and settings while aliased jobs remain queued. Upstream features: laravel/framework#58477 laravel/framework#58482 laravel/framework#59568 Compared with laravel/docs at 89e91b5cff48e1b9b1a7921300653eb1ceb7bfcb, which still contains the stale collection paragraph and omits the other guidance. Validation: documentation checked against collection relation intersection, model restoration and ordinary array serialization. Existing and ported integration tests pass; linked documentation anchor and diff checks verified.
Complete the release half of Laravel #59948. Ownership inspection already excluded expired rows, but release still used that inspection as a preflight, so an expired original owner could no longer remove its row. Rows remained until reuse or pruning. Use the current upstream key-and-owner DELETE and report its affected-row result. This removes the preliminary SELECT, preserves another owner's row, and retains the concurrency-error handling introduced by #58507. Resolve the connection through Hypervel's existing resolver; coroutine connection retention and pool ownership remain unchanged. Adapt the release unit cases to the single query and consolidate identical zero-row mocks. Preserve the original expiration inspection test, add real expired-owner cleanup and repeat-release coverage, and verify wrong-owner release cannot remove the active owner's row. Keep both upstream error cases with the current single-query expectations. Upstream: laravel/framework#58507 laravel/framework#59948 Source: laravel/framework 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 Validation: both edited test files and the Cache ParaTest suite pass; full PHPStan source/type-fixture analysis and PHP-CS-Fixer pass. The expired-owner regression was reproduced against the previous implementation.
Carry the default value through InteractsWithData::enum with its own generic so a supplied enum default no longer leaves null in the inferred result. Preserve the existing enum normalization and runtime behavior. Port the complete current Request type fixture, including enum, route and JSON return assertions. Keep the accurate nullable route result when no resolver provides a route, and regenerate the Request facade from the formatted source annotations. Upstream: laravel/framework#58529 Fixture history: laravel/framework#44370 laravel/framework#53625 laravel/framework#55631 Source pin: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: full source and type-fixture PHPStan analysis, formatting, focused request/data tests through ParaTest, and the complete facade-docblock checks passed.
Document comma-separated index names for MySQL and MariaDB beside the existing index-hint APIs. Keep SQLite guidance separate because its indexed-by clause accepts one index name. Extend the existing query-builder test with a multiple-index assertion while retaining the single-index case. This protects the per-name validation already implemented by the grammar against returning to whole-string validation. Upstream: laravel/framework#58505 Source pin: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. No runtime changes were needed. Validation: the complete DatabaseQueryBuilderTest, formatting, full source/type analysis and diff checks passed.
The unique-until-processing listener test supplied a mock whose acquisition always succeeded. It passed even when the listener ran before its unique lock was released, so it did not protect the behavior its name described. Use an ArrayStore lock held before processing and reacquire that key from the existing listener fixture. Check that the replacement lock survives cleanup, preserving the previous once-only release expectation through observable behavior. Share the expected key between setup and assertions, and remove the fixture's canned-success mock without adding another test. This completes validation of Laravel's unique queued-listener port: laravel/framework#58402 Compared against framework 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. The production implementation and its ownership protections are unchanged. Validation: QueuedEventsTest, formatting, and source/type analysis pass. Deliberately late and repeated release each fail the corrected test at their respective assertions.
The first unique-listener example has no uniqueId, so its lock covers all instances of that listener rather than individual licenses. Describe that scope explicitly; the following example already introduces per-license uniqueness through uniqueId. Add the missing ShouldQueue and ShouldBeUnique imports to the custom-cache examples, and ShouldQueue to the six job-attribute examples that declare the interface without importing it. Each affected snippet failed interface resolution when evaluated with the real autoloader. These correct omissions inherited from Laravel's current documentation: laravel/framework#58402 laravel/docs#10996 Compared against docs 89e91b5cff48e1b9b1a7921300653eb1ceb7bfcb. Validation: all eight corrected snippets compile in isolated PHP processes. Formatting, source/type analysis and diff checks pass. No runtime behavior or application API changes.
Port the missing belongs-to-many eager-loading regression and its keyed posts fixture from Laravel. The test verifies that related model IDs remain the collection keys after eager loading; the existing relation dictionaries already implement that behavior. Document afterQuery and a slug-keyed related collection at the eager-loading surface. Match the explicit upstream array-key spelling on the through-relation dictionary without changing its equivalent type or runtime behavior. Add native test and fixture return types while preserving all existing callback and cursor cases. Upstream: laravel/framework#58506 Source: laravel/framework at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: the complete AfterQueryTest passes on isolated in-memory SQLite. The new assertion fails when a scratch relation dictionary drops associative keys. Formatting and full source/type PHPStan checks pass.
Finish the test and documentation portions of Laravel #58451 and #61056 against framework revision 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. The repository methods and enum normalization were already implemented. Correct all five missing-key default tests to return null from their store mocks. Previously each mock returned the expected default as a cache hit, so the assertions did not exercise fallback behavior. Preserve the scalar default case and add one closure-default assertion to the same string test. Merge upstream scalar literals into the existing tests, add the missing non-numeric string rejection cases and complete enum mismatch provider, and retain the additional Hypervel cases. Document typed retrieval, defaults, errors and numeric-string handling at the existing cache retrieval surface. Validation: CacheRepositoryTest, composer lint:fix, full source and type-fixture PHPStan, and diff checks pass. No runtime behavior, public API, coroutine state or hot-path work changes. Upstream: laravel/framework#58451 Upstream: laravel/framework#61056
Port Laravel #58573 from framework revision 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Remove the spaces around the database separator in the from() annotation, matching the adjacent startingValue() description and the current upstream text. This changes documentation formatting only. Formatting, full source and type-fixture PHPStan, and diff checks pass; no runtime test is needed for the spacing change. Upstream: laravel/framework#58573
Route exact zero through Number::format at every precision so locales with non-Latin digits produce the same zero representation as rounded values. This also lets the existing sign comparison suppress a minus sign when a small negative number rounds to localized zero. Keep the protected return refinement accurate for locale-dependent output. Extend the existing human-readable and abbreviated formatting tests with Arabic exact zero, rounded zero and maximum-precision cases. This completes the formatting corrections around Laravel's number history: laravel/framework#58358 laravel/framework#61457 Upstream reference: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: Number tests, affected parallel tests, formatting and full source/type-fixture static analysis pass.
Implement the existing cast comparison contract so a hydrated MariaDB vector and an equivalent assigned SQL expression are not always dirty. Decode each representation and compare native float32 bytes, matching MariaDB and PostgreSQL vector storage. Recomputed embeddings that round to the stored values no longer cause unnecessary updates, while the next representable float32 value still counts as a change. Handle a null original before packing. Cover both database representations, reassignment, recomputation, changed values, changed lengths and both null transitions through the model's dirty-tracking API. The reverse null transition remains handled by Eloquent's existing early exit. Correct the casting documentation to distinguish primitive null handling from custom cast classes, and explicitly describe nullable vector values. No mutable caster state or new comparison mechanism is introduced. Follow-up to the vector port: laravel/framework#58337 laravel/framework#61250 laravel/framework#61337 Upstream reference: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: vector model tests, affected parallel tests, formatting and full source/type-fixture static analysis pass. Existing MariaDB integration coverage still exercises vector insertion, updates and distance queries.
Port both upstream string-backed enum cases for named channels and custom channel classes. Hypervel already normalizes enum identifiers in the shared manager, so no redundant driver override is needed. Retain the existing integer-backed enum coverage and use the local typed container fixture. Document enum identifiers specifically when resolving a channel instance with Notification::channel. Point the repeated-send regression to the separate real-provider test that proves channel-owned failure events are not dispatched twice, preserving each test's distinct purpose. Laravel PR: laravel/framework#59783 Original change: 95891fa4a7dc34648d7e78695173148ba9a41299. Current upstream reference: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Validation: channel-manager and failure-event tests pass, including the affected parallel run. Formatting and full static analysis pass.
Clarify that a native PostgreSQL UUID column would reject the supplied identifier accepted by the failed-job provider. The comment now explains why the fixture protects the shipped migration's string column choice, without suggesting that the generated table still uses a native UUID. The test continues to generate the real queue migrations and verify exact payload bytes and supplied identifiers through the queue and failed-job provider. No schema or runtime behavior changes in this commit. Related migration port: laravel/framework#60073 Validation: the generated-table regression passes using isolated in-memory SQLite; formatting and whitespace checks pass.
The localized zero regressions assumed that the ar locale always selected Arabic-Indic digits. ICU 74.2 uses those digits by default, while ICU 76.1 in both PHP CI images selects Latin digits, causing correct formatter output to fail the assertions. Request ar@numbers=arab explicitly in the existing forHumans and abbreviate cases and explain why the numbering system is specified. Preserve every assertion and the source behavior. The tests still reject the earlier ASCII-zero implementation on both ICU versions. Validated the complete test file locally and in the PHP 8.4 and PHP 8.5 CI images, plus targeted formatting and whitespace checks. This corrects the regression coverage associated with the Number formatting port: laravel/framework#58358.
PR Summary by QodoSync Laravel parity through #58564 across framework subsystems
AI Description
Diagram
High-Level Assessment
Files changed (94)
|
Code Review by Qodo
1. Raw selections lose requested aliases
|
Greptile SummaryThis PR synchronizes a broad set of Laravel framework updates while retaining Hypervel-specific behavior across database vectors, query authorization, queues, HTTP retries, request-forgery validation, model serialization, string handling, and number formatting.
Confidence Score: 4/5The PR should not merge until generated failed-job storage either preserves or explicitly rejects identifiers longer than the new column limit. The generated migration narrows identifiers to a bounded string while the failed-job provider accepts arbitrary non-empty string identifiers, so failure logging can itself fail and discard diagnostic job data. Files Needing Attention: src/queue/src/Console/stubs/failed_jobs.stub, src/queue/src/Failed/DatabaseUuidFailedJobProvider.php
|
| Filename | Overview |
|---|---|
| src/database/src/Eloquent/Casts/AsVector.php | Adds nullable PostgreSQL/MariaDB vector conversion and float32-aware dirty comparison without exposing raw vector input to SQL. |
| src/database/src/Query/Builder.php | Moves vector SQL compilation into grammars, adds MariaDB support, and makes raw-expression selection aliases explicit. |
| src/auth/src/AuthServiceProvider.php | Preserves model columns and explicit aliases for expression-backed authorization selections. |
| src/http/src/Client/PendingRequest.php | Preserves successful and redirect responses during asynchronous retry processing while retaining exception-based retry behavior. |
| src/foundation/src/Http/Middleware/PreventRequestForgery.php | Allows malformed token types to reach the normal constant-time token validation and mismatch response. |
| src/contracts/src/Database/ModelIdentifier.php | Preserves integer morph aliases in serialized identifiers while retaining the nullable-string restoration interface. |
| src/reflection/src/ClassMetadataCache.php | Separates concrete and inherited class-attribute presence caches for inherited queue relation exclusions. |
| src/cache/src/DatabaseLock.php | Replaces the ownership read and delete sequence with one owner-qualified deletion that safely handles replacement owners. |
| src/support/src/Str.php | Makes changed boundary and mask operations consistent with their selected multibyte encoding. |
| src/support/src/Number.php | Corrects small fractions, localized zero rendering, negative-zero suppression, and unit-boundary rounding. |
| src/queue/src/Console/stubs/failed_jobs.stub | Preserves raw payload text and adds filtering indexes, but constrains provider-accepted string identifiers to 255 characters. |
Reviews (1): Last reviewed commit: "Select Arabic-Indic digits explicitly in..." | Re-trigger Greptile
| $table->text('queue'); | ||
| $table->jsonb('payload'); | ||
| // Payloads may supply identifiers that are not UUIDs. | ||
| $table->string('uuid')->unique(); |
There was a problem hiding this comment.
Failed identifiers can truncate
The failed-job provider accepts any non-empty string from a payload as its identifier, but this migration stores it in a default-width 255-character column. If a raw or externally produced payload has a longer identifier, logging the failed job can raise a truncation or data-too-long error, losing the diagnostic record. Please either validate the identifier length in the provider or use a column type that preserves every accepted identifier.
Knowledge Base Used: Queues, buses, and events
There was a problem hiding this comment.
The storage limit is real, but this PR does not introduce a narrower identifier limit: it replaces the previous UUID column with Laravel's standard uniquely indexed string column. Framework-generated job UUIDs are 36 characters. Exceeding the default 255-character limit requires a custom payload identifier outside that storage capacity.
We are retaining the indexed string column. Adding provider validation would still reject the failed-job record, while supporting arbitrarily long identifiers would require a different storage/indexing design without an established application requirement. Custom producers must supply identifiers that fit their configured failed-job schema. No change proposed.
There was a problem hiding this comment.
That’s fair. I rechecked the provider and migration: this is the framework-standard indexed string schema, and changing from uuid to string widens the supported range rather than introducing a narrower limit. Although the provider does not explicitly reject longer custom identifiers, supporting unbounded identifiers would require a separate storage/indexing design and is outside this PR’s scope. I’m withdrawing this finding.
Laravel updates
AsVector, move distance SQL into the database grammars, and port the current cast and query tests. Preserve PostgreSQL bindings and Hypervel's embedding hook. Document both databases, with extension setup limited to PostgreSQL.@themerule so an application's Blade directive cannot consume it. Verify the result through the real health route.selectExpressionaliases, accept its string input, and stop inferring aliases from array keys for raw expressions. Document explicit expression selection and policy-query composition.Str::maskslice and port both Latin-1 regressions. Retain Hypervel's existing public string-helper contracts.WithoutRelationson parent job classes, preserve morph-map opt-in, and support integer aliases in serialized identifiers. Document relationship restoration and stable alias configuration across producers and workers.afterQuery.Additional Hypervel fixes
parseWithRelationsoverride; eager loading and the shared normalization method retain their existing behavior.AsVector, so assigning an Arrayable value reads back as the promised float array. Compare cast values at stored float32 precision so assigning or recomputing an unchanged embedding avoids unnecessary updates. Document nullable vector values and correct the general null-casting guidance. Reject unsupported vector grammars before invoking embedding generation.withCanadds an expression-based authorization result. Use explicit aliases without discarding caller selections; bound policy subqueries retain their existing path.dispatchAfterResponseis configured to run inline. The dispatcher previously discarded it and could invoke the command's own handler instead.afterLast,beforeLastandunwrap. Check suffix character boundaries before trimming, so a backslash byte inside an SJIS character is not mistaken for a standalone suffix. Preserve multiple-candidate handling and the existing byte-search APIs.Summary by cubic
Syncs Hypervel with upstream Laravel changes through #58564, completing port coverage and fixing regressions across storage, queue, HTTP client, and string behavior. This adds vector search support, changes queue payload storage, and alters database lock release semantics.
Key changes:
AsVectorcast and vector distance queries for PostgreSQL and MariaDB via grammar helpers. Cast comparisons use stored float32 precision, so recomputed embeddings that round to stored values no longer mark models dirty.dispatchAfterResponseforwards explicit handlers when running inline.WithoutRelationson parent classes and supports integer morph aliases.Str::afterLast,beforeLast, andunwrapnow respect the internal encoding to avoid splitting multibyte characters.Written for commit 0598d24. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation