deployer icon indicating copy to clipboard operation
deployer copied to clipboard

How to migrate from v3 to v4?

Open filipponeri opened this issue 9 years ago • 2 comments

Q A
Issue Type Bug
Deployer Version dev-master
Local Machine OS Ubuntu 16.10
Remote Machine OS Ubuntu 16.10

Description

If you're reporting a bug, please include following information

Steps to reproduce

Content of deploy.php

<?php
require_once 'recipe/common.php';
require 'recipe/laravel.php';
set('keep_releases', 3);
server('staging', 'server204.web-hosting.com', 21098)
    ->user('username')
     ->password('password')
     ->stage('staging')
    ->env('branch', 'master')
    ->env('deploy_path', '/home/dirname/');
etc.

CONTENT

I had to update deployer to the dev-master release because of the removal of the herrera dependency. The previous deployer version was not working any longer. 
I have installed deployer by removing the previous version and following the installation instructions as per docs. Installation happens without errors.
Now when I run deployer the deployer.php file that was working before is not working and produced the following error. It seems that the server() function is not found, I may have missed some configurations? Any help would be very appreciate. Thanks! Filippo 
### Output log
dep deploy.php
PHP Fatal error:  Uncaught Error: Call to undefined function server() in /home/neri/project/deploy.php:8
Stack trace:
#0 phar:///usr/local/bin/dep/bin/dep(106): require()
#1 /usr/local/bin/dep(4): require('phar:///usr/loc...')
#2 {main}
  thrown in /home/neri/project/deploy.php on line 8

filipponeri avatar Jan 30 '17 08:01 filipponeri

https://github.com/deployphp/deployer/blob/master/UPGRADE.md#upgrade-from-3x-to-4x

antonmedv avatar Jan 30 '17 10:01 antonmedv

Dear Anton,
thanks a lot for your prompt and detailed help. Now the server
  function is found but I still need however to update the remaining
  of the code in the file as it does not run. I think I can manage
  it.
If not, I'll get back to you. Again thanks.
Best,

Filippo


On 30/01/2017 11:35, Anton Medvedev
  wrote:


  Closed #988.
  —
    You are receiving this because you authored the thread.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.
  
    
      
      
    
    
  
  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/deployphp/deployer","title":"deployphp/deployer","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/deployphp/deployer"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Closed #988."}],"action":{"name":"View Issue","url":"https://github.com/deployphp/deployer/issues/988#event-941106801"}}}

filipponeri avatar Jan 30 '17 17:01 filipponeri