2

I'm using Capifony to deploy my Symfony2 application, but as of today it can't download composer - jenkins output:

[32m--> Downloading Composer[0m
* executing "sh -c 'cd /data/www/testing/s00110/releases/20150426161117 && curl -s http://getcomposer.org/installer | php'"
servers: ["*domain*"]
[*domain*] executing command
** [out :: *domain*] <html>
** [out :: *domain*] <head><title>302 Found</title></head>
** [out :: *domain*] <body bgcolor="white">
** [out :: *domain*] <center><h1>302 Found</h1></center>
** [out :: *domain*] <hr><center>nginx</center>
** [out :: *domain*] </body>
** [out :: *domain*] </html>
command finished in 46ms

It seems composer moved their installer to https and Capifony isn't following the redirect. Is there an option to tell capifony where to download composer from?

Frank van Luijn
  • 470
  • 4
  • 16
  • 1
    See this issue in the Capifony repository: https://github.com/everzet/capifony/issues/570 - they are working on it. – Nic Wortel Apr 27 '15 at 08:59

3 Answers3

5

There doesn't seem to be an option to set the url, but you can add your own task. To circumvent capifony downloading from the wrong url I added:

task :download_composer do
  run "cd " + release_path + " && curl -s https://getcomposer.org/installer | php"
end

before "symfony:composer:update", "download_composer"
before "symfony:composer:install", "download_composer"

This works because capifony checks if composer.phar is already present, if it is it'll warn you but just continue anyway

Frank van Luijn
  • 470
  • 4
  • 16
2

A new version of Capifony, version 2.8.5, has been released a couple of hours ago, which fixes this issue.

Updating to 2.8.5 should solve your problems with the Composer download.

Nic Wortel
  • 11,155
  • 6
  • 60
  • 79
0

Just update capifony to version 2.8.4.

  • Downvoted because the problem existed with 2.8.4, though I did not mention it in my original post - accepted the answer to update to 2.8.5 as this solves the issue – Frank van Luijn Apr 28 '15 at 11:02