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

neeonline's avatar

Composer @php not found...

Ok, this week has being officially a nightmare...

Every time I use composer with Laravel (laravel new project or composer dump-autoload), the pre/post scripts that starting with @php artisan... fails. The error returned is that @php is not recognized.

Let's say @php artisan package:discover fails, If I type and run manually php artisan package:discover everything works...

I've tried to Google it, but Google keeps trolling me since @php is not regognized even between double quotes.

I recently started to use iTerm with zsh (Mac). If someone can help, I appreciate. I'm sure is something stupid that I'm missing.

Thank you.

0 likes
2 replies
neeonline's avatar

@VANDAN - Thank you Vandan, but is not that my composer is not working or the php. Everything is on the $PATH and working fine.

The issue is the pre/post scripts that composer runs that inclues @php (at symbol + php).

Please or to participate in this conversation.