Problem/Motivation

while using phpstan tool, many deprecation issues were found in following files:

  • service_container/lib/Drupal/Component/Plugin/LazyPluginCollection.php
  • service_container/modules/providers/service_container_annotation_discovery/lib/Doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php
  • service_container/modules/providers/service_container_annotation_discovery/lib/Doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php
  • service_container/modules/providers/service_container_annotation_discovery/lib/Doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php
  • service_container/modules/providers/service_container_annotation_discovery/lib/Doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php

The root cause of all issues is the same: Return type of method is not covariant with tentative return type of parent method.

Proposed resolution

Update return type to match the root method return type or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yurikulinkovich created an issue. See original summary.

yurikulinkovich’s picture

Status: Active » Needs review