Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,20 @@ coverage/
.ddev/.homeadditions
.ddev/.ddev-docker-compose-full.yaml
Documentation-GENERATED-temp/

# Exclude large test files (regenerate with generator script)
Build/test-data/test_100mb.textdb_import.xlf
Resources/Private/Language/massive.textdb_import.xlf

# Exclude profiling dumps and large debugging files
Build/scripts/cachegrind.out.*.gz
*.cachegrind

# Serena MCP session data (user-specific)
.serena/

# Claude Code documentation (local development notes)
claudedocs/

# Test files (regenerate with Build/scripts/generate-test-xliff.php)
Build/test-data/
38 changes: 38 additions & 0 deletions Build/FunctionalTests.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="../.build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
cacheDirectory="../.build/.phpunit.cache.functional"
executionOrder="depends,defects"
requireCoverageMetadata="false"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true"
backupGlobals="true"
colors="true"
>
<testsuites>
<testsuite name="nr-textdb-functional">
<directory>../Tests/Functional</directory>
</testsuite>
</testsuites>

<php>
<ini name="display_errors" value="1"/>
<env name="TYPO3_CONTEXT" value="Testing"/>
<env name="TYPO3_PATH_ROOT" value="../.build/public"/>
<env name="typo3DatabaseDriver" value="pdo_sqlite"/>
</php>

<logging>
<junit outputFile="../.build/phpunit-functional-report.xml"/>
</logging>

<source restrictDeprecations="true"
restrictNotices="true"
restrictWarnings="true">
<include>
<directory>../Classes</directory>
</include>
</source>
</phpunit>
246 changes: 231 additions & 15 deletions Build/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parameters:
-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 4
count: 5
path: ../Classes/Controller/TranslationController.php

-
Expand Down Expand Up @@ -60,12 +60,6 @@ parameters:
count: 1
path: ../Classes/Controller/TranslationController.php

-
message: '#^Parameter \#1 \$filename of function file_get_contents expects string, string\|null given\.$#'
identifier: argument.type
count: 1
path: ../Classes/Controller/TranslationController.php

-
message: '#^Parameter \#2 \$settings of method Netresearch\\NrTextdb\\Controller\\TranslationController\:\:getPagination\(\) expects array\<string, bool\|int\>, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -102,6 +96,12 @@ parameters:
count: 1
path: ../Classes/Domain/Repository/EnvironmentRepository.php

-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 6
path: ../Classes/Domain/Repository/ImportJobStatusRepository.php

-
message: '#^Static property Netresearch\\NrTextdb\\Domain\\Repository\\TypeRepository\:\:\$localCache \(array\<Netresearch\\NrTextdb\\Domain\\Model\\Type\>\) does not accept array\<Netresearch\\NrTextdb\\Domain\\Model\\Type\|null\>\.$#'
identifier: assign.propertyType
Expand All @@ -114,12 +114,6 @@ parameters:
count: 1
path: ../Classes/Service/ImportService.php

-
message: '#^Cannot cast mixed to string.$#'
identifier: cast.string
count: 4
path: ../Classes/Service/ImportService.php

-
message: '#^Cannot access offset ''target'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
Expand All @@ -132,6 +126,18 @@ parameters:
count: 1
path: ../Classes/Service/ImportService.php

-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 2
path: ../Classes/Service/ImportService.php

-
message: '#^Cannot cast mixed to string\.$#'
identifier: cast.string
count: 7
path: ../Classes/Service/ImportService.php

-
message: '#^Parameter \#1 \$key of method Netresearch\\NrTextdb\\Service\\ImportService\:\:getComponentFromKey\(\) expects string, mixed given\.$#'
identifier: argument.type
Expand All @@ -151,7 +157,217 @@ parameters:
path: ../Classes/Service/ImportService.php

-
message: '#^Parameter \#5 \$value of method Netresearch\\NrTextdb\\Service\\ImportService\:\:importEntry\(\) expects string, mixed given\.$#'
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 2
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php

-
message: '#^Method Netresearch\\NrTextdb\\Task\\ProcessMessengerQueueTaskAdditionalFieldProvider\:\:getAdditionalFields\(\) has parameter \$taskInfo with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php

-
message: '#^Method Netresearch\\NrTextdb\\Task\\ProcessMessengerQueueTaskAdditionalFieldProvider\:\:saveAdditionalFields\(\) has parameter \$submittedData with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php

-
message: '#^Method Netresearch\\NrTextdb\\Task\\ProcessMessengerQueueTaskAdditionalFieldProvider\:\:validateAdditionalFields\(\) has parameter \$submittedData with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php

-
message: '#^Parameter \#1 \$string of function trim expects string, mixed given\.$#'
identifier: argument.type
count: 2
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php

-
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Service\\ImportService\:\:expects\(\)\.$#'
identifier: method.notFound
count: 6
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method method\(\) on mixed\.$#'
identifier: method.nonObject
count: 6
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method willReturnCallback\(\) on mixed\.$#'
identifier: method.nonObject
count: 5
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method willThrowException\(\) on mixed\.$#'
identifier: method.nonObject
count: 1
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method with\(\) on mixed\.$#'
identifier: method.nonObject
count: 1
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Offset ''status'' might not exist on array\<string, mixed\>\|null\.$#'
identifier: offsetAccess.notFound
count: 2
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 3
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''create'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../Classes/Service/ImportService.php
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php

-
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''deleteOldJobs'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php

-
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''findByJobId'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php

-
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''getStatus'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php

-
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''updateProgress'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php

-
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''updateStatus'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php

-
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository\:\:expects\(\)\.$#'
identifier: method.notFound
count: 4
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Service\\ImportService\:\:expects\(\)\.$#'
identifier: method.notFound
count: 4
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Service\\ImportService\:\:method\(\)\.$#'
identifier: method.notFound
count: 1
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Call to an undefined method Psr\\Log\\LoggerInterface\:\:expects\(\)\.$#'
identifier: method.notFound
count: 4
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
identifier: staticMethod.alreadyNarrowedType
count: 1
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method method\(\) on mixed\.$#'
identifier: method.nonObject
count: 12
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method willReturnCallback\(\) on mixed\.$#'
identifier: method.nonObject
count: 7
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method willThrowException\(\) on mixed\.$#'
identifier: method.nonObject
count: 1
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot call method with\(\) on mixed\.$#'
identifier: method.nonObject
count: 2
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot use \+\+ on mixed\.$#'
identifier: preInc.type
count: 4
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, string\|null given\.$#'
identifier: argument.type
count: 2
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php

-
message: '#^Cannot access property \$backendUserId on mixed\.$#'
identifier: property.nonObject
count: 1
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php

-
message: '#^Cannot access property \$filePath on mixed\.$#'
identifier: property.nonObject
count: 1
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php

-
message: '#^Cannot access property \$fileSize on mixed\.$#'
identifier: property.nonObject
count: 1
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php

-
message: '#^Cannot access property \$forceUpdate on mixed\.$#'
identifier: property.nonObject
count: 1
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php

-
message: '#^Cannot access property \$jobId on mixed\.$#'
identifier: property.nonObject
count: 1
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php

-
message: '#^Cannot access property \$originalFilename on mixed\.$#'
identifier: property.nonObject
count: 1
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php

-
message: '#^Cannot assign offset ''Netresearch\\\\NrTextdb\\\\Task\\\\ProcessMessengerQueueTask'' to array\<string, string\>\|string\.$#'
identifier: offsetAssign.dimType
count: 1
path: ../ext_localconf.php
Loading