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

robgoodliffe's avatar

Composer Error 5.2

Hi,

I'm trying to deploy a new project using Envoyer with forge. I've had no problems in the past, but this is the first 5.2 project I've deployed.

Using global Composer installation.
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Loading composer repositories with package information
Installing dependencies from lock file
  - Installing jakub-onderka/php-console-color (0.1)
    Loading from cache

  - Installing vlucas/phpdotenv (v2.2.0)
    Loading from cache

  - Installing symfony/polyfill-mbstring (v1.0.1)
    Loading from cache

  - Installing symfony/var-dumper (v3.0.1)
    Loading from cache

  - Installing symfony/translation (v3.0.1)
    Loading from cache

  - Installing symfony/routing (v3.0.1)
    Loading from cache

  - Installing symfony/process (v3.0.1)
    Loading from cache

  - Installing symfony/polyfill-util (v1.0.1)
    Loading from cache

  - Installing symfony/polyfill-php56 (v1.0.1)
    Loading from cache

  - Installing symfony/http-foundation (v3.0.1)
    Loading from cache

  - Installing symfony/event-dispatcher (v3.0.1)
    Loading from cache

  - Installing psr/log (1.0.0)
    Loading from cache

  - Installing symfony/debug (v3.0.1)
    Loading from cache

  - Installing symfony/http-kernel (v3.0.1)
    Loading from cache

  - Installing symfony/finder (v3.0.1)
    Loading from cache

  - Installing symfony/console (v3.0.1)
    Loading from cache

  - Installing swiftmailer/swiftmailer (v5.4.1)
    Loading from cache

  - Installing nikic/php-parser (v2.0.0)
    Loading from cache

  - Installing jakub-onderka/php-console-highlighter (v0.3.2)
    Loading from cache

  - Installing dnoegel/php-xdg-base-dir (0.1)
    Loading from cache

  - Installing psy/psysh (v0.6.1)
    Loading from cache

  - Installing paragonie/random_compat (1.1.4)
    Loading from cache

  - Installing nesbot/carbon (1.21.0)
    Loading from cache

  - Installing mtdowling/cron-expression (v1.0.4)
    Loading from cache

  - Installing monolog/monolog (1.17.2)
    Loading from cache

  - Installing league/flysystem (1.0.16)
    Loading from cache

  - Installing jeremeamia/superclosure (2.2.0)
    Loading from cache

  - Installing doctrine/inflector (v1.1.0)
    Loading from cache

  - Installing classpreloader/classpreloader (3.0.0)
    Loading from cache

  - Installing laravel/framework (v5.2.5)
    Loading from cache

Generating autoload files
> php artisan clear-compiled

                                
  [BadMethodCallException]      
  Method after does not exist.  
                                

Script php artisan clear-compiled handling the post-install-cmd event returned with an error

                      
  [RuntimeException]  
  Error Output:       
                      

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

Anybody suggest what the issue could be?

Thanks, Rob

0 likes
6 replies
mfiaz's avatar

Hi robgoodliffe ,

Have you updated you composer if your composer is old more than 30 days

robgoodliffe's avatar

The composer on the remote is the most recent version. Not sure how it would affect this situation anyway.

mfiaz's avatar

Can you place the exact command here that you are running

robgoodliffe's avatar

It's just running the envoyer deploy script, so it fails at the 'Install Composer Dependencies' point. SO the command will be either composer install or composer update

mfiaz's avatar

Unfortunately I have no experienced in using envoyer . I installed it by running command with ssh shell below is the command. It will install recent version of laravel or you can specify specific version if you want.

composer create-project laravel/laravel your-directory --prefer-dist

Please or to participate in this conversation.