amaccis / php-stemmer

A PHP interface to the Snowball stemming algorithms
MIT License
12 stars 0 forks source link

PHP 8.3 compatibility #8

Open luigitec opened 6 months ago

luigitec commented 6 months ago

For some reason, locally on a mac I'm getting this error:

screenshot_2024-05-08_at_14 12 50

{
    "message": "unexpected character 'escape_char(ch)' at line 1",
    "exception": "FFI\\ParserException",
    "file": "/var/www/html/vendor/amaccis/php-stemmer/src/Adapter/Libstemmer.php",
    "line": 56,
    "trace": [
        {
            "file": "/var/www/html/vendor/amaccis/php-stemmer/src/Adapter/Libstemmer.php",
            "line": 56,
            "function": "type",
            "class": "FFI",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/amaccis/php-stemmer/src/Stemmer.php",
            "line": 55,
            "function": "sbStemmerStem",
            "class": "Amaccis\\Stemmer\\Adapter\\Libstemmer",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/amaccis/php-stemmer/src/Stemmer.php",
            "line": 67,
            "function": "stemWord",
            "class": "Amaccis\\Stemmer\\Stemmer",
            "type": "->"
        },

With 8.1 worked fine. Version: "amaccis/php-stemmer": "2.0.0", PHP Version: 8.3.10

Maybe related to these changes: https://github.com/php/php-src/pull/11935/files

amaccis commented 6 months ago

@luigitec I'm sorry but I didn't get any notification about this message. I'm seeing it right now... Let me check it, I'll let you know.

amaccis commented 6 months ago

@luigitec I tried running the tests with PHP 8.3.7 (the last version available) and I got a lot of deprecations but no error. So, I would need some more details about your case if it's possible. I would need to know how to replicate it.