.. include:: /Includes.rst.txt ========================== TYPO3 Exception 1363778104 ========================== .. include:: /If-you-encounter-this-exception.rst.txt There is no `@var` annotation for property "..." in class "..." =============================================================== TYPO3 v12.4 - 21.03.2025 ------------------------ For each property of a domain model Extbase needs to determine the type. It is prefered to use a real PHP type: .. code-block:: diff class UserData extends AbstractEntity { - public $frontendUser = null; + public ?FrontendUser $frontendUser = null; //... } If using typed properties is not and option for some reason, you can use the `@var` annotation instead: .. code-block:: diff class UserData extends AbstractEntity { + /** @var ?FrontendUser $frontendUser*/ public $frontendUser = null; //... } Before TYPO3 v10 ----------------- **If you inject a service, or whatever other class in a model:** Please be sure you implement the Singleton interface in the service. Example: I have a Domain Model under \\Custom\Domain\Model.php, in which I do: .. code-block:: php /** * myService # optional property name as this is not really a property, it does not make much sense to name it * * @var \Custom\Services\MyService * @inject * @lazy */ protected $myService; Then I need to make sure `MyService` class is declared like this: :: class MyService extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController implements \TYPO3\CMS\Core\SingletonInterface