Problem/Motivation
When using bundle classes, if creating an object with MyCustomLibary::createFromParagraph, type returned will be the interface, instead of the the called class.
Steps to reproduce
w PHPStan
$entity = MyCustomLibary::createFromParagraph();
\PHPStan\dumpType($libraryItem);
Outputs:
phpstan: Dumped type: Drupal\paragraphs_library\LibraryItemInterface
With changes, output is:
phpstan: Dumped type: Drupal\mymodule\MyCustomLibary
Issue fork paragraphs-3345127
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
Comment #3
dpiComment #4
acbramley commentedThanks @dpi!
Comment #7
berdirMerged.