Deployer version 4.1.0
When running dep deploy test
the following error is reported:
PHP Fatal error: Call to undefined function server()
server ftn is defined as follows in config file:
// 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 as per the Deployer site. Has anyone else experienced this issue? If so how did you resolve it?
SOLUTION
Fixed issue by running the following cmd (Suggested in comments above by Ken)
dep init
Compared the auto-generated deploy.php file to the original. Noted that the following was omitted:
namespace Deployer;
Also noted that ->env
has been replaced with ->set
I had the same problem using deployer on a Laravel 5.4 project:
I had installed deployer using composer, when removed it and worked with deployer.phar
file , everything worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With