Skip to content

Sync Laravel updates: #57830 → #58005 - #571

Merged
binaryfire merged 23 commits into
0.4from
laravel-parity-57830
Sep 8, 2026
Merged

Sync Laravel updates: #57830 → #58005#571
binaryfire merged 23 commits into
0.4from
laravel-parity-57830

Conversation

@binaryfire

Copy link
Copy Markdown
Member

Laravel updates

  • #57830, #57937, #56512 — Accept query-expression contracts throughout relationship count and aggregate queries. Correct nullable morph counts and nested traversal across multiple morph types, preserving grouped conditions, integer existence-query optimizations and the current upstream regression tests. Document raw count expressions.
  • #44784 — Complete expression-contract support across connections, query sources, scalar retrieval, joins and SQLite schema bookkeeping. Preserve model casts and accessors when retrieving expression results. Retain explicit table aliases for default projections instead of trying to infer table identity from raw SQL. Include the current upstream JSON grammar tests and regenerate the DB facade.
  • #49912, #53996, #54668 — Complete deferred aggregate expression support and document raw aggregates, inline relationship absence queries and constrained eager loading. Accept expressions at the Model and Collection forwarding methods without changing aggregate queries or model matching.
  • #57896, #60782 — Complete model violation, exception configuration, HTTP callback and password-rule type annotations. Allow callbacks to return values where the existing API permits them. Preserve named password-rule keys and Hypervel's actual exception and callable contracts.
  • #57881 — Require laravel/serializable-closure 2.0.11 or later so chained queued closures restore correctly. Use the dependency's wrapper-preservation fix without adding a raw-closure compatibility branch. Restore the public queued-closure property and verify real closure execution after consecutive batches with database and synchronous queues.
  • #57924, #31507 — Simplify the preg_replace_array callback and complete its current upstream tests, including sparse and associative arrays, falsy values and advanced array pointers. Preserve replacement behavior and add native types.
  • #57915 — Document PostgreSQL full-text modes and raw query syntax. Add execution coverage for raw operators and prefix matching; the grammar and compilation coverage were already present.
  • #58012 — Complete the Context scope type fixture and fluent hydration/dehydration callback annotations. Preserve callback return propagation and the existing listener lifetime.
  • #57951, #57943, #61217, #61106, #55343 — Complete response throwUnless() coverage and pass the HTTP method to retry callbacks. Preserve Hypervel's response replacement callbacks, pooled handlers and coroutine cancellation. Both synchronous and asynchronous retries report the captured method, including middleware rewrites. Keep method lookup nullable for custom clients and failures before request capture. Document the callback arguments, including nullable exceptions for non-error responses.
  • #61047 — Reject non-stream resources passed to HTTP fake responses with the current upstream exception. Complete accepted-body annotations and sequence coverage for PHP stream resources and PSR-7 streams, preserving JSON errors and header handling.
  • #58058, #60176 — Align queue command help and complete idle-stop event assertions. Describe the idle interval from the last processed job, including the Horizon command and worker options. Preserve concurrent-worker completion tracking, per-run resets and running-job checks.
  • #57986, #58963 — Complete event subscriber, queued listener and batch callback types. Preserve arbitrary container keys, object-method listeners, invokable listeners and Hypervel's argument handling. Replace the ineffective upstream method-local type alias with an inline callback contract.
  • #57982, #44906 — Complete string-trimming tests for nested wildcard exclusions, global exclusions, zero-width characters and repeated invisible characters. Preserve Hypervel's existing tests and document configuring attribute and wildcard exclusions. The broader application-skeleton changes from #47309 are not included.
  • #57923 — Complete reload-command exclusion coverage and correct package guidance. Verify the displayed task is excluded, and clarify that Hypervel reloads server workers without terminating the master process.
  • #57987, #58935, #53906, #53531, #58274, #59051 — Update the Markdown mail theme, logical text alignment and long-link wrapping while retaining Hypervel branding. Add the layout head slot and locale-derived language attribute. Document direct layout composition and CommonMark extensions. Correct the upstream paragraph and third-level heading rules that still forced left alignment, and retain distinct existing rendering and custom-theme tests.
  • #57499, #58070, #58606, #58659 — Complete custom job identity coverage and documentation for uniqueness, debounce, overlap prevention and exception throttling. Correct an upstream test that duplicated the with-ID case. Type fake batch callbacks for PendingBatchFake, which owns fake-specific inspection methods, while retaining PendingBatch for chained assertions. Update the Bus facade's collection annotation.
  • #60906, #61039, #61234 — Release retained unique-until-processing locks when middleware permits a retry to run. Preserve owner checks so an older job cannot release a successor's lock. Complete upstream coverage for retries, missing models, skipped events and rollback while retaining Hypervel's existing guarded event dispatch and transaction ownership.
  • #57975 — Complete queue worker interruption-polling tests with exact cache-call assertions adapted to Hypervel's batched pause checks. Verify disabled polling makes no corresponding cache reads and still processes the job.
  • #57988, #60430, #60215, #60224, #44927, #58345 — Complete command prohibition and failure reporting. Applications can prohibit cache clearing, queue clearing, failed-job flushing and key generation during provider boot. Prohibition takes precedence over force, show and lock-clearing options. Return failure when a command is prohibited or a key cannot be published, preserving atomic writes, file permissions, configuration consistency and filesystem exceptions. Document the controls beside each command.
  • #60873, #61004 — Clear multiple comma-separated queues with combined counts and plural output. Preserve valid numeric names such as 0, 01 and 1, trim empty entries and clear duplicates only once. Include every upstream queue-clear test. Complete the corresponding collection reduction in custom-pivot detachment without changing retrieval, deletion events or query counts.
  • #58005 — Document conditional column and index changes, including presence and absence callbacks, index names or column lists, and the optional index-type argument. The schema methods were already present.

Additional Hypervel fixes

  • Normalize numeric expression values only where text is required, fixing aggregate aliases, scalar retrieval and cursor projection metadata. Preserve raw expressions in SQL and allow the valid attribute key 0 through model accessors and casts.
  • Preserve explicit query-source aliases through clones and reset them when the source changes. Use those aliases consistently for added selections, grouped pagination counts and relationship aggregates. Prefix the table segment of schema-qualified identifiers instead of the schema.
  • Preserve wildcard and variance metadata in generated facade generics instead of reducing them to invalid or overly broad mixed arguments.
  • Accept all supported callable forms in the validation exponent policy, converting once when registered. Preserve compiled and delegated validation behavior.
  • Allow supported stream bodies through response sequences instead of rejecting them under strict typing or converting PSR-7 streams to strings prematurely.
  • Recover unique-lock ownership from the actual queued payload for jobs without Queueable, including middleware failures and custom cache repositories. Keep lock resolution in UniqueLock and preserve property precedence for jobs that use Queueable.
  • Prevent ordinary child jobs from inheriting their parent's unique-lock metadata. Restore the caller's context after payload hooks, including when a hook throws, without adding cache reads or shared worker state.
  • Retain the database-returned column name when plucking Eloquent expressions so casts and accessors also work with quoted aliases. Preserve keys, callback ordering and ordinary string plucks without parsing SQL or adding queries. Custom low-level query builders overriding pluck() must also override pluckWithColumn() to customize Eloquent expression plucks; this narrow difference is documented in the database README.
  • Reset HTTP request capture for every attempt, preventing custom clients from inheriting an earlier request. Capture replacements returned by beforeSending callbacks for retry and response callbacks while preserving RequestSending timing and unchanged request identity.
  • Increase footer-text and success-button contrast in the default mail theme. Keep all button padding borders aligned with the new background color.
  • Correct database test expressions that underflowed on unsigned IDs and assertions that assumed morph-discovery order. Retain every expected result across SQLite, MySQL, MariaDB and PostgreSQL. Require the exact bulk-job count alongside the existing identity assertions.

Summary by CodeRabbit

  • New Features

    • Database queries and Eloquent aggregates support broader raw expressions and schema-qualified identifiers.
    • Queue clearing supports multiple queues, duplicate filtering, and production safeguards.
    • Cache clearing and key generation can be prohibited with clear failure statuses.
    • HTTP retry callbacks receive the request method; response sequences support streams and resources.
    • Email layouts support localized language attributes and custom head content.
    • Validation callbacks accept callable objects.
  • Bug Fixes

    • Improved unique-job lock handling during retries and nested dispatches.
    • Corrected access to attributes named "0" and qualified database columns.
  • Documentation

    • Expanded guidance across queue, database, mail, cache, encryption, HTTP, migration, and request features.

Port Laravel framework #57830 from 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. Accept the expression contract at all relationship count, column and aggregate boundaries, preserving concrete expression construction and native typing.

Correct two defects also present in upstream: wildcard morph queries must compare a null relationship count of zero in SQL for row-dependent expressions, and nested morph traversal must retain an independent remaining path for each type. Preserve integer EXISTS optimization, callback grouping, nested absence semantics and relationship timeout enforcement without new shared state or extra database queries.

Normalize numeric aggregate expressions only when deriving textual aliases, fixing a Hypervel strict-typing TypeError for valid COUNT(1) and SUM(1.5) expressions. Retain and extend upstream nested and nullable-morph tests, add contract and result-set regressions, update type fixtures and document raw count expressions.

Upstream: laravel/framework#57830
Related behavior and preserved tests: laravel/framework#54363
laravel/framework#57937
laravel/framework#56512

Validation: changed test classes and affected relationship ParaTest suite pass on SQLite; full source and type-fixture PHPStan, formatting and diff checks pass. Reviewed before commit.
Complete the current Laravel relationship and callback typing updates from
13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2:

- laravel/framework#57896
- laravel/framework#49912
- laravel/framework#53996
- laravel/framework#54668
- laravel/framework#60782

Deferred relationship aggregates rejected expression columns even though
their query-builder counterparts already accepted them. Accept the query
Expression contract at every Model and Collection forwarding boundary,
including polymorphic aggregates. Preserve existing aggregate SQL, keyed
model matching, original attribute synchronization, casts and query counts.
Cover the real deferred path with an integration regression and protect
each forwarding signature in the existing type fixtures.

Match the current violation and exception-configuration callback return
types without constraining callers to void callbacks. Restore the upstream
HTTP callback and returned-handler exception annotations. Describe password
rule iterator keys as array-key: named custom rules preserve string keys,
so upstream's integer-only annotation is still too narrow.

The exponent-policy setter also incorrectly accepted only Closure although
Laravel supports every callable form. Accept callable and convert once to
a first-class closure at registration, retaining the typed property and
unchanged compiled and delegated validation paths. Verify an invokable
policy can both permit and reject validation.

Document the existing inline relationship absence and constrained eager
loading APIs, plus raw aggregate expressions and their deferred forms.
The local Laravel documentation has no corresponding passages. Apply the
required import, method-title and boot-time registration documentation
conventions without changing container or callback lifetime behavior.

Validation: changed PHPUnit files and type fixtures; affected Eloquent,
HTTP, Foundation and validation suites through ParaTest; composer lint:fix;
full composer analyse; git diff --check. Peer review approved the complete
diff, including the corrected password iterator key type.
Port the remaining applicable source and tests from Laravel framework PR
#44784, using 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2:
laravel/framework#44784

Accept contract-only expressions across connection/table forwarding, raw
sources, scalar retrieval, column comparisons, join shortcuts and SQLite
blueprint bookkeeping. Preserve expressions in SELECT clauses and resolve
scalar values from returned field names rather than interpreting SQL.
Eloquent still uses model attribute access, preserving casts and custom
accessors. Correct the two attribute guards that rejected a valid '0' key.
Convert numeric expression values only at boundaries that require text.

Retain explicit logical FROM aliases on each query builder so addSelect,
joined grouped pagination counts and relationship aggregates can select the
primary source after fromSub or aliasing. Reset aliases when replacing the
source and preserve them through ordinary clones. Prefix the table segment
of schema-qualified identifiers, not the schema. Keep projectable aliases
distinct from arbitrary updatable raw-table identity: do not infer table
names from raw SQL or introduce an unqualified wildcard fallback. SQLite's
native schema-wildcard restriction is handled by explicit test aliases.

Correct impossible native type claims on qualifyColumns and
withWhereRelation, and type castAsJson at its driver-neutral escape boundary.
Restore all four applicable upstream JSON grammar tests and their assertions.
Add regression coverage for contract expressions, numeric projections,
model accessors, aliases, bindings, prefixed execution, grouped counts,
relationship aggregates, and schema rollback. Use a second parent row to
prove that the fromSub relationship-count query actually filters its source.

Fix the facade documenter's loss of generic argument variance, which turned
Builder<*> into invalid Builder<mixed> annotations. Preserve the parser's
wildcard, covariant and contravariant metadata in the existing conversion;
regenerate DB and cover the distinct forms in one end-to-end test. Remove
the redundant test-method title docblock under the repository convention.

Validation: immediate changed-file PHPUnit runs; broader database units,
SQLite integrations and facade-documenter suites; full source and type-fixture
PHPStan; formatting and diff checks; read-only lint of all generated facades.
Execution against MySQL, MariaDB and PostgreSQL remains CI coverage.
Complete the applicable changes from Laravel 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2:

- laravel/framework#57881
- laravel/framework#57924
- laravel/framework#31507
- laravel/framework#57915
- laravel/framework#58012

Require serializable-closure ^2.0.11 in the root and queue package. Its
wrapper-preservation fix resolves the actual chained-closure restoration
failure before displayName runs, so keep the typed implementation without
Laravel's raw-Closure compatibility branch. Other split packages inherit
the required floor through queue where needed. Keep the installed current
serializer version; do not introduce a version check or fallback.

Restore the public SerializableClosure property exposed by Laravel's
CallQueuedClosure. Extend the existing batch matcher to check original
closure identity through that property. Add real completion coverage for a
closure following two consecutive batches, reusing the existing fixtures
and worker runner. Batch callback options round-trip through the database
repository with both database and sync queue connections.

Simplify preg_replace_array's callback to return array_shift directly and
apply native parameter and callback return types. Port every current
upstream test case, including empty, sparse, associative, falsy and advanced
array-pointer inputs, into the established focused helper-test layout.
The cleanup preserves behavior rather than changing replacement semantics.

Document PostgreSQL full-text mode options and a valid raw query example.
The grammar and upstream compilation assertions were already present;
add execution coverage for raw operators and prefix matching against the
existing PostgreSQL article fixtures.

Port the context scope type fixture, retaining the integer-range and null
assertions, and cover fluent hydration/dehydration callbacks. Correct their
return annotations to mixed while retaining the base Repository argument,
worker-global listener registration and Laravel's false-return propagation.
No new state, extra queries, serialization passes or compatibility machinery.

Validation: changed test files pass immediately; database-backed queue
chaining and the new sync case pass; raw full-text runs against isolated
PostgreSQL; the Log ParaTest suite, full source and type-fixture PHPStan,
formatting and diff checks pass. Serializer minimum-version behavior was
independently verified; framework checks use installed v2.0.16.
Pass the HTTP method to retry callbacks for both synchronous and async
requests. Synchronous callbacks use the captured request method, including
middleware rewrites; async callbacks retain Laravel's original method
argument. Make both synchronous lookups null-safe because caller-supplied
clients bypass request-capturing middleware and middleware failures can
occur before a request is captured.

Port Laravel's early successful-response return while preserving Hypervel's
response replacement callbacks, retry decision sharing and reset, transport
exception conversion, pooled handlers, and coroutine cancellation behavior.
Keep the existing concise null-coalescing expression and its precise PHPStan
suppression instead of Laravel's analysis-only ternary rewrite.

Restore all seven current upstream boolean/closure throwUnless and async
retry-method tests. Preserve Hypervel's existing PendingRequest tests under
accurate names and retain named-callback coverage. Add focused regressions
for middleware-rewritten methods and custom clients, and extend the existing
middleware-failure test to check the nullable method argument.

Document callback signatures and the third HTTP-method argument. Correct
Laravel's non-nullable exception annotation and documentation examples:
non-error responses such as HTTP 304 pass null to the retry callback.
The integer sleep callback annotation matches the synchronous delay path.

Upstream PRs:
laravel/framework#57951
laravel/framework#57943
laravel/framework#61217
laravel/framework#61106
laravel/framework#55343
Synchronous method argument: laravel/framework commit 39b84dc961ab947b00b88754fc46cb01e14cf6b5.
Port source: Laravel 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

Validation: HTTP client PHPUnit tests, HTTP package ParaTest, HTTP client
facade integration tests, targeted formatting, full source/type-fixture
PHPStan, and git diff --check pass. Existing HTTP package skips remain.
Port Laravel framework PR #61047 from 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2:
laravel/framework#61047

Reject non-stream resources at the fake-response factory with the upstream
InvalidArgumentException instead of allowing Guzzle's stream conversion to
fail later. Preserve JSON encoding errors and existing header normalization.

Restore the supported body PHPDocs on response, psr7Response, failedRequest
and ResponseSequence::push. Resources cannot be represented by a native PHP
union, so push now uses mixed with the finite upstream PHPDoc contract.
Previously it rejected valid stream resources and PSR-7 streams from strict
callers, and weak callers coerced PSR-7 streams to strings prematurely.

Port both current upstream rejection tests, reusing and renaming the existing
unsupported-object case. Add a focused sequence regression for both stream
forms with exception-safe cleanup, and document the accepted public inputs.

Validation: changed HTTP tests, the complete HTTP ParaTest suite and HTTP
facade integration tests pass. Full source/type PHPStan, scoped formatting
and diff checks pass. Self-review and independent code review are complete.
Reconcile Laravel framework PRs #58058 and #60176 against 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2:
laravel/framework#58058
laravel/framework#60176

Port the six queue:listen and queue:work option-description corrections.
Describe stop-when-empty-for using the interval since processing a job,
rather than claiming the timer starts when the queue becomes empty. Correct
the matching WorkerOptions explanation, Horizon consumer and queue docs.

The runtime feature was already adapted for concurrent workers. Preserve its
per-run reset, completion timestamps, queue-poll eligibility and running-job
checks. Restore the complete upstream WorkerStopping status, options identity
and reason assertions in both existing idle-period regressions. Keep the
Hypervel clock assertions, exact event counts and running-job coverage.

Validation: changed QueueWorkerTest, focused queue command/listener/worker
ParaTest tests and Horizon command tests pass. Full source/type PHPStan,
scoped formatting and diff checks pass. Parsed option names and defaults
remain unchanged. Self-review and independent code review are complete.
Port the remaining event annotations from Laravel #57986 using the corrected
current forms from #58963. Preserve subscriber resolution through arbitrary
container keys, object-method listener pairs and invokable listeners. Queued
callbacks now declare their existing void return without changing dispatch,
argument cloning, queue ownership or coroutine-local state.

Describe allowFailures callbacks inline with their Batch and nullable Throwable
arguments. Upstream's method-local PHPStan type alias does not resolve; the
inline contract fixes that defect without adding a one-use class-level alias.

Keep Hypervel's accurate mixed halted-listener returns, nested listener maps,
QueueFactory resolver and nullable transaction-manager resolver. Blade's bound
callables remain broader than upstream's Closure-only annotation because
compatible compiler-method callables work through Closure::fromCallable.

Upstream:
laravel/framework#57986
laravel/framework#58963
Source: laravel/framework 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

Validation: Events and Bus suites pass under ParaTest; full source and type
fixture analysis, formatting and diff checks pass. Independently reviewed.
Merge all thirteen current upstream HTTP TrimStrings tests into the existing
Foundation test class. Preserve every literal and assertion, including nested
wildcard exclusions, global exclusions, zero-width characters and repeated
invisible-character combinations. Retain Hypervel's existing tests and use the
framework's shared static cleanup instead of adding another teardown path.

The implementation already supports these cases through Str::is and Str::trim,
including Hypervel's early return for non-string input. Keep that behavior and
add a concise bootstrap example for attribute names and wildcard exclusions.
The pinned Laravel requests and middleware docs do not describe this option.

Upstream:
laravel/framework#57982
laravel/framework#44906
The global-exclusion test originates in
laravel/framework#47309;
its broader slim-skeleton changes remain a separate parity investigation.
Source: laravel/framework 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Documentation reference: laravel/docs at
2914ba0b06c6be40c2f1f992555853f6266707d6.

Validation: the complete middleware test class passes. Source/type analysis,
formatting and diff checks pass. Ported string literals and assertions were
compared against upstream, with an independent review of the invisible bytes.
The command-name exclusion test checked for a command identifier that
ReloadCommand never prints. Assert absence of the displayed task label so
the test detects a failure to exclude by command, while retaining the
existing positive and default-task controls. Add native void return types
to the test methods.

Correct the package guide's inherited claim that reload terminates every
service. Hypervel reloads server workers without terminating the master;
the existing deployment guide owns the operational explanation.

Reconciles Laravel's reload command and provider registration:
laravel/framework#57923
Laravel source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 (13.x).
The command implementation was already adapted, including Hypervel's
server reload task; this fixes its existing test and documentation.

Validation: ReloadCommandTest and scoped PHP-CS-Fixer pass; diff check is
clean. No runtime source changes.
Bring the default mail stylesheet forward to the current Laravel 13.x
neutral palette, card styling, logo spacing, logical alignment and long
link wrapping. Preserve Hypervel branding and existing renderer behavior.

Add the HTML layout's head slot and locale-derived lang attribute. Document
direct layout customization, the explicit header/footer slots, and the
existing CommonMark extension configuration. Preserve the adapted mail
rendering and custom-theme tests that upstream removed when introducing
extension tests; those tests still cover distinct behavior.

Correct an upstream omission in the RTL alignment update: standalone p
and h3 rules still forced left alignment, overriding the grouped p rule
and leaving third-level headings inconsistent with h1/h2. Use start for
both, while retaining intentional centered container/footer alignment.
The stylesheet otherwise matches the pinned source exactly.

One integration fixture and test verify head content in the rendered
head, mailable locale normalization, and final inlined p/h3 alignment.
No new runtime state, compatibility branches or rendering machinery.

Upstream PRs:
laravel/framework#53906 (long mail links)
laravel/framework#57987 (theme modernization)
laravel/framework#58935 (logical alignment)
laravel/framework#53531 (head slot)
laravel/framework#58274 (language attribute)
laravel/framework#59051 (extension configuration;
source and tests already present, public documentation completed here)
Laravel source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 (13.x).
Docs consulted: 2914ba0b06c6be40c2f1f992555853f6266707d6.

Validation: affected Markdown test, complete Mail unit and integration
suites via ParaTest, scoped PHP-CS-Fixer and diff checks pass. Confirmed
the upstream p/h3 alignment defect through the installed CSS inliner.
Complete the remaining test and documentation coverage for Laravel's custom
job identity support, and restore the callable contracts on batch test fakes.
The shared queue documentation keeps these related updates in one commit.

Port the current strict unique-lock assertions and correct an upstream test
that duplicates the display-name-with-ID case instead of checking a name
without an ID. Retain all existing tests, type the test methods and helper,
and correct the stale model annotation.

Document displayName for unique and debounced jobs, overlap prevention and
exception throttling. Clarify the class fallback and shared/custom-key
behavior. Existing hashed lock keys, owner-aware lock handling and the
native rate limiter's single physical-key hash remain unchanged.

Annotate assertion callbacks with PendingBatchFake so both fake-specific
and parent PendingBatch callbacks are accepted. Upstream's parent-only
callable contract rejects its own fake-specific usage. Chained assertions
retain PendingBatch. Correct the hasJobs documentation examples to name the
fake that owns the method, and regenerate the Bus facade's batch collection
generic. Native source signatures and runtime behavior are unchanged.

Upstream source: Laravel 13.x at
01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

PRs and related current behavior:
laravel/framework#57499
laravel/framework#59141
laravel/framework#58070
laravel/framework#58606
laravel/framework#58659

Validation: UniqueJobTest and SupportTestingBusFakeTest pass. Full PHPStan
source/type checks, focused callback and collection-type verification,
formatting, Bus facade lint and diff checks pass.
Port Laravel framework #60906, #61039 and #61234 from 13.x source
01d008c9b5f32cb7c5e50a9a22273113d810b2a2:
laravel/framework#60906
laravel/framework#61039
laravel/framework#61234

Release an owned unique-until-processing lock when middleware allows a
later attempt to execute, while preserving the first-attempt restriction
for jobs without an owner token. Restore all six missing upstream tests
for retries, successor locks, missing models, skipped events and rollback.
The skipped event and rollback ownership guards already existed natively.

Also fix two related Hypervel defects. Jobs without Queueable now recover
their captured owner from the actual queued payload, including middleware
failure and unnamed custom cache repositories. Keep cache and key resolution
inside UniqueLock and retain Queueable property precedence. The optional
owner and queued-job parameters were explicitly approved; ordinary job APIs
are unchanged, while overrides of those two methods must match signatures.

An ordinary child dispatch no longer copies its parent's unique lock
metadata into its payload. Strip only the three lock fields inside the
existing exception-safe Context scope and restore application context after
payload hooks. Preserve the fast path without creating context or adding
worker state, cache lookups or network calls.

Verification: immediate changed-file PHPUnit runs, focused Queue/Bus/Event/
Context ParaTest suites, full source and type-fixture PHPStan, formatting
and diff checks pass. Independent review additionally passed full Queue,
Bus, Log and Events coverage and reproduced both adjacent fixes. Regression
coverage checks successor-owner protection, nested missing-model cleanup,
unnamed repositories and context restoration after a throwing payload hook.
Port the current Laravel tests for disabling restart and pause polling:
laravel/framework#57975
Source: 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

Use the upstream Cache facade setup while asserting Hypervel's actual
store, restart, global-pause and batched queue-pause call counts. Forbid
obsolete driver calls after installing the facade mock. Preserve the
existing coroutine worker behavior and job completion assertions.

The changed test file, affected console tests, PHPStan and formatting pass.
The change received independent review before committing.
Complete the command updates from current Laravel 13.x:
laravel/framework#57988
laravel/framework#60430
laravel/framework#60215
laravel/framework#60873
laravel/framework#60224
laravel/framework#44927
laravel/framework#58345
laravel/framework#61004
Source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

Allow applications to prohibit cache:clear, queue:clear and queue:flush
during boot. Check prohibition before any clearing or force option and
register the flags in the existing test cleanup registry. Document these
public controls alongside the existing key:generate prohibition.

Clear comma-separated queues with the current upstream output and all
five upstream test cases. Preserve Hypervel's explicit zero/default name
handling and correct upstream filtering and loose deduplication: queue
names 0, 01 and 1 are distinct and must each be cleared exactly once.
Retain pooled connection forwarding without extra driver operations.

Return failure when key generation is prohibited, confirmation is
declined, or the environment key cannot be replaced. These paths formerly
reported an error or refusal but exited successfully. Preserve atomic
publication, file permissions, config consistency and IO exceptions.
Return explicit success for display and successful publication, removing
the return-of-void suppression. Failed-job flushing also returns explicit
failure on prohibition and success after either retention branch.

Complete the collection reduction update in custom-pivot detachment while
preserving pivot retrieval, constraints, delete events and query counts.
Keep existing pivot regressions instead of adding duplicate coverage.

Extend existing cache and key-generation tests, remove an unused cache
test stub, and add focused failed-job flush and numeric-queue regressions.
The production confirmation test uses the existing prompt fallback.

Changed-file tests, affected ParaTest suites, full source/type PHPStan,
formatting and diff checks pass. Independent review also verified the
Database, Cache, Queue, Console and Encryption suites before signoff.
Complete the public documentation for the already-present index callbacks:
laravel/framework#58005
Source: Laravel 13.x at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.

Explain the four column/index presence and absence callbacks, show their
Blueprint usage, and describe index-name or column-list selection with
the optional fourth index-type argument. Laravel docs at
2914ba0b06c6be40c2f1f992555853f6266707d6 have no matching coverage.

Verified the examples against the schema builder and existing docs style.
Independent review and diff checks pass; no source or tests changed.
Eloquent expression plucks discarded the database-returned field name and
looked up casts and accessors using the raw SQL expression. Aliased values
therefore bypassed model conversion even when value() handled them correctly.

Extract Query Builder's existing operation into pluckWithColumn(), returning
the values and resolved field name together. Keep one query, existing fetch
and selected-column restoration, both callback layers, and conditional model
hydration. No SQL parser or shared metadata state is needed.

Ordinary string plucks retain dispatch through Query Builder::pluck(). The
approved extension-point difference affects custom query builders overriding
pluck() for Eloquent expression calls; document the pluckWithColumn() override
in the database README and explain the owning boundary in source.

Extend expression tests for casts, quoted aliases, keys, empty results, a real
accessor, and both callback layers. The complete class passes on SQLite,
MySQL, MariaDB and PostgreSQL. Database suites, static analysis and formatting
also pass. Addresses the expression-pluck finding in backup PR #38.
A reused PendingRequest retained the previous managed request after switching
to a custom client. Async retry policies also received the original method
rather than the middleware-rewritten method. beforeSending replacements were
not reflected in the captured request used by retry and response callbacks.

Reset capture in sendRequest(), once per attempt. Resetting only in send()
would leave stale capture when later request middleware throws or a retry
policy swaps the client. Custom clients now leave capture unavailable instead
of producing callbacks or response events associated with an earlier request.

After beforeSending callbacks, update capture only when the final PSR request
identity differs. Preserve RequestSending timing, final structured data and
attributes, and the existing wrapper on the unchanged path. Use captured
methods in async retry policies without changing the method used to dispatch
subsequent attempts. Correct afterResponse's nullable request annotation.

Keep the original async GET test alongside the middleware rewrite case. Cover
managed-to-custom reuse and beforeSending replacement through synchronous and
asynchronous retries and response callbacks. HTTP tests, static analysis and
formatting pass. Addresses the HTTP findings in backup PR #38.
The new wildcard morph-count tests passed on SQLite but used integer
subtraction that underflowed for unsigned IDs on MySQL and MariaDB. They also
assumed PostgreSQL would discover morph types in insertion order.

Use decimal subtraction for the row-dependent count and compare bindings
without assuming discovery order. Retain every expected result ID, operator
case and binding value. Apply the same expression spelling to the null-only
case, which was already passing. No production query changes or SQL-mode
workarounds are required.

Require exactly three jobs in the existing BusBatch bulk matcher before
checking job identity and closure wrapping. Batch counters are maintained
separately and do not establish what bulk() received.

The complete morph test class passes on SQLite, MySQL, MariaDB and PostgreSQL.
BusBatchTest and the affected Database/Bus suites pass, along with formatting.
Addresses backup PR #38's database CI failures and batch-test review finding.
The small footer text had insufficient contrast against the default page
background. The green success button also rendered white text on a background
that fell below the normal-text contrast requirement.

Use zinc #71717a for footer text and links, and green #15803d for success
buttons. Update all four button borders with the background because the
borders provide its padding. The resulting contrast is at least 4.63:1 for
the footer and 5.02:1 for the button.

The affected mail suite passes. Addresses the footer review finding in backup
PR #38 and the same contrast defect in the adjacent success-button rules.
Complete the 2.0.11 minimum-version update across all split packages that directly require laravel/serializable-closure. The root and queue manifests already required the fixed release, but nine split manifests still allowed 2.0.10 and failed the existing package consistency checks.

This completes the dependency adaptation for laravel/framework#57881. Keep the upstream wrapper-preservation fix without adding compatibility branches. Root dependencies and lockfiles are unchanged.

Verified the existing manifest and package metadata tests, generated facade checks, source and type analysis, formatting, and the full parallel framework suite.
Refresh the generated facade contracts to match the updated event listener, HTTP fake response body and retry callback types. The facade consistency test caught annotations that had not been regenerated with their source changes.

Generated with the repository facade documenter. This completes the annotation propagation for Laravel PRs laravel/framework#57986, laravel/framework#61047 and laravel/framework#61106 without changing runtime behavior.

Verified facade generation consistency, source and type analysis, formatting, and the full parallel framework suite.
The worker checks its memory limit before restart polling and job/time limits. In the full suite, the default 128MB limit caused the disabled-pause test to miss its second restart-key read. The disabled-restart and max-job/time tests could also pass after an unintended memory exit.

Use the existing 1024MB test allowance in all four fixtures and assert a successful exit. Preserve all job and exact cache-call assertions, remove the misplaced memory comments from the max-limit tests, and leave dedicated memory-limit tests unchanged.

Completes the adapted polling coverage from laravel/framework#57975. Verified the WorkCommand test file, all four cases with retained memory above the old limit, the full parallel framework suite, formatting and analysis. The review also verified that exceeding the new limit makes all four success assertions fail.
@binaryfire
binaryfire merged commit 2f09aa5 into 0.4 Sep 8, 2026
@binaryfire
binaryfire deleted the laravel-parity-57830 branch September 9, 2026 15:11
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