phpunit-snapshots icon indicating copy to clipboard operation
phpunit-snapshots copied to clipboard

Null check before using get_class()

Open romain-jacquart opened this issue 6 years ago • 3 comments

As of PHP 7.2, get_class() parameter can not be null.

This PR adds a simple null check before using get_class().

romain-jacquart avatar Jun 28 '19 09:06 romain-jacquart

Hello @Anahkiasen this small fix makes your library compatible with PHP 7.2.

GromNaN avatar Jun 28 '19 16:06 GromNaN

I'm sorry, the package is abandoned in favor of Spatie's. We indicated it on Packagist but not in the repository yet, we'll update the README to reflect this.

Anahkiasen avatar Jun 29 '19 11:06 Anahkiasen

This is totally fine to want to stop maintaining a package and thank you for pointing to an alternative, unfortunately it is not compatible with PHP 5.6. We are upgrading a project from PHP 5.6 to 7.2. We makes an heavy usage of your snapshot library and we have to keep these tests to validate the upgrade. Our code must be compatible with both PHP versions during several weeks. We will eventually switch to spatie/phpunit-snapshot-assertions later.

GromNaN avatar Jun 29 '19 13:06 GromNaN