- 🇺🇸United States bluegeek9
Hi @jaydee1818,
The $module property should be private. This is one of the changes between Drupal 8 and Drupal 9.
When preparing for D9 upgrade, using the Upgrade Status module, I am running into this:
PHPStan command failed:
/usr/bin/php7.4/var/www/html/vendor/bin/phpstan analyse --memory-limit=-1 --error-format=json --configuration=/tmp/upgrade_status/deprecation_testing.neon /var/www/html/web/modules/contrib/authorization
Command output: Empty.
Command error:
0/31 [‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë] 0% [2K
4/31 [‚ñì‚ñì‚ñì‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë] 12% [2K
5/31 [‚ñì‚ñì‚ñì‚ñì‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë‚ñë] 16%
PHP Fatal error: Access level to Drupal\Tests\authorization_drupal_roles\Kernel\DrupalRolesIntegrationTest::$modules must be public (as in class Drupal\KernelTests\Core\Entity\EntityKernelTestBase) in /var/www/html/web/modules/contrib/authorization/authorization_drupal_roles/tests/src/Kernel/DrupalRolesIntegrationTest.php on line 18
Fatal error: Access level to Drupal\Tests\authorization_drupal_roles\Kernel\DrupalRolesIntegrationTest::$modules must be public (as in class Drupal\KernelTests\Core\Entity\EntityKernelTestBase) in /var/www/html/web/modules/contrib/authorization/authorization_drupal_roles/tests/src/Kernel/DrupalRolesIntegrationTest.php on line 18
After dealing with this, the error is repeated for the ControllerTest class.
Install Upgrade Status module.
Run `drush us-a authorization`
Change the $modules array declaration from `protected` to `public` in the DrupalRolesIntegrationTest and ControllerTest classes.
Closed: works as designed
Documentation
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Hi @jaydee1818,
The $module property should be private. This is one of the changes between Drupal 8 and Drupal 9.