Skip to content

Commit

Permalink
[TASK] Use Connection instead of PDO
Browse files Browse the repository at this point in the history
In Doctrine DBAL v4, as described in the [documentation](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Database/QueryBuilder/Index.html#database-query-builder-create-named-parameter), support for using the `\PDO::PARAM_*` constants has been dropped in favor of the enum types. This should be migrated to `Connection::PARAM_*` in order to be compatible with TYPO3 v13 later on. `Connection::PARAM_*` can already be used now as it is compatible with TYPO3 11 and 12.
  • Loading branch information
ErHaWeb committed Mar 20, 2024
1 parent 597f083 commit 3d372d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Domain/Repository/CacheRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use SFC\Staticfilecache\Service\ConfigurationService;
use SFC\Staticfilecache\Service\DateTimeService;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
Expand All @@ -23,7 +24,7 @@ public function findExpiredIdentifiers(): array
->from($this->getTableName())
->where($queryBuilder->expr()->lt(
'expires',
$queryBuilder->createNamedParameter((new DateTimeService())->getCurrentTime(), \PDO::PARAM_INT)
$queryBuilder->createNamedParameter((new DateTimeService())->getCurrentTime(), Connection::PARAM_INT)
))
->groupBy('identifier')
->executeQuery()
Expand Down

0 comments on commit 3d372d0

Please sign in to comment.