You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Queue: inject a logger into Worker instead of calling error_log() #608
Marko\Queue\Worker reports stop reasons, timeouts and failures with error_log(). Since #551 (PR #602) added a shared "Worker stopping" line, about 100 worker tests print that line to the test output under PHPUnit 12, which captures error_log() per test. The tests still pass, but the noise hides real output. Apps also can't send worker logs anywhere other than PHP's error log.
Proposal
Inject Marko's LoggerInterface (marko/log) into Worker and the alarm-handler path, and log through it. marko/log binds LoggerInterface itself since #555, so no extra driver choice is needed. Tests pass a FakeLogger (from marko/testing) and assert on the stop line rather than printing it. If marko/queue shouldn't hard-require marko/log, define a tiny queue-owned logging contract instead and say why in the PR.
Exit criteria
No error_log() calls left in packages/queue/src
The worker test suite prints nothing extra; stop lines are asserted through FakeLogger
Fixed in #633 (merged). The queue Worker and FailedJobHandler now log through LoggerInterface, and marko/queue requires marko/log. There are no error_log() calls left. Tests assert through FakeLogger, so the worker suite no longer prints stop lines. Breaking: apps need a log handler package. The skeleton will ship marko/log-file and marko/log-stream (#640), with LOG_HANDLERS=file as the default.
Activity
markshust commentedon Nov 1, 2026
Fixed in #633 (merged). The queue
WorkerandFailedJobHandlernow log throughLoggerInterface, andmarko/queuerequiresmarko/log. There are noerror_log()calls left. Tests assert throughFakeLogger, so the worker suite no longer prints stop lines. Breaking: apps need a log handler package. The skeleton will shipmarko/log-fileandmarko/log-stream(#640), withLOG_HANDLERS=fileas the default.