Problem/Motivation
Since PHP 8.2, PHP emits a deprecation notice on the following pattern the dollar sign ($) is placed at the outside of the curly braces. It can be seen in couple of places:
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/web/modules/contrib/smart_ip/smart_ip.module on line 132.
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/web/modules/contrib/smart_ip/smart_ip.module on line 148
Steps to reproduce
1. Use a Drupal 10 project with PHP 8.2
1. Add drupal/smart_ip module via composer.
3. Observe warnings in the terminal when using Drush or via the web interface.
Proposed resolution
Use {$var} syntax instead of ${var} syntax to avoid deprecation notice.
Comments
Comment #2
mohd sahzad commentedComment #3
chetan 11 commentedHi @suraj_vantagode, I have installed this module with the above mentioned method.
I have made the changes in module file & attached the patch.
Please review & let me know if it's working fine.
Comment #4
masoom2206 commentedHello @suraj_vantagode, thanks for the patch it's working for me.
Comment #5
chetan 11 commentedComment #6
fraserthompsonI was experiencing this issue after upgrading to Drupal 10 and PHP 8.2 and the above patch fixed it.
Comment #7
poker10 commentedI think the patch is correct, so moving to RTBC. Thanks!
Comment #8
agoradesign commentedagree, please commit!
Comment #9
heddnI think this was fixed in #3462749: Drupal 11 support. Please re-open if I've closed this in error.