1
votes

I try to deploy my symfony2 project using capifony.

Howevere while updating process, this error happens.

Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap declared at /var/www/html/wisdom/shared/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php accepts a Composer\Script\CommandEvent but post-install-cmd events use a Composer\Script\Event instance. Please adjust your type hint accordingly, see https://getcomposer.org/doc/articles/scripts.md#event-classes in phar:///var/www/html/wisdom/releases/20170107180608/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:311


Thanks to @robske_110 This event is found to be related with composer version.

In Local environment

You are already using composer version 1.3.1 (stable channel)

while deploying, updating composer failed.

  * executing "sh -c 'cd /var/www/html/wisdom/releases/20170107183509 && php composer.phar self-update '"
    servers: ["wisdom-my.com"]
    [wisdom-my.com] executing command
 ** [out :: wisdom-my.com] Updating to version 1.3.1 (stable channel).
*** [err :: wisdom-my.com] Downloading: Connecting...
*** [err :: wisdom-my.com] 
*** [err :: wisdom-my.com] Downloading: 100%
*** [err :: wisdom-my.com] 
*** [err :: wisdom-my.com] 
*** [err :: wisdom-my.com] 
*** [err :: wisdom-my.com] Use composer self-update --rollback to return to version 8ad6385ffb68495e1d2afc8c554526d018e2d8e9
1
I can't see the error you mention. The output looks completely fine when updating Composer.Sven

1 Answers

1
votes

Try changing the method typehint in the file

Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap declared at /var/www/html/wisdom/shared/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php

from Composer\Script\CommandEvent (or just CommandEvent, in that case there should be a use statement at the top, you need to modify that too.) to Composer\Script\Event (or Event).

But this indicates an incompatibility between your Distrubution Bundle and the Composer version, so try updating both to their latest version.