assert icon indicating copy to clipboard operation
assert copied to clipboard

PHP 8.2 compatibility

Open andypost opened this issue 3 years ago • 1 comments

Upcoming release https://wiki.php.net/todo/php82 already started to publish releases

There's few incompatibilities detected so let's collect them under this issue

On July 21 first beta will be published but some changes already could be caught

  • https://php.watch/versions/8.2/$%7Bvar%7D-string-interpolation-deprecated
  • https://php.watch/versions/8.2/partially-supported-callable-deprecation
  • https://php.watch/versions/8.2/dynamic-properties-deprecated

andypost avatar Jun 22 '22 16:06 andypost

Fixed via https://github.com/webmozarts/assert/pull/260

PHP Deprecated:  Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973

Deprecated: Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973
PHP Deprecated:  Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973

Deprecated: Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973
PHP Deprecated:  Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973

Deprecated: Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973
PHP Deprecated:  Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973

Deprecated: Use of "static" in callables is deprecated in /var/www/html/web/vendor/webmozart/assert/src/Assert.php on line 1973

andypost avatar Jun 22 '22 16:06 andypost

PHP 8.2.0RC2 is out and I don't expect any other breaking changes - https://wiki.php.net/todo/php82

When I run unit tests in php 8.2 on the latest commit including #260 , tests pass.

I'm still waiting for a release to be created including that commit, though - until then I've been suppressing the notices from this library in a custom error handler

TysonAndre avatar Sep 24 '22 22:09 TysonAndre

@TysonAndre Are you sure you are on version 1.11.0? #260 is included in that

BackEndTea avatar Sep 25 '22 11:09 BackEndTea

Never mind, I just got confused by a few things - webmozart/assert is working in 8.2 for me

  • I was rebasing old branches of a project and used an outdated composer.lock and workaround
  • https://github.com/webmozarts/assert/blob/master/CHANGELOG.md#1110 didn't mention anything about php 8.2 compatibility. I initially misread the date of the changes
  • This issue was still open

TysonAndre avatar Sep 25 '22 11:09 TysonAndre

Great, i'm gonna close this issue then.

BackEndTea avatar Sep 25 '22 12:09 BackEndTea