Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony 2.3: can't persuade Capifony to install vendors with Composer
    primarykey
    data
    text
    <p>I've just completed an upgrade from Symfony2 2.0 to 2.3.4. This is now working on my local dev server and I'm looking to deploy it with Capifony. </p> <p>A big change with Symfony is away from /bin/vendor toward Composer for managing dependencies.</p> <p>I've updated Capistrano so that 'cap -V' gives 'Capistrano v2.15.5'</p> <p>and Capifony so that 'capifony -v' gives 'capifony v2.4.0'</p> <p>The problem is that</p> <pre><code>cap deploy </code></pre> <p>never attempts to run anything to do with Composer. It insists on trying to use /bin/vendor:</p> <pre><code>* 2013-09-29 23:16:58 executing `symfony:vendors:reinstall' * executing "cd /vhosts/domains/mysite.com/public/releases/20130929221446 &amp;&amp; php bin/vendors install --reinstall" </code></pre> <p>My 'deploy.rb' has:</p> <pre><code>set :use_composer, true </code></pre> <p>Here's my full deploy.rb</p> <pre><code>set :application, "mysite" set :domain, "#{application}.com" set :deploy_to, "/vhosts/domains/#{domain}/public" set :app_path, "app" #ssh stuff ssh_options[:port] = 12345 ssh_options[:username] = "myuser" ssh_options[:forward_agent] = true set :scm, :git set :branch, "master" set :deploy_via, :rsync_with_remote_cache #set :deploy_via, :remote_cache set :user, "admin" # SSH login user set :port, 12345 # For Capistrano #set :use_sudo, true # admin is sufficiently privileged # Set logging to max for debugging #logger.level = Logger::MAX_LEVEL # Advised to add this to fix an error message default_run_options[:pty] = true set :repository, "/vhosts/domains/mysite.com/public/current" # Local means Vagrant set :model_manager, "doctrine" # Or: `propel` # Server roles role :web, domain # Web server #role :app, domain # App server (could be different) #role :db, domain, :primary =&gt; true # DB server (primary means primary DB) set :keep_releases, 12 # Added 29Sep13 as advised by current capifony docs set :shared_files, ["app/config/parameters.yml"] # directories that will be shared between all releases set :shared_children, [app_path + "/logs", "customer_uploads", "vendor"] set :use_composer, true set :update_vendors, true # Share /vendor between deployments #set :copy_vendors, true # Run post-scripts from composer install #set :composer_options, "--no-dev --verbose --prefer-dist --optimize-autoloader" # Below doesn't work with composer, is deprecated as only worked for bin/vendors #set :vendors_mode, "reinstall" # Assets install (to web directory as files rather than symlinks). Don't uncomment, set to 'false'. set :assets_install, false # Regenerate Assetic assets (JS, CSS). Don't uncomment, set to 'false'. set :dump_assetic_assets, false # Whether to run cache warmup. Don't uncomment, set to 'false'. set :cache_warmup, true # Note this can fail (e.g. to find and download a necessary Git repo) and deployment still proceeds. # Change ACL on the app/logs and app/cache directories # Works without this and when enabled gives error if sudo set to false above. after 'deploy', 'deploy:update_acl' # Adam added to try and enforce keep_releases automatically after "deploy", "deploy:cleanup" # Custom task to set the ACL on the app/logs and app/cache directories namespace :deploy do task :update_acl, :roles =&gt; :app do shared_dirs = [ app_path + "/logs", app_path + "/cache" ] # add group write permissions #run "chmod -R g+w #{shared_dirs.join(' ')}" # Allow directories to be writable by webserver and this user run "cd #{latest_release} &amp;&amp; setfacl -R -m u:www-data:rwx -m u:#{user}:rwx #{shared_dirs.join(' ')}" run "cd #{latest_release} &amp;&amp; setfacl -dR -m u:www-data:rwx -m u:#{user}:rwx #{shared_dirs.join(' ')}" end end </code></pre> <p><strong>Edit1 30Sep13 14:04 UTC in response to comment</strong></p> <p>The contents of the Capfile that resides in my project root is</p> <pre><code>load 'deploy' if respond_to?(:namespace) # cap2 differentiator Dir['vendor/bundles/*/*/recipes/*.rb'].each { |bundle| load(bundle) } load Gem.find_files('symfony2.rb').last.to_s load 'app/config/deploy' </code></pre> <p>Also, why do other questions e.g. below show prettier printing when using Capifony. The output on mine doesn't look at all like this: no ticks, much messier</p> <p><a href="https://stackoverflow.com/questions/12268077/capifony-failed-reinstalling-vendors-with-symfony2-1">Capifony failed reinstalling vendors with Symfony2.1</a></p> <p>It's as if either Capistrano or Capifony isn't up-to-date and therefore doesn't recognise the instruction to use Composer - but why would that be?</p> <p>Thanks in advance,</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload