Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psalm Errors After Upgrade to 5.8 from 4.1 #105

Open
RayHughes opened this issue Nov 28, 2024 · 1 comment
Open

Psalm Errors After Upgrade to 5.8 from 4.1 #105

RayHughes opened this issue Nov 28, 2024 · 1 comment

Comments

@RayHughes
Copy link

RayHughes commented Nov 28, 2024

MethodSignatureMismatch

Argument 1 of ServiceProvider\CacheServiceProvider::register has wrong type 'Phalcon\Di\DiInterface', expecting 'mixed' as defined by Phalcon\Di\ServiceProviderInterface::register (see https://psalm.dev/042)
    public function register(DiInterface $di): void
Http\Request::getClientAddress has wrong type 'bool', expecting 'mixed' as defined by Phalcon\Http\RequestInterface::getClientAddress

PossiblyInvalidMethodCall

Cannot call method on possible array<array-key, Phalcon\Model> variable  (see https://psalm.dev/113)
        ])->filter(fn ($item) => $item);

InvalidClassCasing

Class, interface or enum Phalcon\Mvc\Model\Metadata\Memory has wrong casing (see https://psalm.dev/007)
                return new Memory();
@RayHughes RayHughes changed the title expecting type mixed for service provider registration Psalm Errors After Upgrade to 5.8 from 4.1 Nov 28, 2024
@s-ohnishi
Copy link

Is the following message you showed coming from Psalm?

Argument 1 of ServiceProvider\CacheServiceProvider::register has wrong type 'Phalcon\Di\DiInterface', expecting 'mixed' as defined by Phalcon\Di\ServiceProviderInterface::register (see https://psalm.dev/042)
    public function register(DiInterface $di): void

If so, I think you should suspect Psalm.
Currently (v5.8) ide-stubs is

public function register(DiInterface $di): void;

and not mixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants