Project

General

Profile

Bug #103703

Updated by Daniel Siepmann 26 days ago

TYPO3 decorates the doctrine dbal QueryBuilder. This includes the createNamedParameter() method. 
 Doctrine DBAL supports the following types in v12.4: <code>int|string</code> while TYPO3 only supports <code>int</code>. 
 TYPO3 main (13.x) supports <code>ParameterType|ArrayParameterType</code> while newest dbal 4.x supports <code>string|ParameterType|Type|ArrayParameterType</code>. 

 This leads to a situation that it seems impossible to provide a <code>DateTimeImmutable</code> instance and allow dbal to properly cast it to date which could be provided as string in v12 or <code>DateType</code> in main. 
 That comes in handy if using the native date/datetime/time fields introduced some time ago with TCA. 

 Is there a reason this is not supported by TYPO3? 

 Our example code with patched v12.4: 

 <pre><code class="php"> 
         $queryBuilder->where($queryBuilder->expr()->gte( 
             'date.start', 
             $queryBuilder->createNamedParameter($startAfter, 'date') 
         )); 
 </code></pre> 

Back