Skip to content
Discussion options

You must be logged in to vote

You’ve actually uncovered a real design limitation in Laravel 12’s new concurrency API.

Right now, Concurrency::run() relies on ProcessDriver, which launches child PHP processes and communicates back to the parent using JSON payloads over STDOUT.

Why it crashes

Your closures call echo (or print), which writes directly to STDOUT.

Since STDOUT is also being used by Laravel to pass structured JSON-encoded results, your raw text corrupts the JSON.

When Laravel tries json_decode($result->output(), true), it fails → $result becomes null.

That’s why you get:

Trying to access array offset on null in ProcessDriver.php

Workarounds you can use now

Don’t use echo or print inside concurrent tasks
Inst…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rcalicdan
Comment options

Answer selected by rcalicdan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #57074 on September 17, 2025 07:11.