The next release of Coder will have #3120001: Global namespace classes should be fully namespaced and this will produce the following errors:

FILE: ... scheduler/tests/src/Functional/SchedulerDefaultTimeTest.php
------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
 5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with
   |       |     use statements (Drupal.Classes.UseGlobalClass.RedundantUseStatement)
 6 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with
   |       |     use statements (Drupal.Classes.UseGlobalClass.RedundantUseStatement)
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------

FILE: ... scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php
------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
 5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with
   |       |     use statements (Drupal.Classes.UseGlobalClass.RedundantUseStatement)
 6 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with
   |       |     use statements (Drupal.Classes.UseGlobalClass.RedundantUseStatement)
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new724 bytes

Here is an attempt to get the latest Coder dev version, so show the new warning.

No tests will be run, just the validate_codebase: section.

Status: Needs review » Needs work

The last submitted patch, 2: 0.drupalci-req-coder-dev.patch, failed testing. View results

jonathan1055’s picture

Status: Needs work » Needs review
StatusFileSize
new815 bytes

So that worked, and we got

cd ${SOURCE_DIR} && sudo -u www-data composer require drupal/coder:8.x-3.x-dev
./composer.json has been updated
Updating dependencies (including require-dev)
Package operations: 1 install, 1 update, 0 removals
  - Updating drupal/coder (8.3.9 => dev-8.x-3.x 792cc9e):  Checking out 792cc9e185

However, phpcs was only run on the changed file, so it now needs

      phpcs:
        sniff-all-files: true

I don't know why the drupal testbot changed the status to 'needs work' as no tests were failed.

Status: Needs review » Needs work

The last submitted patch, 4: 3163712-4.drupalci-req-coder-dev.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jonathan1055’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB

That's good. We now get the following, from the dev version of coder

tests/src/Functional/SchedulerDefaultTimeTest.php ✗ 2 more
line
5 Non-namespaced classes/interfaces/traits should not be referenced with use statements
6 Non-namespaced classes/interfaces/traits should not be referenced with use statements

tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php ✗ 2 more
5 Non-namespaced classes/interfaces/traits should not be referenced with use statements
6 Non-namespaced classes/interfaces/traits should not be referenced with use statements

Here's the fixes to those two files.

Status: Needs review » Needs work

The last submitted patch, 6: 3163712-6.drupalci-req-coder-dev.patch, failed testing. View results

jonathan1055’s picture

Status: Needs work » Needs review
StatusFileSize
new2.66 KB

No coding standards faults. Now run the tests too.

  • jonathan1055 committed 5281240 on 8.x-1.x
    Issue #3163712 by jonathan1055: Non-namespaced classes should not be...
jonathan1055’s picture

Status: Needs review » Fixed

Done

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.