您好,我在将Laravel应用程序部署到暂存时遇到此错误:
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_PARSE)
syntax error, unexpected '<<' (T_SL)
似乎是包中的合并冲突,任何想法?
Open: /var/www/ares/releases/20141103102236/vendor/symfony/routing/Symfony/Component/Routing/Route.php
$this->path = $data['path'];
$this->host = $data['host'];
$this->defaults = $data['defaults'];
$this->requirements = $data['requirements'];
$this->options = $data['options'];
$this->schemes = $data['schemes'];
$this->methods = $data['methods'];
<<<<<<< HEAD
$this->condition = $data['condition'];
=======
答案 0 :(得分:0)
这是Symphony Routing文件中的临时错误。
今天最近的一次提交似乎已经将Git冲突包含在文件本身中了 - 见到这里:
$this->schemes = $data['schemes'];
$this->methods = $data['methods'];
<<<<<<< HEAD
$this->condition = $data['condition'];
=======
if (isset($data['compiled'])) {
$this->compiled = $data['compiled'];
}
>>>>>>> 2.3
}
只需将其更改为:
供应商/ symfony的/路由/ Symfony的/组件/路由/ Route.php
$this->schemes = $data['schemes'];
$this->methods = $data['methods'];
$this->condition = $data['condition'];
if (isset($data['compiled'])) {
$this->compiled = $data['compiled'];
}
}
还有一个Git pull来解决这个问题:https://github.com/symfony/Routing/pull/3