Problem
The interest:pendingrelations --resolve command aborts before processing resolvable relations when running with TYPO3 13 and Doctrine DBAL 4.
The command imports Doctrine\DBAL\Driver\Result, but QueryBuilder->executeQuery() returns Doctrine\DBAL\Result.
Because of that, the runtime type check fails even though the query result is valid.
Steps to reproduce
- Have resolvable rows in
tx_interest_pending_relations
- Run:
typo3 interest:pendingrelations --resolve
- The command aborts with:
Query result was not an instance of Doctrine\DBAL\Driver\Result
Expected behavior
The command should accept the executeQuery() result and continue resolving pending relations.
Suggested fix
Replace the imported type in Classes/Command/PendingRelationsCommandController.php:
use Doctrine\DBAL\Result;
instead of:
use Doctrine\DBAL\Driver\Result;
Reference
TYPO3 documents that QueryBuilder->executeQuery() returns a \Doctrine\DBAL\Result object:
https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.html#database-query-builder-execute-query
Problem
The
interest:pendingrelations --resolvecommand aborts before processing resolvable relations when running with TYPO3 13 and Doctrine DBAL 4.The command imports
Doctrine\DBAL\Driver\Result, butQueryBuilder->executeQuery()returnsDoctrine\DBAL\Result.Because of that, the runtime type check fails even though the query result is valid.
Steps to reproduce
tx_interest_pending_relationsExpected behavior
The command should accept the
executeQuery()result and continue resolving pending relations.Suggested fix
Replace the imported type in
Classes/Command/PendingRelationsCommandController.php:instead of:
Reference
TYPO3 documents that
QueryBuilder->executeQuery()returns a\Doctrine\DBAL\Resultobject:https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.html#database-query-builder-execute-query