Skip to content

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

Open
@follestad

Description

@follestad

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.

Activity

andrewdalpino

andrewdalpino commented on Jan 6, 2023

@andrewdalpino
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

tyteen4a03 commented on Feb 20, 2023

@tyteen4a03

Hiya, any updates to this?

ThomasEnssner

ThomasEnssner commented on Mar 6, 2023

@ThomasEnssner

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

andrewdalpino commented on Mar 12, 2023

@andrewdalpino
Member

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

myfluxi

myfluxi commented on Apr 8, 2023

@myfluxi

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

marclaporte commented on May 18, 2023

@marclaporte
Member

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

andrewdalpino

andrewdalpino commented on May 27, 2023

@andrewdalpino
Member

Has this been resolved now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tyteen4a03@marclaporte@myfluxi@ThomasEnssner@andrewdalpino

        Issue actions

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