Skip to content

@not-depracted is not taken into account #939

@mibocs

Description

@mibocs

Bug report

Mglaman, can you pls take a look at this issue here: phpstan/phpstan-deprecation-rules#180?

First i thought that issue was with the "phpstan-deprecation-rules", but it turned out this is not the issue but somehow the "vendor/mglaman/phpstan-drupal/extension.neon" causes this issues if i include it.

My phpstan config is the following now:

includes:
  - vendor/mglaman/phpstan-drupal/extension.neon
  - vendor/phpstan/phpstan-deprecation-rules/rules.neon
parameters:
  level: '1'
  paths:
    - lib
  excludePaths:
    - vendor
    - lib/themes/dta_theme/node_modules/*
  ignoreErrors:
    - '#^Unsafe usage of new static#'
  parallel:
    processTimeout: 900.0

If i remove "vendor/mglaman/phpstan-drupal/extension.neon" everything is alright and there is no "Call to deprecated method loadRevision()" error.

I have tested this with the latest version of phpstan, phpstan-deprecation-rules and phpstan-drupal.

The issue is somewhere here: /vendor/phpstan/phpstan/phpstan.phar/src/Rules/RestrictedUsage/RestrictedMethodUsageRule.php:53

Image Image

without the "vendor/mglaman/phpstan-drupal/extension.neon" the method for loadRevision is the following:

Image

I haven't dug deeper because i thought maybe you could answer this more easily.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions