Project

General

Profile

Actions

Bug #103868

closed

Avoid throwing away previous errors in integrity checks

Added by Stefan Bürk about 1 month ago. Updated about 1 month ago.

Status:
Resolved
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 parserResolvedAnja Leichsenring2024-03-22

Actions
Actions #1

Updated by Stefan Bürk about 1 month ago

  • Related to Task #103465: Create common base for integrity checker using finder and php parser added
Actions #2

Updated by Stefan Bürk about 1 month ago

  • Description updated (diff)
Actions #3

Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84333

Actions #4

Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84333

Actions #5

Updated by Stefan Bürk about 1 month ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF