Geocoder icon indicating copy to clipboard operation
Geocoder copied to clipboard

tests: fix deprecation from PHPUnit

Open Chris53897 opened this issue 11 months ago • 3 comments

There was 1 warning:

1) Geocoder\Provider\GeoIP2\Tests\GeoIP2AdapterTest::testReaderResponseIsJsonEncoded
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() instead.

Chris53897 avatar Mar 02 '24 09:03 Chris53897

That breaks all "(low)" checks. I would wait until we upgrade to PHPUnit 10 before making that change.

jbelien avatar Mar 02 '24 11:03 jbelien

This is maybe solved by https://github.com/geocoder-php/Geocoder/pull/1218 with Raising minimum PHPUnit version to 9.6 (or 9.6.x)

Chris53897 avatar Mar 02 '24 11:03 Chris53897

Bumping the minium PHPUnit version, solved this problem. But of course this is up to you, to wait until PHPUnit 10+.

Chris53897 avatar Mar 02 '24 11:03 Chris53897