Composer uses own Symfony path in docker (loading old files) Composer uses own Symfony path in docker (loading old files) docker docker

Composer uses own Symfony path in docker (loading old files)


Maybe the signature for obtain composer is not matching, you have to know that signature can change, if you want to obtain the last one use this url https://composer.github.io/installer.sig

Use this snippet for verify signature.

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \            php -r "if (hash_file('SHA384', 'composer-setup.php') === '$(wget -q -O - https://composer.github.io/installer.sig)') { \                echo 'Installer good'; \            } else { \                echo 'Installer corrupt'; die; \            } echo PHP_EOL;"


I think that running composer self-update command updates the composer's signature as well. Also i would suggest try the following if you have ssh access to the server:

  • Remove composer.lock.
  • Remove vendor folder.
  • Run composer install

This should fix all the issues you mentioned.


this is how I install composer (Alpine, php7.1-fpm, self compiled nginx)

EXPECTED_COMPOSER_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) && \php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \php -r "if (hash_file('SHA384', 'composer-setup.php') === '${EXPECTED_COMPOSER_SIGNATURE}') { echo 'Composer.phar Installer verified'; } else { echo 'Composer.phar Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \php composer-setup.php --install-dir=/usr/bin --filename=composer && \php -r "unlink('composer-setup.php');"

and try to change your post-install to this (laravel 5.5, dockerized and smoothly running)

    "post-update-cmd": [        "Illuminate\\Foundation\\ComposerScripts::postUpdate",        "php artisan optimize"         .....