psr7-sessions / storageless-mezzio-integration

MIT License
8 stars 4 forks source link

Composer package updates for php8 #38

Closed marcguyer closed 3 years ago

Ocramius commented 3 years ago

Could we add a composer.lock, to avoid issues with psalm/phpcs upgrades?

marcguyer commented 3 years ago

We now have composer lock file and mutually compatible psr/log version. I'm entirely new to psalm so I could use some help with these errors.

Ocramius commented 3 years ago

I think all getMockBuilder() errors are fixed by using getMock() directly 👍

marcguyer commented 3 years ago

Assuming you mean, e.g., changing ...

$session = $this->getMockBuilder(SessionInterface::class)->getMock();

... to this ...

$session = $this->createMock(SessionInterface::class);

... should fix this error ...

Error: Method PSR7Sessions\Storageless\Session\SessionInterface::expects does not exist

I tried that but found no change to Psalm errors. Psalm is complaining as if $session is a concrete implementation of SessionInterface rather than an instance of MockObject. Right?

Ocramius commented 3 years ago

@marcguyer I've pushed e92579a to your fork, which contains the fixes needed to get psalm happy :-)