Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change deprecated way of string interpolation #1609

Merged

Conversation

nelarsen
Copy link
Contributor

@nelarsen nelarsen commented Jul 1, 2024

Mit Bezug auf #1605 ist das Ziel dieser PR, u.g. Warningen unter WP latest PHP 8.2. loszuwerden. Statt ${var} habe ich mit der PR vorgeschlagen, einfach $var zu schreiben in Strings mit doppelten Anführungszeichen. Man könnte auch die moderne Variante {$var} nutzen, aber die ist nicht einfacher zu lesen.

PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 26
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 28
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 29
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 30
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 37
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 43
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 53
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 55
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/runner/work/commonsbooking/commonsbooking/src/Map/SearchShortcode.php on line 56

"${var}" is deprecated with php 8.2. Future options are "{$var}" or the good old "$var". With simple variables, the good old variant is easier to read IMHO.
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 49.79%. Comparing base (076ae51) to head (0486e8c).
Report is 2 commits behind head on master.

Files Patch % Lines
src/Map/SearchShortcode.php 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1609   +/-   ##
=========================================
  Coverage     49.79%   49.79%           
  Complexity     2682     2682           
=========================================
  Files            97       97           
  Lines         10712    10712           
=========================================
  Hits           5334     5334           
  Misses         5378     5378           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hansmorb hansmorb merged commit 551c0f5 into wielebenwir:master Jul 2, 2024
14 checks passed
@hansmorb hansmorb added php Pull requests that update Php code dx Developer Experience (technical) labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer Experience (technical) php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants