Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296414

PHPStan not detecting use of ProphecyTrait

$
0
0

Problem/Motivation

After upgrading phpunit to 9.5.26 on a client project, phpstan is reporting the following deprecation:

Call to deprecated method prophesize() of class PHPUnit\Framework\TestCase: https://github.com/sebastianbergmann/phpunit/issues/4141

This issue is for determining if core is also affected.

FWIW without the trait PhpStorm detects the call to prophesize as deprecated. With the trait this warning goes way, but phpstan still complains about it. As a workaround I can alias the prophesize method in my use statement and this allows phpstan to pass.

Steps to reproduce

Upgrade to phpunit 9.5.26, run phpstan. Note I can only replicate when also using mglaman/phpstan-drupal.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 296414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>