Project

General

Profile

Actions

Bug #103868

closed

Avoid throwing away previous errors in integrity checks

Added by Stefan Bürk about 2 months ago. Updated 8 days ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Tests
Target version:
-
Start date:
2024-05-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

With change #103465 a couple of code integrity checks based on the
`nikic/php-parser` has been combined into one file scanning script.

The goal is to collect the information per visitor type over all
files in a internal visitor state, to output per visitor result
after all php file has been scanned. However, the visitor message
state is reset for each file with the call of `startProcessing()`
method within `AbstractPhpIntegrityChecker`, thus keeping only the
result of the last error.

Can be verified by applying following diff:

diff --git a/typo3/sysext/core/Classes/Database/ReferenceIndex.php b/typo3/sysext/core/Classes/Database/ReferenceIndex.php
index 9779818f26e..c6c231a3ce1 100644
--- a/typo3/sysext/core/Classes/Database/ReferenceIndex.php
+++ b/typo3/sysext/core/Classes/Database/ReferenceIndex.php
@@ -15,7 +15,7 @@ declare(strict_types=1);
  * The TYPO3 project - inspiring people to share!
  */

-namespace TYPO3\CMS\Core\Database;
+namespace TYPO3\CMS\Core\DatabaseFoo;

 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Log\LogLevel;
diff --git a/typo3/sysext/scheduler/Tests/Unit/CronCommand/CronCommandTest.php b/typo3/sysext/scheduler/Tests/Unit/CronCommand/CronCommandTest.php
index abb340deffb..d34397df90a 100644
--- a/typo3/sysext/scheduler/Tests/Unit/CronCommand/CronCommandTest.php
+++ b/typo3/sysext/scheduler/Tests/Unit/CronCommand/CronCommandTest.php
@@ -15,7 +15,7 @@ declare(strict_types=1);
  * The TYPO3 project - inspiring people to share!
  */

-namespace TYPO3\CMS\Scheduler\Tests\Unit\CronCommand;
+namespace TYPO3\CMS\Scheduler\Tests\Unit\CronCommandFoo;

 use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\Attributes\Test;

and execute Build/Scripts/runTests.sh -s checkIntegrityPhp


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #103465: Create common base for integrity checker using finder and php parserClosedAnja Leichsenring2024-03-22

Actions
Actions

Also available in: Atom PDF