You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a fresh Symfony app with require api-platform/core leads to PHP Fatal error: Trait Symfony\Contracts\Translation\TranslatorTrait" not found.
This is caused by the constructor of ApiPlatform\Symfony\EventListener\DeserializeListener, when the translator component is not installed. It is using symfony/translation-contracts as a fallback without actually requiring it or verifying it's installed.
Possible Solution
Add symfony/translation-contracts to composer require or add a pass to ensure there is either the translator component or the contracts available
The text was updated successfully, but these errors were encountered:
soyuka
added a commit
to soyuka/core
that referenced
this issue
Sep 2, 2023
API Platform version(s) affected: 3.1
Description
Hello,
Creating a fresh Symfony app with require
api-platform/core
leads toPHP Fatal error: Trait Symfony\Contracts\Translation\TranslatorTrait" not found
.This is caused by the constructor of
ApiPlatform\Symfony\EventListener\DeserializeListener
, when the translator component is not installed. It is usingsymfony/translation-contracts
as a fallback without actually requiring it or verifying it's installed.How to reproduce
api-platform/core
Possible Solution
Add
symfony/translation-contracts
to composer require or add a pass to ensure there is either the translator component or the contracts availableThe text was updated successfully, but these errors were encountered: