Skip to content

Commit

Permalink
Merge pull request #38 from ErHaWeb/master
Browse files Browse the repository at this point in the history
[TASK] Use Connection instead of PDO
  • Loading branch information
bmack authored Mar 20, 2024
2 parents a920e2a + 25c5401 commit c7a7bd4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Classes/Command/MigrateFieldsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
->select('uid')
->from('pages')
->where(
$queryBuilder->expr()->eq('tx_realurl_exclude', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT))
$queryBuilder->expr()->eq('tx_realurl_exclude', $queryBuilder->createNamedParameter(1, Connection::PARAM_INT))
)
->execute()
->fetchAll();
Expand Down
3 changes: 2 additions & 1 deletion Classes/SlugModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\DataHandling\SlugHelper;
use TYPO3\CMS\Core\Information\Typo3Version;
Expand Down Expand Up @@ -83,7 +84,7 @@ protected function resolveHookParameters(array $configuration, string $tableName
$stm = $queryBuilder->select('*')
->from('pages')
->where(
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($record['uid'], \PDO::PARAM_INT))
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($record['uid'], Connection::PARAM_INT))
)
->execute();
if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() === 10) {
Expand Down
3 changes: 2 additions & 1 deletion Classes/Updates/MigrateRealUrlExcludeField.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* of the License, or any later version.
*/

use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Updates\DatabaseUpdatedPrerequisite;
Expand Down Expand Up @@ -49,7 +50,7 @@ protected function getExistingExcludedPages(): array
->where(
$queryBuilder->expr()->eq(
'tx_realurl_exclude',
$queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)
$queryBuilder->createNamedParameter(1, Connection::PARAM_INT)
)
)
->execute()
Expand Down

0 comments on commit c7a7bd4

Please sign in to comment.