Deployer - Fatal error: call undefined function server ()

Deployer version 4.1.0

At startup dep deploy test, the following error is reported:

PHP Fatal error: call undefined function server ()

server ftn is defined in the configuration file as follows:

// Configure servers
server('test', 'test.server.com')
    ->user('user')
    ->identityFile('~/.ssh/id.pub', '~/.ssh/user', 'password')
    ->stage("test")
    ->env('deploy_path', '/var/www/project.com');  

This is pretty much the standard according to the Deployer website . Has anyone else experienced this issue? If so, how did you resolve it?

+4
source share
2 answers

DECISION

Fixed the problem with starting the next cmd (suggested in the comments above Ken)

dep init

Compared to the autogenerated deploy.php file, the source file. It is noted that the following is omitted:

namespace Deployer;

, ->env ->set

+6

Laravel 5.4:

, deployer.phar, .

+1

Source: https://habr.com/ru/post/1668007/


All Articles