Problem/Motivation

PHPStan baseline is currently skipping multiple Call to an undefined method errors, #3291519: Fix remaining method.notFound PHPStan L0 errors.

Proposed resolution

Fix the errors in PluginManagerBase, clean up the baseline.

CommentFileSizeAuthor
#2 3317243-2.patch2.45 KBmondrake

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
StatusFileSize
new2.45 KB
daffie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

catch’s picture

Version: 10.1.x-dev » 10.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!

Added to the related issues on #3317210: Figure out a way to add methods to abstract classes.

  • catch committed dcc5f94 on 10.0.x
    Issue #3317243 by mondrake: Fix PluginManagerBase PHPStan-0 issues
    
    (...
  • catch committed c2a6c76 on 10.1.x
    Issue #3317243 by mondrake: Fix PluginManagerBase PHPStan-0 issues
    
catch’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

andypost’s picture

+++ 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 #3374223: Fix deprecated overloaded function usage in PHP 8.3