php - RuntimeException when executing SubRequest in command line
Get the solution ↓↓↓Solution:
You are trying to handle a SUBrequest without having any request in the first place.
Try this :
$res = $app->handle($subRequest, HttpKernelInterface::MASTER_REQUEST, false);
In case you're using same code in script and controller, just test the existence of $app['request'] to know which to choose from
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: property [id] does not exist on this collection instance.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.