Skip to content

Replace deprecated string interpolation usage #90

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

Merged
merged 1 commit into from
Feb 12, 2023

Conversation

flavioheleno
Copy link

@flavioheleno flavioheleno commented Dec 9, 2022

This PR replaces the now deprecated (as of PHP 8.2) ${var} usage in string interpolation by {$var}.
Note that this change is backwards compatible with previous versions of PHP.

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/tests/HTML5DOMDocumentTest.php on line 67
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/tests/HTML5DOMDocumentTest.php on line 74
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/src/voku/helper/SimpleHtmlDom.php on line 508
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/src/voku/helper/SimpleHtmlDom.php on line 520
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/src/voku/helper/SimpleHtmlDom.php on line 555
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/src/voku/helper/SimpleXmlDom.php on line 458
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/src/voku/helper/SimpleXmlDom.php on line 470
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/src/app/src/voku/helper/SimpleXmlDom.php on line 505

Reference: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation


This change is Reviewable

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phpfui
Copy link

phpfui commented Dec 24, 2022

This PR looks good to me. Can we get a new release that will support PHP 8.2 without depreciations? Also see PR #93

Thanks!

@dyaskur
Copy link

dyaskur commented Jan 3, 2023

LGTM too, and I need this update too

@phpfui
Copy link

phpfui commented Jan 3, 2023

Check out PR #93 while you are at it. This is a more serious issue, as the library does not work on 8.2.

@dyaskur
Copy link

dyaskur commented Jan 3, 2023

Actually I dont know about #93 issue, I used 8.2 on production and it work as expected. Just have deprecated warning like on this PR.

But yeah, I hope that will be merged too. Maybe in the future I use the feature that has issue on 8.2.

Copy link

@phpfui phpfui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is good to merge for PHP 8.2 and does not affect older versions.

@voku
Copy link
Owner

voku commented Feb 12, 2023

Thanks, version 4.8.8 is released with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants