gpt4 book ai didi

php - 在 symfony 4 中使用未定义的常量 XML_PI_NODE

转载 作者:行者123 更新时间:2023-12-04 12:59:16 28 4
gpt4 key购买 nike

我在 php7.2 中收到此错误。我正在使用 symfony4。

Warning: Use of undefined constant XML_PI_NODE - assumed 'XML_PI_NODE' (this will throw an Error in a future version of PHP)

这是错误行。
in var/cache/dev/ContainerIZRQnYa/getSerializerService.php (line 55)
return $this->services['serializer'] = new \Symfony\Component\Serializer\Serializer([0 => new \Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer(), 1 => new \Symfony\Component\Serializer\Normalizer\DateTimeNormalizer(), 2 => new \Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer(), 3 => new \Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer(), 4 => new \Symfony\Component\Serializer\Normalizer\DataUriNormalizer(), 5 => new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), 6 => new \Symfony\Component\Serializer\Normalizer\ObjectNormalizer($a, new \Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter($a), new \Symfony\Component\PropertyAccess\PropertyAccessor(false, false, new \Symfony\Component\Cache\Adapter\ArrayAdapter(0, false)), NULL, new \Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata($a))], [0 => new \Symfony\Component\Serializer\Encoder\XmlEncoder(), 1 => new \Symfony\Component\Serializer\Encoder\JsonEncoder(), 2 => new \Symfony\Component\Serializer\Encoder\YamlEncoder(), 3 => new \Symfony\Component\Serializer\Encoder\CsvEncoder()]);

我已经清除了缓存并且之前已经设置了所有权限。
我该怎么办?

最佳答案

我遇到了同样的问题,我使用安装了 PHP XMLsudo apt install php7.4-xml但仍然得到它。我跑后它就消失了:install zlib1g-dev libxml2-dev

关于php - 在 symfony 4 中使用未定义的常量 XML_PI_NODE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61047824/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com