D.T*_*D.T 10 php ubuntu phpmyadmin symfony ubuntu-22.04
刚刚升级到 Ubuntu 22.04,现在我的 phpadmin 无法加载。我收到以下错误
解析错误:语法错误,/usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php 第 272 行出现意外的“静态”(T_STATIC)
我打开了该文件,这是该段中的具体代码。
public function addResource(ResourceInterface $resource): static
{
if (!$this->trackResources) {
return $this;
}
if ($resource instanceof GlobResource && $this->inVendors($resource->getPrefix())) {
return $this;
}
$this->resources[(string) $resource] = $resource;
return $this;
}
Run Code Online (Sandbox Code Playgroud)
昨天升级之前,一切正常。有人有什么建议吗?
小智 12
我使用 php7.4.30,我的修复是升级 phpmyadmin。
这是一个简单的指南:
https://devanswers.co/manually-upgrade-phpmyadmin/
从 8.0 版本开始,PHP 允许static
作为类方法的返回类型。显然你的PHP版本被降级了。