Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
058a2a5
Update composer dependencies for typo3 v13 support.
thomaslow Jul 24, 2025
38d7c11
Delete ext_tables.php which is not supported in v12+ any longer.
thomaslow Jul 24, 2025
fa094bd
Update TCA file field definitions for typ3 v13 support.
thomaslow Jul 24, 2025
48947aa
Fix fatal php typing errors in typo3 v13.
thomaslow Jul 24, 2025
0100477
Merge branch 'master' into typo3-v13-support
thomaslow Aug 5, 2025
add58f2
Remove variable definition in SolrCore.php which is inherited but dif…
thomaslow Aug 5, 2025
52bb08e
Fix template rendering in NewTenantController compatible to v12 and v13.
thomaslow Aug 5, 2025
0be9bf9
Workaround for retrieving storagePid in ItemsProcFunc.php.
thomaslow Aug 5, 2025
63c4602
Remove TCEforms wrapper in FlexForm xml files for Typo3 v13 support.
thomaslow Aug 5, 2025
fb714ca
Fix deprecated _GPmerged call in SearchController.php.
thomaslow Aug 5, 2025
de75f4e
Update QueryBuilder::execute to QueryBuilder::executeQuery for Typo3 …
thomaslow Aug 5, 2025
63598ea
Fix more querybuilder issues for Typo3 v13 update.
thomaslow Aug 5, 2025
b23c3ba
Fix NavigationController.php for Typo3 v13 update.
thomaslow Aug 5, 2025
b627ea3
Fix exception indexing page without fulltext.
thomaslow Aug 7, 2025
d5dd3da
Fix error if there is no previous or next document.
thomaslow Aug 7, 2025
f411620
Merge branch 'fix-error-if-no-prev-next-document' into typo3-v13-support
thomaslow Aug 7, 2025
33097b3
Update composer dependencies for typo3 testing framework and phpunit …
thomaslow Aug 8, 2025
74a1f76
Fix query in DocumentRespository due to deprecation upgrading to Typo…
thomaslow Aug 8, 2025
c13a743
Fix wrong viewer Javascript is triggered beacuse multi-view setting …
thomaslow Aug 8, 2025
b2b6927
Merge branch 'fix-viewer-due-to-multi-view-setting' into typo3-v13-su…
thomaslow Aug 8, 2025
82b89ec
Fix exception when filtering search results via facet constraints.
thomaslow Aug 8, 2025
4560713
Merge branch 'fix-exception-filtering-search-results-via-facets' into…
thomaslow Aug 8, 2025
01598c2
Fix storing search parameters as session parameter for Typo3 v13 update.
thomaslow Aug 8, 2025
2958f31
Merge branch 'fix-exception-indexing-page-without-fulltext' into typo…
thomaslow Aug 9, 2025
7979268
Update FlashMessage severities to use ContextualFeedbackSeverity enum.
thomaslow Aug 9, 2025
3781605
Fix custom rendering of FlashMessages in form fields. Remove flash me…
thomaslow Aug 9, 2025
3f63717
Dynamically instantiate FrontendTypoScriptFactory in TypoScriptHelper…
thomaslow Aug 9, 2025
d3587aa
Migrate language service translation calls for Typo3 v13 support.
thomaslow Aug 9, 2025
094b287
Update parameter type to ContextualFeedbackSeverity for Typo3 v13 sup…
thomaslow Aug 9, 2025
b7ef5d5
Fix validation form translation.
thomaslow Aug 9, 2025
163d8a1
Merge branch 'fix-validation-form-translation' into typo3-v13-support
thomaslow Aug 9, 2025
3814f87
Add padding around error page of New Tenant Module.
thomaslow Aug 9, 2025
500adda
Remove workaround to disable "json_response" framework extension whic…
thomaslow Aug 12, 2025
92fa132
Update test fixtures for Typo3 v13 update.
thomaslow Aug 13, 2025
7414183
Remove unused bool reference to disable json_request framework extens…
thomaslow Aug 13, 2025
1764015
Fix deprecated call to GeneralUtility::_GP in OaiPmhController.php fo…
thomaslow Aug 13, 2025
1deec9d
Fix typing error in SolrSearchTest for Typo3 v13 update.
thomaslow Aug 13, 2025
7e14b6d
Fix spelling mistake in filename of MetadataRepositoryTest, preventin…
thomaslow Aug 13, 2025
011691d
Fix ConfigurationManager::getContentObject was removed for Typo3 update.
thomaslow Aug 13, 2025
0abadf6
Fix MetadataWrapVariableViewHelper due to deprecated TypoScriptParser…
thomaslow Aug 13, 2025
b9f64e4
Migrate phpunit configuration files via "phpunit --migrate-configurat…
thomaslow Aug 13, 2025
cc1dc1c
Fix StdWrapViewHelper for Typo3 v12.
thomaslow Aug 13, 2025
57dff89
Remove outdated call to LanguageService::includeLLFile due to Typo3 v…
thomaslow Aug 15, 2025
795e0a4
Fix solr tests that failed due to reusing same solr index due to stat…
thomaslow Aug 15, 2025
6e6a9b5
Add typo3/cms-install dependency due to reference to UpgradeWizardInt…
thomaslow Aug 15, 2025
3fbb80e
Ignore missing php extensions required by Typo3 when merely running p…
thomaslow Aug 15, 2025
17e0424
Update main README.md for Typo3 v12 and v13 support.
thomaslow Aug 15, 2025
34ddcba
Update Kitodo.Presentation package description for Typo3 v12 and v13 …
thomaslow Aug 15, 2025
a3ff5b0
Update GitHub test matrix for Typo3 v12 and v13 support against PHP 8…
thomaslow Aug 15, 2025
efc57a2
FIx useGroup check for fulltext files. Reduce logger severity to debu…
thomaslow Aug 15, 2025
f5e1018
Merge branch 'fix-exception-indexing-page-without-fulltext' into typo…
thomaslow Aug 15, 2025
41aa815
Reset index name cache when testing solr. Otherwise Index name cache …
thomaslow Aug 15, 2025
a2b29cb
Fix deprecations and warnings reported by phpunit for Typo3 v13 update.
thomaslow Aug 15, 2025
ab66950
Make SolrSearchQueryTest work to prevent empty test class warning of …
thomaslow Aug 15, 2025
a865013
Remove internal_type option which is not evaluated any more for Typo3…
thomaslow Aug 16, 2025
accdb75
Migrate TCA required option from eval list to separate option for Typ…
thomaslow Aug 16, 2025
559db5d
Migrate TCA datetime fields from type input to type datetime for Typo…
thomaslow Aug 16, 2025
7063491
Migrate TCA number fields from type input to type number for Typo3 v1…
thomaslow Aug 16, 2025
4dac0d6
Remote TCA ctrl definition cruser_id which is not evaluated any more …
thomaslow Aug 16, 2025
973e319
Migrate TCA select items option to associative array for Typo3 v13 up…
thomaslow Aug 16, 2025
21b64f8
Fix SolrTest::canGetNextCoreNumber to check increment of one instead …
thomaslow Aug 16, 2025
573119d
Extend version range for symfony/process back to 6.4 such that PHP 8.…
thomaslow Aug 16, 2025
4ca774c
Merge branch 'main' into fix-exception-filtering-search-results-via-f…
sebastian-meyer Aug 16, 2025
a1d2350
Fix phpstan issues.
thomaslow Aug 20, 2025
e7c5bc7
Remove phpstan ignore rule.
thomaslow Aug 20, 2025
1c0713a
Merge branch 'master' into typo3-v13-support
thomaslow Aug 20, 2025
50400c2
Merge branch 'fix-exception-filtering-search-results-via-facets' into…
thomaslow Aug 20, 2025
cee4d30
Fix code style issues.
thomaslow Aug 20, 2025
5e56e8c
Fix codestyle issues.
thomaslow Aug 20, 2025
0092e11
Replace deprecated repository magic findBy methods.
thomaslow Aug 20, 2025
edb493b
Fix codestyle issues.
thomaslow Aug 20, 2025
734be4a
Ignore phpcs error about escaping which does not apply here.
thomaslow Aug 21, 2025
d151417
Fix call to protected PageRepository::getRecordOverlay for Typo3 v13 …
thomaslow Aug 23, 2025
cf5e3ba
Migrate custom upgrade wizards to use service tags for Typo3 v13 update.
thomaslow Aug 23, 2025
d167861
Merge branch 'master' into typo3-v13-support
thomaslow Aug 25, 2025
9580604
Fix TypoScriptHelper not releasing locks for Typo3 v13 update.
thomaslow Aug 25, 2025
a41da8e
Use custom versions of ubl/php-iiif-prezi-reader with PHP 8.1 and 8.2…
thomaslow Aug 26, 2025
3528810
Run phpstan in CI with both Typo3 v12 and v13.
thomaslow Aug 26, 2025
1579c23
Use different phpstan config depending on Typo3 version.
thomaslow Aug 26, 2025
745ddf4
Update mail API in BasketController for Typo3 v13 update.
thomaslow Aug 26, 2025
a591efe
Restrict dbdocs command to only run with Typo3 v13 due to heavy Typo3…
thomaslow Aug 26, 2025
cbaf7d4
Fix db schema parser call for dbdocs command for Typo3 v13 update.
thomaslow Aug 26, 2025
179f3cb
Remove phpstan ignore comments in TypoScriptHelper.php which are now …
thomaslow Aug 26, 2025
d09c428
Migrate scheduler action class changed to enum in Typo3 v13.
thomaslow Aug 26, 2025
9c254ac
Migrate PDO::PARAM_* to Connection::PARAM_* for Typo3 v13 update.
thomaslow Aug 26, 2025
5205afc
Update BasketController and replace deprecated GLOBALS['TSFE'] with r…
thomaslow Aug 26, 2025
cfb0736
Merge branch 'master' into typo3-v13-support
thomaslow Aug 27, 2025
bb03409
Fix code style issue in BasketController.php.
thomaslow Aug 27, 2025
3e3df59
Merge branch 'master' into typo3-v13-support
thomaslow Aug 28, 2025
ebad025
Update Classes/Command/BaseCommand.php
sebastian-meyer Sep 1, 2025
87816ca
Update Classes/Command/BaseCommand.php
sebastian-meyer Sep 1, 2025
c12cc2d
Update Classes/Command/BaseCommand.php
sebastian-meyer Sep 1, 2025
e2c239e
Update Classes/Command/BaseCommand.php
sebastian-meyer Sep 1, 2025
28104d4
Update Classes/Command/DbDocsCommand.php
sebastian-meyer Sep 1, 2025
24b7f0a
Update Classes/Domain/Repository/DocumentRepository.php
sebastian-meyer Sep 1, 2025
daca61a
Update Classes/Domain/Repository/DocumentRepository.php
sebastian-meyer Sep 1, 2025
54e0d1d
Update Classes/Domain/Repository/DocumentRepository.php
sebastian-meyer Sep 1, 2025
2ae6e55
Update Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php
sebastian-meyer Sep 1, 2025
60afa1c
Update Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php
sebastian-meyer Sep 1, 2025
acad802
Update Classes/Command/DeleteCommand.php
sebastian-meyer Sep 1, 2025
9eef26f
Update Classes/Command/DeleteCommand.php
sebastian-meyer Sep 1, 2025
2a56a47
Update Classes/Command/HarvestCommand.php
sebastian-meyer Sep 1, 2025
655eaf1
Update Classes/Command/IndexCommand.php
sebastian-meyer Sep 1, 2025
2f04975
Update Classes/Command/IndexCommand.php
sebastian-meyer Sep 1, 2025
54f4c6b
Update Classes/Command/IndexCommand.php
sebastian-meyer Sep 1, 2025
fa88a21
Update Classes/Command/ReindexCommand.php
sebastian-meyer Sep 1, 2025
fce9e94
Update Classes/Controller/AbstractController.php
sebastian-meyer Sep 1, 2025
e86abe4
Update Classes/Controller/AbstractController.php
sebastian-meyer Sep 1, 2025
961654c
Update Classes/Controller/Backend/NewTenantController.php
sebastian-meyer Sep 1, 2025
f936955
Update Classes/Controller/Backend/NewTenantController.php
sebastian-meyer Sep 1, 2025
1ed1ed5
Update Classes/Controller/Backend/NewTenantController.php
sebastian-meyer Sep 1, 2025
c88fce8
Update Classes/Controller/Backend/NewTenantController.php
sebastian-meyer Sep 1, 2025
4a55150
Update Classes/Controller/Backend/NewTenantController.php
sebastian-meyer Sep 1, 2025
81dec1c
Update Classes/Controller/BasketController.php
sebastian-meyer Sep 1, 2025
ef0cf48
Update Classes/Controller/BasketController.php
sebastian-meyer Sep 1, 2025
280cf0e
Update Classes/Controller/BasketController.php
sebastian-meyer Sep 1, 2025
d3bde74
Update Classes/Controller/CalendarController.php
sebastian-meyer Sep 1, 2025
893238b
Update Classes/Controller/CalendarController.php
sebastian-meyer Sep 1, 2025
7b77383
Update Classes/Controller/MetadataController.php
sebastian-meyer Sep 1, 2025
5ed0ee4
Update Classes/Controller/MetadataController.php
sebastian-meyer Sep 1, 2025
9abeca2
Update Classes/Controller/OaiPmhController.php
sebastian-meyer Sep 1, 2025
a86a7f9
Update Classes/Controller/OaiPmhController.php
sebastian-meyer Sep 1, 2025
3ac96e1
Update Classes/Controller/OaiPmhController.php
sebastian-meyer Sep 1, 2025
55a2322
Update Classes/Domain/Repository/DocumentRepository.php
sebastian-meyer Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/phpstan.neon

This file was deleted.

27 changes: 27 additions & 0 deletions .github/phpstan_12.4.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
parameters:
ignoreErrors:
- '#Call to an undefined method Psr\\Http\\Message\\RequestFactoryInterface::request\(\)\.#'
- '#Call to an undefined method Ubl\\Iiif\\Presentation\\Common\\Model\\Resources\\ManifestInterface::getOriginalJsonArray\(\)\.#'
- '#Call to an undefined method Ubl\\Iiif\\Presentation\\Common\\Model\\Resources\\RangeInterface::getMemberRangesAndRanges\(\)\.#'
-
message: '#Class TYPO3\\CMS\\Core\\TypoScript\\FrontendTypoScriptFactory not found\.#'
path: ../Classes/Common/TypoScriptHelper.php
-
message: '#Call to method createSettingsAndSetupConditions\(\) on an unknown class TYPO3\\CMS\\Core\\TypoScript\\FrontendTypoScriptFactory\.#'
path: ../Classes/Common/TypoScriptHelper.php
-
message: '#Call to method createSetupConfigOrFullSetup\(\) on an unknown class TYPO3\\CMS\\Core\\TypoScript\\FrontendTypoScriptFactory\.#'
path: ../Classes/Common/TypoScriptHelper.php
-
message: '#PHPDoc tag @var for variable \$action contains unknown class TYPO3\\CMS\\Scheduler\\SchedulerManagementAction\.#'
path: ../Classes/Task/BaseAdditionalFieldProvider.php
-
message: '#Access to constant EDIT on an unknown class TYPO3\\CMS\\Scheduler\\SchedulerManagementAction\.#'
path: ../Classes/Task/BaseAdditionalFieldProvider.php
level: 5
paths:
- ../Classes/
excludePaths:
- ../Classes/Controller/OaiPmhController.php
- ../Classes/Command/DbDocs/Generator.php # dbdocs command is not supported in Typo3 v12
treatPhpDocTypesAsCertain: false
26 changes: 26 additions & 0 deletions .github/phpstan_13.4.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
parameters:
ignoreErrors:
- '#Call to an undefined method Psr\\Http\\Message\\RequestFactoryInterface::request\(\)\.#'
- '#Call to an undefined method Ubl\\Iiif\\Presentation\\Common\\Model\\Resources\\ManifestInterface::getOriginalJsonArray\(\)\.#'
- '#Call to an undefined method Ubl\\Iiif\\Presentation\\Common\\Model\\Resources\\RangeInterface::getMemberRangesAndRanges\(\)\.#'
-
message: '#Call to an undefined method TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::getFromCache\(\)\.#'
path: ../Classes/Common/TypoScriptHelper.php
-
message: '#Call to an undefined method TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::releaseLocks\(\)\.#'
path: ../Classes/Common/TypoScriptHelper.php
-
message: '#PHPDoc tag @var for variable \$action contains unknown class TYPO3\\CMS\\Scheduler\\Task\\Enumeration\\Action\.#'
path: ../Classes/Task/BaseAdditionalFieldProvider.php
-
message: '#Access to constant EDIT on an unknown class TYPO3\\CMS\\Scheduler\\Task\\Enumeration\\Action\.#'
path: ../Classes/Task/BaseAdditionalFieldProvider.php
-
message: '#Call to method equals\(\) on an unknown class TYPO3\\CMS\\Scheduler\\Task\\Enumeration\\Action\.#'
path: ../Classes/Task/BaseAdditionalFieldProvider.php
level: 5
paths:
- ../Classes/
excludePaths:
- ../Classes/Controller/OaiPmhController.php
treatPhpDocTypesAsCertain: false
7 changes: 6 additions & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
phpstan:
name: Static Code Analysis
runs-on: ubuntu-latest
strategy:
matrix:
variants: [ {typo3: 12.4, php: 8.1}, {typo3: 13.4, php: 8.4} ]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -18,9 +21,11 @@ jobs:
uses: php-actions/composer@v6
with:
command: update
php_version: ${{ matrix.variants.php }}
args: --ignore-platform-reqs --with=typo3/cms-core:^${{ matrix.variants.typo3 }}

- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
configuration: ./.github/phpstan.neon
configuration: ./.github/phpstan_${{ matrix.variants.typo3 }}.neon
path: ''
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
variants: [ {typo3: 11.5, php: 8.1}, {typo3: 12.4, php: 8.1}, {typo3: 11.5, php: 8.3}, {typo3: 12.4, php: 8.4} ]
variants: [ {typo3: 12.4, php: 8.1}, {typo3: 12.4, php: 8.4}, {typo3: 13.4, php: 8.2}, {typo3: 13.4, php: 8.4} ]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
11 changes: 4 additions & 7 deletions Build/Test/FunctionalTests.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
<?xml version="1.0"?>
<!-- adopted from https://github.com/TYPO3/styleguide/blob/2a51dc3db6c2916c07595dd96e8b817a73216002/Build/FunctionalTests.xml -->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="true"
bootstrap="../../vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
cacheResult="false"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertDeprecationsToExceptions="true"
forceCoversAnnotation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="false"
failOnWarning="true"
cacheDirectory=".phpunit.cache"
requireCoverageMetadata="false"
>
<testsuites>
<testsuite name="Functional tests">
Expand Down
10 changes: 4 additions & 6 deletions Build/Test/UnitTests.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<?xml version="1.0"?>
<!-- adopted from https://github.com/TYPO3/styleguide/blob/2a51dc3db6c2916c07595dd96e8b817a73216002/Build/UnitTests.xml -->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="true"
bootstrap="../../vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
cacheResult="false"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="false"
failOnWarning="true"
cacheDirectory=".phpunit.cache"
requireCoverageMetadata="false"
>
<testsuites>
<testsuite name="Unit tests">
Expand Down
14 changes: 9 additions & 5 deletions Classes/Command/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
use Kitodo\Dlf\Validation\DocumentValidator;
use Symfony\Component\Console\Command\Command;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Core\SystemEnvironmentBuilder;
use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
Expand Down Expand Up @@ -128,6 +130,8 @@ public function __construct(
*/
protected function initializeRepositories(int $storagePid): void
{
$request = (new ServerRequest())->withAttribute("applicationType", SystemEnvironmentBuilder::REQUESTTYPE_BE);
$this->configurationManager->setRequest($request);
$frameworkConfiguration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$frameworkConfiguration['persistence']['storagePid'] = MathUtility::forceIntegerInRange($storagePid, 0);
$this->configurationManager->setConfiguration($frameworkConfiguration);
Expand Down Expand Up @@ -180,7 +184,7 @@ protected function getSolrCores(int $pageId): array
$queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT)
)
)
->execute();
->executeQuery();

while ($record = $result->fetchAssociative()) {
$solrCores[$record['index_name']] = $record['uid'];
Expand Down Expand Up @@ -222,7 +226,7 @@ protected function saveToDatabase(Document $document, bool $softCommit = false):
$document->setMetsLabel($metadata['mets_label'][0] ?? '');
$document->setMetsOrderlabel($metadata['mets_orderlabel'][0] ?? '');

$structure = $this->structureRepository->findOneByIndexName($metadata['type'][0]);
$structure = $this->structureRepository->findOneBy(['indexName' => $metadata['type'][0]]);
if ($structure !== null) {
$document->setStructure($structure);
}
Expand Down Expand Up @@ -297,7 +301,7 @@ protected function getParentDocumentUidForSaving(Document $document, bool $softC
$parent = AbstractDocument::getInstance($doc->parentHref, ['storagePid' => $this->storagePid], true);

if ($parent->recordId) {
$parentDocument = $this->documentRepository->findOneByRecordId($parent->recordId);
$parentDocument = $this->documentRepository->findOneBy(['recordId' => $parent->recordId]);

if ($parentDocument === null) {
// create new Document object
Expand Down Expand Up @@ -335,7 +339,7 @@ protected function getParentDocumentUidForSaving(Document $document, bool $softC
private function addCollections(Document &$document, array $collections): void
{
foreach ($collections as $collection) {
$documentCollection = $this->collectionRepository->findOneByIndexName($collection);
$documentCollection = $this->collectionRepository->findOneBy(['indexName' => $collection]);
if (!$documentCollection) {
// create new Collection object
$documentCollection = GeneralUtility::makeInstance(Collection::class);
Expand Down Expand Up @@ -428,7 +432,7 @@ private function setOwner($owner): void
if (empty($this->owner)) {
// owner is not set set but found by metadata --> take it or take default library
$owner = $owner ? : 'default';
$this->owner = $this->libraryRepository->findOneByIndexName($owner);
$this->owner = $this->libraryRepository->findOneBy(['indexName' => $owner]);
if (empty($this->owner)) {
// create library
$this->owner = GeneralUtility::makeInstance(Library::class);
Expand Down
10 changes: 5 additions & 5 deletions Classes/Command/DbDocs/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
namespace Kitodo\Dlf\Command\DbDocs;

use Doctrine\DBAL\Schema\Table;
use Kitodo\Dlf\Common\Helper;
use ReflectionClass;
use ReflectionProperty;
use RuntimeException;
use TYPO3\CMS\Core\Database\Schema\Parser\Lexer;
use TYPO3\CMS\Core\Database\Schema\Parser\Parser;
use TYPO3\CMS\Core\Database\Schema\SqlReader;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Persistence\ClassesConfiguration;
use TYPO3\CMS\Extbase\Persistence\ClassesConfigurationFactory;
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory;
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;

Expand Down Expand Up @@ -101,8 +101,8 @@ public function collectTables(): array
$result = [];

foreach ($createTableStatements as $statement) {
$parser = new Parser($statement);
list($table) = $parser->parse();
$parser = new Parser(new Lexer());
list($table) = $parser->parse($statement);

$tableName = $table->getName();
if (!str_starts_with($tableName, 'tx_dlf_')) {
Expand Down
12 changes: 7 additions & 5 deletions Classes/Command/DbDocsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@

namespace Kitodo\Dlf\Command;

use Kitodo\Dlf\Common\AbstractDocument;
use Kitodo\Dlf\Common\Indexer;
use Kitodo\Dlf\Command\DbDocs\Generator;
use Kitodo\Dlf\Domain\Model\Document;
use RuntimeException;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;

/**
* CLI Command for generating the reStructuredText file containing documentation
Expand Down Expand Up @@ -81,6 +78,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$outputPath = $input->getArgument('outputPath');
}

$typo3Version = (new Typo3Version())->getMajorVersion();
if ($typo3Version != 13) {
throw new RuntimeException(("dbdocs command can only be run with TYPO3 v13"));
}

$tables = $this->generator->collectTables();
$page = $this->generator->generatePage($tables);

Expand Down
4 changes: 2 additions & 2 deletions Classes/Command/DeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ private function getDocument($input): ?Document
$doc = AbstractDocument::getInstance($input->getOption('doc'), ['storagePid' => $this->storagePid], true);

if ($doc->recordId) {
$document = $this->documentRepository->findOneByRecordId($doc->recordId);
$document = $this->documentRepository->findOneBy(['recordId' => $doc->recordId]);
} else {
$document = $this->documentRepository->findOneByLocation($input->getOption('doc'));
$document = $this->documentRepository->findOneBy(['location' => $input->getOption('doc')]);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/HarvestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

if ($doc->recordId) {
$document = $this->documentRepository->findOneByRecordId($doc->recordId);
$document = $this->documentRepository->findOneBy(['recordId' => $doc->recordId]);
}

if ($document === null) {
Expand Down
6 changes: 3 additions & 3 deletions Classes/Command/IndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if (MathUtility::canBeInterpretedAsInteger($input->getOption('owner'))) {
$this->owner = $this->libraryRepository->findByUid(MathUtility::forceIntegerInRange((int) $input->getOption('owner'), 1));
} else {
$this->owner = $this->libraryRepository->findOneByIndexName((string) $input->getOption('owner'));
$this->owner = $this->libraryRepository->findOneBy(['indexName' => (string) $input->getOption('owner')]);
}
} else {
$this->owner = null;
Expand Down Expand Up @@ -232,9 +232,9 @@ private function getDocumentFromUrl($doc, string $url): Document
$document = null;

if ($doc->recordId ?? false) {
$document = $this->documentRepository->findOneByRecordId($doc->recordId);
$document = $this->documentRepository->findOneBy(['recordId' => $doc->recordId]);
} else {
$document = $this->documentRepository->findOneByLocation($url);
$document = $this->documentRepository->findOneBy(['location' => $url]);
}

if ($document === null) {
Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/ReindexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if (MathUtility::canBeInterpretedAsInteger($input->getOption('owner'))) {
$this->owner = $this->libraryRepository->findByUid(MathUtility::forceIntegerInRange((int) $input->getOption('owner'), 1));
} else {
$this->owner = $this->libraryRepository->findOneByIndexName((string) $input->getOption('owner'));
$this->owner = $this->libraryRepository->findOneBy(['indexName' => (string) $input->getOption('owner')]);
}
} else {
$this->owner = null;
Expand Down
4 changes: 2 additions & 2 deletions Classes/Common/AbstractDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public static function getTitle(int $uid, bool $recursive = false): string
Helper::whereExpression('tx_dlf_documents')
)
->setMaxResults(1)
->execute();
->executeQuery();

$resArray = $result->fetchAssociative();
if ($resArray) {
Expand Down Expand Up @@ -761,7 +761,7 @@ protected function loadFormats(): void
->where(
$queryBuilder->expr()->eq('pid', $this->configPid)
)
->execute();
->executeQuery();

while ($resArray = $result->fetchAssociative()) {
// Update format registry.
Expand Down
Loading