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

${var} string interpolation deprecated in php8.2 #191

Open
alexandreelise opened this issue Jan 7, 2023 · 6 comments
Open

${var} string interpolation deprecated in php8.2 #191

alexandreelise opened this issue Jan 7, 2023 · 6 comments

Comments

@alexandreelise
Copy link

alexandreelise commented Jan 7, 2023

What is this feature about (expected vs actual behaviour)?

its in the title

How can I reproduce it?

install voku/portable-utf8 version ^5.4 on php 8.2.x

Does it take minutes, hours or days to fix?

minutes it's in UTF8.php file

Any additional information?

I don't want to be a hassle, just trying to be helpful and report what might be useful to you.

Here are the logs with php 8.2.x:

PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 4653
PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 4664
PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 5731
PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 5742
PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 13398
PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 13409

https://php.watch/versions/8.2/$%7Bvar%7D-string-interpolation-deprecated
might help about what seem be to an issue.

This error came to my log file when using Joomla 4.2.6 which has voku/portable-utf8:^5.4 as composer dependency.
Placed in libraries/vendor/voku/portable-utf8 in this repo
https://github.com/joomla/joomla-cms.git

@laoneo
Copy link

laoneo commented Jan 12, 2023

It would require to backport #181 to version 5.

@mrunkel
Copy link

mrunkel commented Apr 13, 2023

I have a branch with this fixed, but I can't merge it back to the 5.4.51 tag.
@voku I'm not sure how you want to handle this, or if you just don't want to. :)

Unfortunately, this is a dependency of a dependency, so I am pretty powerless to just upgrade to the latest version.

@voku
Copy link
Owner

voku commented Apr 13, 2023

@mrunkel maybe you can push it as draft and I will merge the changes by hand, what do you think?

@mwllgr
Copy link

mwllgr commented Apr 20, 2023

Just for people stumbling upon this issue from Google or something...
This error also seems to appear in the latest version of Nextcloud (26.0.1) with the "recognize" plugin:

Using ${var} in strings is deprecated, use {$var} instead at /var/www/xxxxx/apps/recognize/vendor/voku/portable-utf8/src/voku/helper/UTF8.php#13409

@joelra
Copy link

joelra commented Jun 9, 2023

Curious if there's been any traction on this.

@mcsky
Copy link

mcsky commented Jun 26, 2023

For your information, your library is spamming deprecation log in my project because it is used by wamania/php-stemmer and we are using php 8.2.

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

No branches or pull requests

7 participants