phpstan-laminas-framework icon indicating copy to clipboard operation
phpstan-laminas-framework copied to clipboard

Helpers are not loaded

Open juizmill opened this issue 2 years ago • 3 comments

I don't know why but it's not loading some helpers.

Is there something I should configure?

image

.neon

image

service-manager.php

image

juizmill avatar Jan 24 '23 19:01 juizmill

I can't tell without the access on the whole project, and I don't want it.

Run PHPStan in debug mode with no parallel processing and try to figure it out. If you find any big in this repo, any PR is welcome.

Slamdunk avatar Jan 25 '23 06:01 Slamdunk

I noticed that it is correctly loading the helpers of Laminas but the ones I did are not being loaded for phpstan

I'm following the Laminas documentation https://docs.laminas.dev/laminas-view/helpers/advanced-usage/

Does anyone have any tips?

juizmill avatar Apr 02 '23 09:04 juizmill

I had a similar problem.

I had code that had something like this in the config (which works fine in production):

[
    'factories' => [
        'SchemeInputManager' => SchemeInputManagerFactory::class,
    ],
];

Using the class string in factories, and adding the previous string to aliases fixed it.

[
    'aliases' => [
        'SchemeInputManager' => SchemeInputManager::class,
    ],
    'factories' => [
        SchemeInputManager::class => SchemeInputManagerFactory::class,
    ],
];

earthiverse avatar Jan 16 '24 00:01 earthiverse