Repository navigation
Pre-release 4.2.109 → 4.2.108 — task 4.3 queue swap (illuminate/queue v13) - #81
Merged
Merged
Conversation
agissept
force-pushed
the
pre-release/4.2.109
branch
from
September 30, 2026 10:32
5b19e66 to
881aa1e
Compare
agissept
marked this pull request as ready for review
October 1, 2026 03:07
Move illuminate/queue from replace (self.version) to require ^13; v13's
Queue tree shadows the fork via PSR-4 (seed mechanism). This is the last
L2 sub-unit of Wave 4.3. pda/pheanstalk ~4.0 -> ^8.0 (v13's Beanstalkd
driver targets the Pheanstalk 7/8 API).
Fork glue (the whole break surface):
- Foundation\Bus\Dispatchable copied verbatim from L13 v13.33.0: v13
CallQueuedClosure/ChainedBatch use the trait, so Queue::push(Closure)
fatals without it (Foundation is still the fork).
- Application registers Illuminate\Bus\BusServiceProvider as a base
provider (an L13 default provider): closure/object jobs run through
CallQueuedHandler, which needs the Bus dispatcher.
- Core aliases: queue -> Contracts\Queue\{Factory,Monitor},
queue.connection -> Contracts\Queue\Queue, queue.failer ->
FailedJobProviderInterface (mirrors v13's alias cluster; the Bus
dispatcher's queue resolver needs Factory).
- Queue\FailConsoleServiceProvider now registers the v13 queue commands
(work/listen/restart + failed/retry/forget/flush/failed-table): v13's
QueueServiceProvider registers none (L13 does it in Foundation's
ArtisanServiceProvider). queue:subscribe (Iron) has no v13 equivalent.
- Exception\ExceptionHandlerAdapter bridges Contracts\Debug\ExceptionHandler
(the v13 Worker reports failed jobs through it) to the fork Handler's
App::error() handlers. Bound only when queue:work is built: bound
globally, v13's routing Pipeline would start rendering HTTP exceptions
itself instead of letting them reach the fork Handler.
- IlluminateQueueClosure kept (classmap) to drain closure jobs queued by
L4.2 before the deploy.
Deleted vendored-behavior tests: tests/Queue/* (they assert L4.2 queue
internals now owned by v13). Added tests/Queue/QueueForkBridgeTest for the
glue above, including pre-swap string/closure payloads.
Fork suite 332 green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo
agissept
force-pushed
the
pre-release/4.2.109
branch
from
October 1, 2026 03:07
881aa1e to
ca58c12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task 4.3 — queue swap (illuminate/queue v13) · matched pair: dicoding-dev/dicoding#5942
Last L2 sub-unit of Wave 4.3. Moves
illuminate/queuefromreplacetorequire ^13(v13.33.0); v13's Queue tree shadows the fork via PSR-4 (seed mechanism).pda/pheanstalk~4.0→^8.0(v13's Beanstalkd driver targets the Pheanstalk 7/8 API). Stacks on #79.Fork glue
Foundation\Bus\Dispatchablecopied verbatim from L13 v13.33.0. v13CallQueuedClosure/ChainedBatchuse the trait, soQueue::push(Closure)fatals without it (Foundation is still the fork).ApplicationregistersIlluminate\Bus\BusServiceProvideras a base provider (it is an L13 default provider). Closure/object jobs run throughCallQueuedHandler, which needs the Bus dispatcher.queue→Contracts\Queue\{Factory,Monitor},queue.connection→Contracts\Queue\Queue,queue.failer→Queue\Failed\FailedJobProviderInterface(mirrors v13; the Bus dispatcher's queue resolver needsFactory).QueueServiceProviderregisters none (L13 does it in Foundation'sArtisanServiceProvider). The fork-onlyQueue\FailConsoleServiceProvider(already listed inConsoleSupportServiceProvider) now registersqueue:work,queue:listen,queue:restart,queue:failed,queue:retry,queue:forget,queue:flush,make:queue-failed-table(aliasqueue:failed-table), bound by class like L13.queue:subscribe(Iron) has no v13 equivalent and is dropped.Exception\ExceptionHandlerAdapter: the v13 Worker reports failed jobs throughContracts\Debug\ExceptionHandler; the adapter hands them to the fork Handler (handleConsole()→App::error()handlers), as the L4.2 worker did. Bound only whenqueue:workis built: bound globally, v13's routingPipelinewould start reporting and rendering HTTP exceptions itself instead of letting them reach the fork Handler (and would stop rethrowing them in tests).IlluminateQueueClosurekept (classmap) so closure jobs queued by 4.2.108 before the deploy still drain.Deleted vendored-behavior tests
tests/Queue/*(they assert L4.2 queue internals now owned by v13). Addedtests/Queue/QueueForkBridgeTest(9 tests: aliases, Bus, adapter scope, worker command, string and closure jobs, pre-swap string and closure payloads, command registration). Each glue piece was checked by removing it: the matching test goes red.Verification
composer.json(with rector) resolves the way CI installs it (no lock).artisan listboots;--helpworks for every queue command, including thequeue:failed-tablealias; the app also boots with a provider manifest left over from 4.2.108.DONE; a throwing job showsFAIL, is written tofailed_jobswith its exception, and reaches the app'sApp::error()handlers.Contracts\Debug\ExceptionHandlerunbound.Asia/Jakartatimezone); full-project Psalm clean.Matched-pair app changes (dicoding-dev/dicoding#5942)
app/start/error.php—Queue::failing(static function ($connection, $job, $data)): v13 passes a singleIlluminate\Queue\Events\JobFailedevent. The old closure threwArgumentCountError, and because it ran beforeWorkCommand's ownJobFailedlistener, the failed job was not recorded at all. Now reads the job and payload from the event.failed_jobs.exceptioncolumn — v13DatabaseFailedJobProvider::log()insertsexception; the 2015 migration has none. New nullablelongTextmigration, to run before workers move to 4.2.109.app/config/queue.php(beanstalkd) —'ttr' => 180is ignored by v13, which readsretry_after(default 60). Now'retry_after' => 180.BeanstalkdQueueBoringTest— Pheanstalk 8 value objects; the closure job's$jobis untyped (v13 passesCallQueuedClosure).Illuminate\Queue\Jobs\Jobdoes not declareattempts()(only theContracts\Queue\Jobcontract does, which every concrete job implements).CourseCertificateListenernow type-hints the contract; Psalm flagged it.SyncQueueserializes closures like any driver (L4.2 ran them in place).NotificationListenerTestnow registers a listener class instead of a closure bound to the test case.Deploy notes
queue:work/queue:listendefault to--tries=1(L4.2 default was 0 = unlimited). deck's supervisor already passes--tries=1; check the production worker commands.attempts: 1, and v13 increments it on reserve, so with--tries=1they are failed without running (verified). SQS and Beanstalkd count attempts on the broker and are unaffected. If the Redis driver is used, drain it before deploying.4.2.109(lightweight, on5b19e660) still needs to be pushed.Remaining Wave 4 after this: 4.4 (evaporate) and 4.5 (foundation + mail + auth).
🤖 Generated with Claude Code
https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo