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
I am getting an error when creating a custom repository with a createQuery method:
Return type (TYPO3\CMS\Extbase\Persistence\QueryInterface<TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface>) of method Example\Example\Domain\Repository\NewsRepository::createQuery()
should be compatible with return type (TYPO3\CMS\Extbase\Persistence\QueryInterface<object>)
of method TYPO3\CMS\Extbase\Persistence\RepositoryInterface<object>::createQuery()
I think, the Repository stub is not needed any more in TYPO3 v12. The default Extbase Repository also has a Template:
/** * The base repository - will usually be extended by a more concrete repository. * @template T of \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface * @implements RepositoryInterface<T> */classRepositoryimplementsRepositoryInterface, SingletonInterface
But PHPStan TYPO3 overwrites this with its own template:
/** * @template TEntityClass of \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface */classRepository
When I remove the stub, the PHPStan error disappears.
The text was updated successfully, but these errors were encountered:
I am getting an error when creating a custom repository with a createQuery method:
My repository looks like this:
I think, the Repository stub is not needed any more in TYPO3 v12. The default Extbase Repository also has a Template:
But PHPStan TYPO3 overwrites this with its own template:
When I remove the stub, the PHPStan error disappears.
The text was updated successfully, but these errors were encountered: