Я использую пентатрион для установки Vite в свой проект Symfony. Я выполнил действия, описанные в документации по пентатриону (https://symfony-vite.pentatrion.com/ext ... ation.html), но все равно получаю эту ошибку:
Return value of Pentatrion\ViteBundle\Service\EntrypointRenderer::renderTags() must be an instance of Pentatrion\ViteBundle\Service\mixed, string returned
[2024-06-20T22:39:48.201801+02:00] php.CRITICAL: Uncaught Error: Return value of Pentatrion\ViteBundle\Service\EntrypointRenderer::renderTags() must be an instance of Pentatrion\ViteBundle\Service\mixed, string returned {"exception":"[object] (TypeError(code: 0): Return value of Pentatrion\\ViteBundle\\Service\\EntrypointRenderer::renderTags() must be an instance of Pentatrion\\ViteBundle\\Service\\mixed, string returned at /.../myapp/vendor/pentatrion/vite-bundle/src/Service/EntrypointRenderer.php:289)"} []
[2024-06-20T22:39:48.303733+02:00] request.CRITICAL: Uncaught PHP Exception TypeError: "Return value of Pentatrion\ViteBundle\Service\EntrypointRenderer::renderTags() must be an instance of Pentatrion\ViteBundle\Service\mixed, string returned" at /.../myapp/vendor/pentatrion/vite-bundle/src/Service/EntrypointRenderer.php line 289 {"exception":"[object] (TypeError(code: 0): Return value of Pentatrion\\ViteBundle\\Service\\EntrypointRenderer::renderTags() must be an instance of Pentatrion\\ViteBundle\\Service\\mixed, string returned at /.../myapp/vendor/pentatrion/vite-bundle/src/Service/EntrypointRenderer.php:289)"} []
Я использую пентатрион для установки Vite в свой проект Symfony. Я выполнил действия, описанные в документации по пентатриону (https://symfony-vite.pentatrion.com/extra/migration.html), но все равно получаю эту ошибку: [code]Return value of Pentatrion\ViteBundle\Service\EntrypointRenderer::renderTags() must be an instance of Pentatrion\ViteBundle\Service\mixed, string returned [/code] Вот ошибка в моем журнале: [code][2024-06-20T22:39:48.201801+02:00] php.CRITICAL: Uncaught Error: Return value of Pentatrion\ViteBundle\Service\EntrypointRenderer::renderTags() must be an instance of Pentatrion\ViteBundle\Service\mixed, string returned {"exception":"[object] (TypeError(code: 0): Return value of Pentatrion\\ViteBundle\\Service\\EntrypointRenderer::renderTags() must be an instance of Pentatrion\\ViteBundle\\Service\\mixed, string returned at /.../myapp/vendor/pentatrion/vite-bundle/src/Service/EntrypointRenderer.php:289)"} [] [2024-06-20T22:39:48.303733+02:00] request.CRITICAL: Uncaught PHP Exception TypeError: "Return value of Pentatrion\ViteBundle\Service\EntrypointRenderer::renderTags() must be an instance of Pentatrion\ViteBundle\Service\mixed, string returned" at /.../myapp/vendor/pentatrion/vite-bundle/src/Service/EntrypointRenderer.php line 289 {"exception":"[object] (TypeError(code: 0): Return value of Pentatrion\\ViteBundle\\Service\\EntrypointRenderer::renderTags() must be an instance of Pentatrion\\ViteBundle\\Service\\mixed, string returned at /.../myapp/vendor/pentatrion/vite-bundle/src/Service/EntrypointRenderer.php:289)"} [] [/code] Это функция в EntrypointRenderer.php: [code]/** * @return string|array */ public function renderTags(array $tags, bool $isBuild, bool $toString): mixed { if (null !== $this->eventDispatcher) { foreach ($tags as $tag) { $this->eventDispatcher->dispatch(new RenderAssetTagEvent($isBuild, $tag)); } }
if ('link-tag' !== $this->preload) { $tags = array_filter($tags, function (Tag $tag) { return !$tag->isModulePreload(); }); }