Maprunner / rg2

Updated user interface for Routegadget
MIT License
36 stars 20 forks source link

Fix deprecated self:: $callable() pattern #538

Closed JamesErrington closed 6 months ago

JamesErrington commented 8 months ago

As of PHP 8.2, the "self::" callable convention is deprecated: https://php.watch/versions/8.2/partially-supported-callable-deprecation

From the article:

The easiest way to avoid this deprecation notice is to make use of ::class magic constant that resolves to the actual class name. This should work all PHP >= 5.3 versions.

I have not tested this change on versions other than 8.3.3, and I am not sure what versions of PHP rg2 officially supports, but the app is broken on >= 8.2 due to this issue.

I haven't changed the code in the dist/ folder - not sure if this needs to be done too?