You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the Timecop extension enabled, we'll get an error:
DT\ValueObjects\DateTimeMicro::__construct() calls parent constructor but parent does not have one.
We have now configured things to only enable Timecop when running unit tests and use a polyfill for the Timecop functions we are using for PHPStan. That is all working fine.
But it is all a bit of a kerfuffle which could probably be fixed within Timecop.
The text was updated successfully, but these errors were encountered:
phpstan/phpstan#842
We have just started using Timecop for controlling time in our unit tests. Works REALLY well.
We also run PHPStan against all our code, to make sure things are sane and that they obey our standards.
One of the things the PHPStan is picking up on is a lack of a constructor in Timecop's DateTimeImmutable.
I've linked the PHPStan issue above, but the here is a snippet of the code and the error that PHPStan is generating.
With the Timecop extension enabled, we'll get an error:
DT\ValueObjects\DateTimeMicro::__construct() calls parent constructor but parent does not have one.
We have now configured things to only enable Timecop when running unit tests and use a polyfill for the Timecop functions we are using for PHPStan. That is all working fine.
But it is all a bit of a kerfuffle which could probably be fixed within Timecop.
The text was updated successfully, but these errors were encountered: