The interface was added and also removed during patching https://www.drupal.org/project/drupal/issues/2339151#comment-9342869 into core/modules/block/tests/src/Unit/BlockRepositoryTest.php.

CommentFileSizeAuthor
TestContextAwareBlockInterface.patch901 bytespeterkokot

Comments

peterkokot created an issue. See original summary.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

tgreathouse’s picture

Is there a reason the @file comment directive is being removed in the above patch?

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Version: 9.3.x-dev » 9.4.x-dev
spokje’s picture

Status: Active » Needs review

#3:

Is there a reason the @file comment directive is being removed in the above patch?

Yes, in this patch we remove the interface interface TestContextAwareBlockInterface which leaves this class with only one namespaced class, interface or trait.

According to the Drupal 8 coding standard guide:

The @file doc block MUST be present for all PHP files, with one exception: files that contain a namespaced class/interface/trait, whose file name is the class name with a .php extension, and whose file path is closely related to the namespace (under PSR-4 or a similar standard), SHOULD NOT have a @file documentation block.

https://www.drupal.org/coding-standards/docs#file

As we can see here, PHPCS throws an error when we leave the @file comment in: https://www.drupal.org/pift-ci-job/2246216

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Issue tags: +Bug Smash Initiative

Running against 9.5 branch but if that passes fine marking RTBC

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Looks like everything passed. Not sure this needs a new test case will let the committer decide.

  • catch committed aeda6d3 on 10.0.x
    Issue #3105880 by peterkokot, Spokje, smustgrave: Remove unused...
  • catch committed 33db9ff on 10.1.x
    Issue #3105880 by peterkokot, Spokje, smustgrave: Remove unused...
  • catch committed ecce290 on 9.5.x
    Issue #3105880 by peterkokot, Spokje, smustgrave: Remove unused...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Yep looks like this crept in as development cruft in 2014 and hasn't been touched since, let's just clean it up. Committed/pushed to 10.1.x, cherry-picked back through to 9.5.x, thanks!

Status: Fixed » Closed (fixed)

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