解析错误:语法错误,意外')',期望' |'或/opt/lampp/htdocs/fsphp/vendor/coffeecode/cropper/src/src/cropper.php中的变量(t_variable)
当我试图让作曲家安装项目时,我会有一些交响乐供应商的语法错误。 这里的php版本的phpinfo()
xampp 7.4.28-1 Linux Manjaro
"require": {
"php": "^7.1",
"ext-pdo": "^7.1",
"phpmailer/phpmailer": "~6.0",
"league/plates": "v4.0.0-alpha",
"matthiasmullie/minify": "^1.3",
"coffeecode/uploader": "^1.0",
"coffeecode/cropper": "^1.0",
"coffeecode/optimizer": "^1.0",
"coffeecode/paginator": "^1.0",
"coffeecode/router": "^1.0"
}
/**
* @param string $image
* @param bool $unlinkImage
* @return string
*/
public function toWebP(string $image, $unlinkImage = true): string
{
try {
$webPConverted = pathinfo($image)["dirname"] . "/" . pathinfo($image)["filename"] . ".webp";
WebPConvert::convert($image, $webPConverted, ["default-quality" => $this->quality]);
if ($unlinkImage) {
unlink($image);
}
return $webPConverted;
} catch (ConversionFailedException) {
return $image;
}
}
I have some symphony vendor syntax errors when I'm trying to get composer to install my project.
Here the php version of phpinfo()
XAMPP 7.4.28-1
Linux Manjaro
"require": {
"php": "^7.1",
"ext-pdo": "^7.1",
"phpmailer/phpmailer": "~6.0",
"league/plates": "v4.0.0-alpha",
"matthiasmullie/minify": "^1.3",
"coffeecode/uploader": "^1.0",
"coffeecode/cropper": "^1.0",
"coffeecode/optimizer": "^1.0",
"coffeecode/paginator": "^1.0",
"coffeecode/router": "^1.0"
}
/**
* @param string $image
* @param bool $unlinkImage
* @return string
*/
public function toWebP(string $image, $unlinkImage = true): string
{
try {
$webPConverted = pathinfo($image)["dirname"] . "/" . pathinfo($image)["filename"] . ".webp";
WebPConvert::convert($image, $webPConverted, ["default-quality" => $this->quality]);
if ($unlinkImage) {
unlink($image);
}
return $webPConverted;
} catch (ConversionFailedException) {
return $image;
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论