- Issue created by @m.stenta
- πΊπΈUnited States m.stenta
Level 2 errors:
------ --------------------------------------------------------------- Line src/Controller/LogAutocompleteController.php ------ --------------------------------------------------------------- 62 Call to an undefined method Drupal\Core\Entity\EntityStorageInterface::getTableMapping(). ------ --------------------------------------------------------------- ------ ---------------------------------------------------------- Line src/Entity/LogType.php ------ ---------------------------------------------------------- 131 Call to an undefined method Drupal\Core\Entity\EntityStorageInterface::updateType(). ------ ---------------------------------------------------------- ------ ------------------------------------------------------- Line src/Form/LogCloneActionForm.php ------ ------------------------------------------------------- 100 Variable $new_date in PHPDoc tag @var does not exist. ------ ------------------------------------------------------- ------ --------------------------------------------------- Line src/Form/LogForm.php ------ --------------------------------------------------- 111 Call to an undefined method Drupal\Core\Field\FieldItemInterface::getLabel(). ------ --------------------------------------------------- ------ -------------------------------------------------------------- Line src/Form/LogRescheduleActionForm.php ------ -------------------------------------------------------------- 148 Call to an undefined method Drupal\Core\Field\FieldItemInterface::isTransitionAllowed(). 149 Call to an undefined method Drupal\Core\Field\FieldItemInterface::applyTransitionById(). 161 Call to an undefined method Drupal\Core\Field\FieldItemInterface::isTransitionAllowed(). 162 Call to an undefined method Drupal\Core\Field\FieldItemInterface::applyTransitionById(). ------ -------------------------------------------------------------- ------ ---------------------------------------------------------------- Line src/Form/LogTypeForm.php ------ ---------------------------------------------------------------- 83 Call to an undefined method Drupal\Core\Entity\EntityInterface::getDescription(). 90 Call to an undefined method Drupal\Core\Entity\EntityInterface::getNamePattern(). 103 Call to an undefined method Drupal\Core\Entity\EntityInterface::getWorkflowId(). 110 Call to an undefined method Drupal\Core\Entity\EntityInterface::shouldCreateNewRevision(). ------ ---------------------------------------------------------------- ------ ----------------------------------------------------------- Line src/LogStorage.php ------ ----------------------------------------------------------- 143 Call to an undefined method Drupal\Core\Entity\EntityInterface::getTypeNamePattern(). ------ ----------------------------------------------------------- ------ ---------------------------------------------------------------- Line src/Plugin/views/field/LogField.php ------ ---------------------------------------------------------------- 30 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addOrderBy(). 31 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addOrderBy(). ------ ---------------------------------------------------------------- ------ ---------------------------------------------------------------- Line src/Plugin/views/sort/LogStandardSort.php ------ ---------------------------------------------------------------- 23 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addOrderBy(). 24 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addOrderBy(). 48 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addOrderBy(). 49 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addOrderBy(). ------ ---------------------------------------------------------------- ------ --------------------------------------------------------------------- Line tests/src/Functional/LogActionsTest.php ------ --------------------------------------------------------------------- 34 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 55 Call to method loadMultiple() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 83 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 106 Call to method loadMultiple() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 128 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 149 Call to method loadMultiple() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 172 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 195 Call to method loadMultiple() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 217 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 247 Call to method loadMultiple() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 275 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 298 Call to method loadMultiple() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols ------ --------------------------------------------------------------------- ------ --------------------------------------------------------------------- Line tests/src/Functional/LogCRUDTest.php ------ --------------------------------------------------------------------- 46 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 52 Call to method load() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 110 Call to method load() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols ------ --------------------------------------------------------------------- ------ --------------------------------------------------------------------- Line tests/src/Functional/LogNamePatternTest.php ------ --------------------------------------------------------------------- 26 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 32 Call to method load() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 52 Call to method getQuery() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 58 Call to method load() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols ------ --------------------------------------------------------------------- ------ --------------------------------------------------------------------- Line tests/src/Functional/LogTestBase.php ------ --------------------------------------------------------------------- 25 Property Drupal\Tests\log\Functional\LogTestBase::$storage has unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface as its type. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols 91 Call to method create() on an unknown class Drupal\group\Entity\Storage\GroupRoleStorageInterface. π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols ------ --------------------------------------------------------------------- ------ ---------------------------------------------------------------------- Line tests/src/Kernel/LogActionsTest.php ------ ---------------------------------------------------------------------- 77 Method Drupal\Core\Executable\ExecutableInterface::execute() invoked with 1 parameter, 0 required. 80 Call to an undefined method Drupal\Core\Entity\EntityInterface::get(). 94 Method Drupal\Core\Executable\ExecutableInterface::execute() invoked with 1 parameter, 0 required. 97 Call to an undefined method Drupal\Core\Entity\EntityInterface::get(). ------ ---------------------------------------------------------------------- [ERROR] Found 44 errors
- πΊπΈUnited States m.stenta
I fixed all the level 2 errors.
Level 3 only adds 3 more errors, so let's fix those as well:
------ --------------------------------------------------------------------------------------------------------------------------------------- Line web/modules/log/src/Form/LogActionFormBase.php ------ --------------------------------------------------------------------------------------------------------------------------------------- 94 Method Drupal\log\Form\LogActionFormBase::getDescription() should return Drupal\Core\StringTranslation\TranslatableMarkup but returns string. ------ --------------------------------------------------------------------------------------------------------------------------------------- ------ ------------------------------------------------------------------------------------------------------------------------------------ Line web/modules/log/tests/src/Functional/LogTestBase.php ------ ------------------------------------------------------------------------------------------------------------------------------------ 32 PHPDoc type array of property Drupal\Tests\log\Functional\LogTestBase::$modules is not covariant with PHPDoc type array<string> of overridden property Drupal\Tests\BrowserTestBase::$modules. π‘ You can fix 3rd party PHPDoc types with stub files: π‘ https://phpstan.org/user-guide/stub-files 96 Method Drupal\Tests\log\Functional\LogTestBase::createLogEntity() should return Drupal\log\Entity\LogInterface but returns Drupal\Core\Entity\EntityInterface. ------ ------------------------------------------------------------------------------------------------------------------------------------
- πΊπΈUnited States m.stenta
I fixed all the level 2 errors.
Level 4 doesn't cause any errors, and level 5 only adds 5 more, so I'll try to fix those as well.
------ --------------------------------------------------------------------------------------------------------- Line web/modules/log/src/Form/LogActionFormBase.php ------ --------------------------------------------------------------------------------------------------------- 69 Parameter #1 $key of method Drupal\Core\TempStore\PrivateTempStore::get() expects string, int given. 124 Parameter #1 $key of method Drupal\Core\TempStore\PrivateTempStore::delete() expects string, int given. ------ --------------------------------------------------------------------------------------------------------- ------ ------------------------------------------------------------------------------------------------------ Line web/modules/log/src/Plugin/Action/LogActionBase.php ------ ------------------------------------------------------------------------------------------------------ 70 Parameter #1 $key of method Drupal\Core\TempStore\PrivateTempStore::set() expects string, int given. ------ ------------------------------------------------------------------------------------------------------ ------ ------------------------------------------------------------------------------------------------------------------ Line web/modules/log/tests/src/Functional/LogActionsTest.php ------ ------------------------------------------------------------------------------------------------------------------ 304 Parameter #1 $callback of function array_map expects (callable(Drupal\Core\Entity\EntityInterface): mixed)|null, Closure(Drupal\log\Entity\LogInterface): mixed given. ------ ------------------------------------------------------------------------------------------------------------------ ------ -------------------------------------------------------------------------------------------------- Line web/modules/log/tests/src/Functional/LogCRUDTest.php ------ -------------------------------------------------------------------------------------------------- 21 Parameter #1 $code of method Behat\Mink\WebAssert::statusCodeEquals() expects int, string given. ------ -------------------------------------------------------------------------------------------------- [ERROR] Found 5 errors
-
m.stenta β
committed 2bbb45e9 on 3.x
Issue #3527089: Increase PHPStan analysis to level 5
-
m.stenta β
committed 2bbb45e9 on 3.x