Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

FrancescoDiMuro's avatar

[Closed] Laravel ^12.0 seems to break ResponseFactory macros

Good day. I migrated from Laravel 11 to Laravel 12 using the official guide, and I have a strange behaviour with Http macros. I've defined them in the AppServiceProvider boot's method:

And they were working fine. As soon as I updated Laravel, using something like:

return response()->fail();

makes Intelephense saying:

Undefined method 'fail' (P1013)

Could you please help me?

Thank you in advance.

Kind regards.

0 likes
2 replies
FrancescoDiMuro's avatar
FrancescoDiMuro
OP
Best Answer
Level 1

I don't know if this forum has ever been active, but the support I received as a newcomer is equal to zero.

FrancescoDiMuro's avatar

@Meteor64 I googled the same thing, and ended up to see the same answer. I marked my own response as best answer since it would have not received any answer in any case, so better to close the discussion, since I posted different questions a month ago and I received no answers either. People sure have lives, but I don't feel like this is an active community for newcomers. Thank you for your good luck, wish you the same!

Please or to participate in this conversation.