0

情况:这是我安装 tikiwiki 24 后的屏幕消息。

致命错误: Symfony\Component\DependencyInjection\Loader\XmlFileLoader::load($resource, ?string $type = NULL) 的声明必须与 Symfony\Component\Config\Loader\LoaderInterface::load($resource, $type = NULL) 在第 46 行的 /var/www/contiki/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php 中

那么请问,有人知道这里发生了什么吗?我对作曲家很陌生,解决了许多兼容性问题,但这超出了我的范围。

我不明白为什么它们不兼容。

这些是(部分)文件:

我的 /var/www/contiki/vendor_bundled/vendor/symfony/config/Loader/LoaderInterface.php

interface LoaderInterface
{
    /**
     * Loads a resource.
     *
     * @param mixed       $resource The resource
     * @param string|null $type     The resource type or null if unknown
     *
     * @throws \Exception If something went wrong
     */
    public function load($resource, $type = null);

    /**
     * Returns whether this class supports the given resource.
     *
     * @param mixed       $resource A resource
     * @param string|null $type     The resource type or null if unknown
     *
     * @return bool True if this class supports the given resource, false otherwise
     */
    public function supports($resource, $type = null);

    /**
     * Gets the loader resolver.
     *
     * @return LoaderResolverInterface A LoaderResolverInterface instance
     */
    public function getResolver();

    /**
     * Sets the loader resolver.
     */
    public function setResolver(LoaderResolverInterface $resolver);
}

/var/www/contiki/vendor_bundled/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php 文件的第一部分

namespace Symfony\Component\DependencyInjection\Loader;

use Symfony\Component\Config\Util\XmlUtils;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\ExpressionLanguage\Expression;

/**
 * XmlFileLoader loads XML files service definitions.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class XmlFileLoader extends FileLoader
{
    const NS = 'http://symfony.com/schema/dic/services';

    /**
     * {@inheritdoc}
     */
    public function load($resource, $type = null)
    {
        $path = $this->locator->locate($resource);

        $xml = $this->parseFileToDOM($path);

        $this->container->fileExists($path);  <-- This is rule 46

        $defaults = $this->getServiceDefaults($xml, $path);

        // anonymous services
        $this->processAnonymousServices($xml, $path, $defaults);

        // imports
        $this->parseImports($xml, $path);

        // parameters
        $this->parseParameters($xml, $path);

        // extensions
        $this->loadFromExtensions($xml);

        // services
        try {
            $this->parseDefinitions($xml, $path, $defaults);
        } finally {
            $this->instanceof = [];
        }
    }```
4

1 回答 1

0

听起来有些东西在这里纠结,Tiki 24 还没有发布,但很快就会分支,所以如果你现在想要一个稳定安全的 Tiki,最好使用稳定发布的分支,即23.x?此外,我们仍在 Smarty 3.x 上,并计划在 24 发布后升级到 4.x(和 PHP 8+),这是我们的下一个 LTS 版本,所以不确定它来自哪里......你跑了吗sh setup.sh?

正如 Nico 上面所说,这可能比 Tiki 更适合这里,所以最好的办法是来我们新的 Gitter 房间与社区聊天,在这里

欢迎来到蒂基!:)

于 2022-01-16T12:09:49.233 回答