Address PHPCS test failure

Created on 16 November 2024, about 1 month ago

Problem/Motivation

Currently the PHPCS tests are failing.

$ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
FILE: ..._merge/web/modules/custom/config_merge/tests/src/Unit/ConfigMergerTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Tests\UnitTestCase.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...nfig_merge_filter/src/EventSubscriber/ConfigMergeFilterEventSubscriber.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Core\Config\ConfigEvents.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 155ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...er/src/EventSubscriber/ConfigMergeFilterEventSubscriber.php  1       0
...les/custom/config_merge/tests/src/Unit/ConfigMergerTest.php  1       0
--------------------------------------------------------------------------------
A TOTAL OF 2 ERRORS AND 0 WARNINGS WERE FOUND IN 5 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 2 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
--------------------------------------------------------------------------------
    SOURCE                                                                 COUNT
--------------------------------------------------------------------------------
[x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.Incorrectl  2
--------------------------------------------------------------------------------
A TOTAL OF 2 SNIFF VIOLATIONS WERE FOUND IN 1 SOURCE
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SOURCES AUTOMATICALLY (2 VIOLATIONS IN TOTAL)
--------------------------------------------------------------------------------
Uploading artifacts for failed job

Steps to reproduce

Visit: https://git.drupalcode.org/project/config_merge/-/jobs/3373680

Proposed resolution

Sort the use statements how SlevomatCodingStandard wants them.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024