Enforce $modules property as protected in test-classes

Created on 9 June 2020, about 4 years ago
Updated 24 May 2024, 4 months ago

Problem/Motivation

#2822382: Make every $modules property protected on classes extending BrowserTestBase and KernelTestBase Set all $modules properties as protected.
#2983395: user module's flood controls should do better logging Inadvertently reverted this by adding new test-classes.

Proposed resolution

Investigate adding a way of detecting that a new test has overridden this property and set the wrong visibility.
This may end up being a phpcs rule.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Closed: outdated

Version

11.0 🔥

Component
PHPUnit 

Last updated about 11 hours ago

Created by

🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone New Zealand

    This is now covered by a PHPStan rule, TestClassesProtectedPropertyModulesRule, provided by phpstan-drupal.

Production build 0.71.5 2024