nextras / orm-phpstan

PHPStan extension for Nextras Orm
https://nextras.org/orm
MIT License
11 stars 6 forks source link

phpstan cries with Nextras ORM 4 #22

Closed milsorm closed 3 years ago

milsorm commented 3 years ago
     Child process error (exit code 255): PHP Fatal error:  Class Nextras\Orm\Mapper\Dbal\DbalCollection contains 2 abstract methods
     and must therefore be declared abstract or implement the remaining methods (Nextras\Orm\Collection\ICollection::getByChecked,
     Nextras\Orm\Collection\ICollection::getByIdChecked) in
     vendor/nextras/orm/src/Mapper/Dbal/DbalCollection.php on line 23
     Fatal error: Class Nextras\Orm\Mapper\Dbal\DbalCollection contains 2 abstract methods and must therefore be declared abstract or
     implement the remaining methods (Nextras\Orm\Collection\ICollection::getByChecked,
     Nextras\Orm\Collection\ICollection::getByIdChecked) in
     vendor/nextras/orm/src/Mapper/Dbal/DbalCollection.php on line 23
hrach commented 3 years ago

It seems to be some cache issue of PhpStan after upgrade. 🤔 See DbalCollection - it does not contain abstract methods now. https://github.com/nextras/orm/blob/v4.0.1/src/Collection/DbalCollection.php

milsorm commented 3 years ago

Probably old version of DbalCollection because I have not getByChecked implementation there. I have to check how it is upgraded by composer.

milsorm commented 3 years ago

Hmm, complaints are against Nextras\Orm\Mapper\Dbal\DbalCollection which differs from Nextras\Orm\Collection\DbalCollection :-(

milsorm commented 3 years ago

OK, completely removed, refreshed from github and everything is OK now. Sorry for bothering.

hrach commented 3 years ago

👍 Good :)