Commit d6fa37ea authored by Benni Mack's avatar Benni Mack Committed by Oliver Bartsch
Browse files

[TASK] Replace fetchColumn with fetchOne for Doctrine DBAL

This change replaces all query results from the
database from fetchColumn() to fetchOne(), as this
is the new API used in Doctrine DBAL.

This change is one of a few to prepare for
Doctrine DBAL 3.0 compatibility.

Resolves: #94605
Releases: master
Change-Id: Ia9ca2bbb7b2c16a230c5946941cc3023203f494d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69917


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent b6c2a5ea
......@@ -55,7 +55,7 @@ class Tables
)
)
->execute()
->fetchColumn();
->fetchOne();
if ($deletedCount) {
/* @var DeletedRecords $deletedDataObject */
......
......@@ -152,7 +152,7 @@ class RecyclerUtility
->from('pages')
->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($pid, \PDO::PARAM_INT)))
->execute()
->fetchColumn();
->fetchOne();
return (bool)$deleted;
}
......@@ -174,7 +174,7 @@ class RecyclerUtility
->from($table)
->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)))
->execute()
->fetchColumn();
->fetchOne();
return (int)$pid;
}
......
......@@ -105,7 +105,7 @@ class RedirectRepositoryTest extends FunctionalTestCase
->count('uid')
->from('sys_redirect')
->execute()
->fetchColumn(0);
->fetchOne();
}
private function getDemand(
......
......@@ -72,7 +72,7 @@ class ConfigurationStatus implements StatusProviderInterface
->count('*')
->from('sys_refindex')
->execute()
->fetchColumn(0);
->fetchOne();
$registry = GeneralUtility::makeInstance(Registry::class);
$lastRefIndexUpdate = $registry->get('core', 'sys_refindex_lastUpdate');
......@@ -244,7 +244,7 @@ class ConfigurationStatus implements StatusProviderInterface
)
->setMaxResults(1)
->execute()
->fetchColumn();
->fetchOne();
$severity = ReportStatus::OK;
$statusValue = $this->getLanguageService()->getLL('status_ok');
......
......@@ -86,7 +86,7 @@ class FalStatus implements StatusProviderInterface
)
)
->execute()
->fetchColumn(0);
->fetchOne();
}
if ($count) {
......
......@@ -149,7 +149,7 @@ final class ToolbarItemProvider
->where(
$queryBuilder->expr()->eq('deleted', 0)
);
return $queryBuilder->execute()->fetchColumn() > 0;
return $queryBuilder->execute()->fetchOne() > 0;
}
/**
......
......@@ -920,7 +920,7 @@ class SetupModuleController
)
)
->execute()
->fetchColumn();
->fetchOne();
return (int)$file;
}
......
......@@ -1154,7 +1154,7 @@ class DataHandlerHook
->orderBy('uid')
->execute();
while (($recordId = $result->fetchColumn()) !== false) {
while (($recordId = $result->fetchOne()) !== false) {
$command[$tcaTable][$recordId]['version']['action'] = 'flush';
}
}
......
......@@ -382,7 +382,7 @@ class WorkspacePreview implements MiddlewareInterface
)
)
->execute()
->fetchColumn();
->fetchOne();
return (string)($title !== false ? $title : '');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment