Commit cb0ad5b1 authored by catch's avatar catch
Browse files

Issue #3165588 by longwave, mondrake: Add a check to ensure $modules property is always protected

parent 1c7065df
......@@ -96,6 +96,10 @@ public function startTest(Test $test): void {
}
}
}
// Check for incorrect visibility of the $modules property.
if ($class->hasProperty('modules') && !$class->getProperty('modules')->isProtected()) {
@trigger_error('The ' . get_class($test) . '::$modules property must be declared protected. See https://www.drupal.org/node/2909426', E_USER_DEPRECATED);
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment