Verified Commit e0ce28fa authored by Dave Long's avatar Dave Long
Browse files

Issue #3301205 by Spokje, mondrake, Gábor Hojtsy, quietone, catch, xjm:...

Issue #3301205 by Spokje, mondrake, Gábor Hojtsy, quietone, catch, xjm: Replace the test class protected $modules deprecation error with a phpstan-drupal rule

(cherry picked from commit 9d64e97e)
parent a2b3ceec
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
        "drupal/coder": "^8.3.10",
        "instaclick/php-webdriver": "^1.4.1",
        "justinrainbow/json-schema": "^5.2",
        "mglaman/phpstan-drupal": "^1.2",
        "mglaman/phpstan-drupal": "^1.2.1",
        "micheh/phpcs-gitlab": "^1.1",
        "mikey179/vfsstream": "^1.6.11",
        "open-telemetry/exporter-otlp": "^1",
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
        "This file is @generated automatically"
    ],
    "content-hash": "6de6a531a498d73d06d78800399c841f",
    "content-hash": "a13d08162bfae1cd2d3e808e6765474a",
    "packages": [
        {
            "name": "asm89/stack-cors",
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
        "drupal/coder": "^8.3.10",
        "instaclick/php-webdriver": "^1.4.1",
        "justinrainbow/json-schema": "^5.2",
        "mglaman/phpstan-drupal": "^1.2",
        "mglaman/phpstan-drupal": "^1.2.1",
        "micheh/phpcs-gitlab": "^1.1",
        "mikey179/vfsstream": "^1.6.11",
        "open-telemetry/exporter-otlp": "^1",
+0 −5
Original line number Diff line number Diff line
@@ -51,11 +51,6 @@ public function addSkippedTest(Test $test, \Throwable $t, float $time): void {
   */
  public function startTest(Test $test): void {
    $this->symfonyListener->startTest($test);
    // Check for incorrect visibility of the $modules property.
    $class = new \ReflectionClass($test);
    if ($class->hasProperty('modules') && !$class->getProperty('modules')->isProtected()) {
      @trigger_error('Declaring ' . get_class($test) . '::$modules with public visibility is deprecated in drupal:9.1.0 and must be declared protected in drupal:10.0.0. See https://www.drupal.org/node/2909426', E_USER_DEPRECATED);
    }
  }

  /**