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

Not working in PHP 8.2 because of voku/portable-utf8/src/voku/helper/UTF8.php #272

Open
follestad opened this issue Jan 4, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@follestad
Copy link

I get the following error when using this Rubix ML with PHP 8.2:

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 4653

.wamania/php-stemmer v2.2.0 requires voku/portable-utf8 (^5.4).

I wasn't able to include a newer version of voku/portable-utf8, because it wouldn't match the requirements for Rubix ML / php-stemmer.

@andrewdalpino
Copy link
Member

Hey thanks for the heads up @follestad ... definitely something we'll look into further!

If you want to hack it for now, you could remove the wamania/php-stemmer dependency and delete the WordStemmer tokenizer. We only use this library for one thing and it's the Word Stemmer tokenizer.

https://github.com/RubixML/ML/blob/master/src/Tokenizers/WordStemmer.php#L6

@tyteen4a03
Copy link

Hiya, any updates to this?

@ThomasEnssner
Copy link

I have a fork for that Package....
https://github.com/ThomasEnssner/portable-utf8/releases/tag/5.5.0

Change your Dependency to "voku/portable-utf8": "5.x-dev"
and add this to your composer.json file

"repositories": [
    {
      "type": "github",
      "url": "https://github.com/ThomasEnssner/portable-utf8"
    }
]

@andrewdalpino
Copy link
Member

2.3.2 will use a new version 3 of PHP Stemmer, hopefully that fixes your issue

@myfluxi
Copy link

myfluxi commented Apr 8, 2023

Just as a heads-up: If you do not want to fork repos because of trivial issues (such as this one here), https://github.com/symplify/vendor-patches comes in very handy.

@marclaporte
Copy link
Member

PHP 8.2 support for wamania/php-stemmer:
wamania/php-stemmer#26

@andrewdalpino andrewdalpino added the bug Something isn't working label May 27, 2023
@andrewdalpino
Copy link
Member

Has this been resolved now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants