ViewUserAction.php uses the syntax ${userId} to interpolate a variable in a string when sending an info message to the logger. This has been deprecated in PHP 8.2 and will therefore lead to a deprecation notice on PHP 8.2 systems.
Steps to reproduce
Using PHP 8.2, call the one of the following routes:
/users/1
/users/2
/users/3
/users/4
/users/5
Output (with Xdebug installed):
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/Slim-Skeleton/src/Application/Actions/User/ViewUserAction.php on line 19
Solution
Change ${userId} to {$userId}. This will also work in PHP versions < 8.2.
ViewUserAction.php
uses the syntax${userId}
to interpolate a variable in a string when sending an info message to the logger. This has been deprecated in PHP 8.2 and will therefore lead to a deprecation notice on PHP 8.2 systems.Steps to reproduce
Using PHP 8.2, call the one of the following routes:
Output (with Xdebug installed):
Solution
Change
${userId}
to{$userId}
. This will also work in PHP versions < 8.2.I will open a PR with the change.