I reported in #3049433: Coding standards not running on d.o. - upgrade to coder 8.3.4 that coding standards are not being checked on contrib patches when the tests are run with core 8.8.x. This is due to a problem with Coder module at 8.x-3.2 having a namespace clash which has been resolved in Coder 8.x-3.3. However, this version is not being used by drupal core 8.8 and coder 8.3.2 is still being loaded.

It may be possible to fix this for our tests by applying the core patch https://www.drupal.org/files/issues/2019-04-22/3049433-8.patch in our drupalci.yml and .travis.yml files.

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new412 bytes

Trial patch for drupalci.yml

jonathan1055’s picture

StatusFileSize
new767 bytes

That worked! Now to really test it with a modified file which should have some coding standards faults.

jonathan1055’s picture

StatusFileSize
new975 bytes

PHPCS was still 8.3.2 - it was not reloaded, I guess the patch to drupal's composer.json was executed too late to be effective.
Try another way, by specifying the coder version directly in our drupalci.yml

jonathan1055’s picture

StatusFileSize
new1.33 KB

That did not make any difference. Try modifying composer.json

Status: Needs review » Needs work

The last submitted patch, 5: 3055414-5.coder833_in_drupalci.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jonathan1055’s picture

Status: Needs work » Needs review
StatusFileSize
new1.36 KB

yes, that same old problem. But at least PHPCS worked this time.

  • jonathan1055 committed eeabe37 on 8.x-1.x
    Issue #3055414 by jonathan1055: Use Coder 8.3.3 in travis build at core...
jonathan1055’s picture

The travis tests now pass at core 8.8
https://travis-ci.org/jonathan1055/scheduler/builds/534136964

The patch https://www.drupal.org/files/issues/2019-04-22/3049433-8.patch is applied to core composer.json and composer.lock after cloning drupal but before running composer self-update and install.

jonathan1055’s picture

StatusFileSize
new935 bytes

Patch without changes to drupalci.yml just composer. Checking syntax ">=8.3.3"

jonathan1055’s picture

That's good, all as expected. The initial version loaded is:

Installing drupal/coder (8.3.2): Cloning 44c80c2107

But after the patch is applied we get:

- Updating drupal/coder (8.3.2 => 8.3.3):  Checking out a33d3388fb

  • jonathan1055 committed 0da3cdb on 8.x-1.x
    Issue #3055414 by jonathan1055: Use coder 8.3.3 in d.o. testing via...
jonathan1055’s picture

StatusFileSize
new512 bytes

Committed before the re-test had run, so patch failed to apply, but all OK.

jonathan1055’s picture

Status: Needs review » Fixed

Good. We now have PHPCS running properly on our contrib patches at core 8.8.x in both drupal testing and travis build testing.

Status: Fixed » Closed (fixed)

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