Problem/Motivation

Super-minor bugfix, see MR.

[{
	"resource": "/var/www/html/web/modules/custom/asset_injector/asset_injector.module",
	"owner": "_generated_diagnostic_collection_name_#1",
	"code": "1013",
	"severity": 8,
	"message": "Undefined method 'libraryNameSuffix'.",
	"source": "intelephense",
	"startLineNumber": 124,
	"startColumn": 74,
	"endLineNumber": 124,
	"endColumn": 91
}]
/** @var \Drupal\Core\Asset\AttachedAssetsInterface $asset */
  foreach (asset_injector_get_assets(TRUE) as $asset) {
    $attachments['#attached']['library'][] = 'asset_injector/' . $asset->libraryNameSuffix();
    $renderer->addCacheableDependency($attachments, $asset);
  }

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

Anybody created an issue. See original summary.

anybody’s picture

Status: Active » Needs review
grevil’s picture

Status: Needs review » Reviewed & tested by the community

LGTM!

anybody’s picture

Priority: Minor » Normal
anybody’s picture

Title: Undefined method 'libraryNameSuffix' (intelephense) » PHPDoc: Undefined method 'libraryNameSuffix' (intelephense)
geek-merlin’s picture

Ah yes, wrong typehint.

geek-merlin’s picture

  • a5446e4 committed on 8.x-2.x
    Issue #3323361 by Anybody, geek-merlin, Grevil: PHPDoc: Undefined method...
geek-merlin’s picture

Status: Reviewed & tested by the community » Fixed

Thanks a lot!

Status: Fixed » Closed (fixed)

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