Level 36
Hey -
Please, refer to this thread, maybe this is your issue - https://laravel.io/forum/03-25-2015-composer-update-throwing-error-script-php-artisan-optimize-handling-the-post-update-cmd-event-returned-with-an-error
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi. Using Laravel 5.5.4 with PHP 7.0.23 on Centos
When try to run composer update today, get an error without Error Output and not log on laravel error log system.
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Script php artisan optimize handling the post-update-cmd event returned with an error
[RuntimeException]
Error Output:
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
Please or to participate in this conversation.