部署者版本4.1.0
运行时dep deploy test报告以下错误:
PHP致命错误:调用未定义的函数服务器()
server ftn在配置文件中定义如下:
// 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');
Run Code Online (Sandbox Code Playgroud)
根据Deployer网站,这几乎是标准.还有其他人遇到过这个问题吗?如果是这样你是如何解决的?
解
通过运行以下cmd解决了问题(Ken在上面的评论中建议)
dep init
将自动生成的deploy.php文件与原始文件进行比较.注意到以下内容被省略:
namespace Deployer;
Run Code Online (Sandbox Code Playgroud)
还注意到->env已被替换->set