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

abkrim's avatar
Level 13

composer update "Script php artisan optimize handling the post-update-cmd event returned with an error"

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>]...
0 likes
2 replies
abkrim's avatar
Level 13

Not work or not show any thing.

Get a log of debug but not debug information for issue.

Reading /home/excelle/.cache/composer/repo/https---packagist.org/provider-davedevelopment$hamcrest-php.json from cache
Reading /home/excelle/.cache/composer/repo/https---packagist.org/provider-kodova$hamcrest-php.json from cache
Reading /home/excelle/.cache/composer/repo/https---packagist.org/provider-phpunit$dbunit.json from cache
Resolving dependencies through SAT
Dependency resolution completed in 0.228 seconds
Analyzed 8599 packages to resolve dependencies
Analyzed 54959 rules to resolve dependencies
Nothing to install or update
Resolving dependencies through SAT
Dependency resolution completed in 0.000 seconds
Reading /home/excelle/warehouse2.excellenting.com/vendor/composer/installed.json
Reading ./composer.lock
Generating optimized autoload files
> post-autoload-dump: Illuminate\Foundation\ComposerScripts::postAutoloadDump
> post-autoload-dump: @php artisan package:discover
You made a reference to a non-existent script @php artisan package:discover

Thanks.

Please or to participate in this conversation.