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

merge-requests/7/head
catch 2020-09-01 21:17:37 +01:00
parent 1c7065df88
commit cb0ad5b16b
1 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,10 @@ class DrupalListener implements TestListener {
}
}
}
// 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);
}
}
/**