Fix PluginManagerBase PHPStan-0 issues

Created on 24 October 2022, almost 2 years ago
Updated 12 July 2023, about 1 year ago

Problem/Motivation

PHPStan baseline is currently skipping multiple Call to an undefined method errors, #3291519: [Meta] Fix 'Call to an undefined method' PHPStan L0 errors .

Proposed resolution

Fix the errors in PluginManagerBase, clean up the baseline.

🐛 Bug report
Status

Fixed

Version

10.0

Component
Base 

Last updated about 1 hour ago

Created by

🇮🇹Italy mondrake 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France andypost
    +++ b/core/lib/Drupal/Component/Plugin/PluginManagerBase.php
    @@ -94,12 +94,40 @@ public function createInstance($plugin_id, array $configuration = []) {
    +    throw new \BadMethodCallException(get_class() . '::getFallbackPluginId() not implemented.');
    

    get_class() without arguments is deprecated in PHP 8.3, self::class should be used instead

    Follow-up 🐛 Fix deprecated overloaded function usage in PHP 8.3 Fixed

Production build 0.71.5 2024