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

Array and string offset access syntax with curly braces is deprecated #257

Closed
vbasky opened this issue Dec 3, 2019 · 1 comment
Closed

Comments

@vbasky
Copy link

vbasky commented Dec 3, 2019

Upgrade to PHP 7.4 resulting in older code commit to be pulled as dependency

private static function doubleConsonant($str)
{
        $c = self::$regex_consonant;

        return preg_match("#$c{2}$#", $str, $matches) && $matches[0]{0} == $matches[0]{1};
}

as opposed to

private static function doubleConsonant($str)
{
        $c = self::$regex_consonant;

        return preg_match("#$c{2}$#", $str, $matches) && $matches[0][0] == $matches[0][1];
}

Though I see the code committed is the above in the latest PorterStemmer.php file I old code as dependency.

My composer.json has

"teamtnt/laravel-scout-tntsearch-driver": "^7.2",

which is also the latest tagged version.

Few other things tried removed vendor directory and re-installed, removed composer.lock and also cleared composer cache through composer clear-cache

Also checked the TNTSearch.php is also out of date. Is there update needed to Laravel Scout to get the latest code from tntsearch repository ?

And this is my composer.lock file. The zipball reference is getting old code

 {
            "name": "teamtnt/tntsearch",
            "version": "v2.1.0",
            "source": {
                "type": "git",
                "url": "https://github.com/teamtnt/tntsearch.git",
                "reference": "9991c4c34500f19933329c114f8fdc13eddc64cb"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/teamtnt/tntsearch/zipball/9991c4c34500f19933329c114f8fdc13eddc64cb",
                "reference": "9991c4c34500f19933329c114f8fdc13eddc64cb",
                "shasum": ""
            },
            "require": {
                "ext-mbstring": "*",
                "ext-pdo_sqlite": "*",
                "ext-sqlite3": "*",
                "php": "~7.1"
            },
            "require-dev": {
                "phpunit/phpunit": "7.*"
            },
            "type": "library",
            "autoload": {
                "psr-4": {
                    "TeamTNT\\TNTSearch\\": "src"
                },
                "files": [
                    "helper/helpers.php"
                ]
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Nenad Tičarić",
                    "email": "nticaric@gmail.com",
                    "homepage": "http://www.tntstudio.us",
                    "role": "Developer"
                }
            ],
            "description": "A fully featured full text search engine written in PHP",
            "homepage": "https://github.com/teamtnt/tntsearch",
            "keywords": [
                "Fuzzy search",
                "fulltext",
                "geosearch",
                "search",
                "teamtnt",
                "tntsearch"
            ],
            "time": "2019-05-08T08:27:37+00:00"
        },

Apparently figured out what the problem is the tntsearch git repo hasn't released a tag that addresses this problem. Though its committed the commit id is behind 9991c4c34500f19933329c114f8fdc13eddc64cb is the tagged version in that repo whereas a24399e04b6d7f152d3b31ea4a59efc6385cfd06 is the latest commit in master https://github.com/teamtnt/tntsearch/commits/master

PHP Version: 7.4
OS: Mac Catalina

@vbasky
Copy link
Author

vbasky commented Dec 4, 2019

Has been fixed in the tntsearch repo

@vbasky vbasky closed this as completed Dec 4, 2019
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

1 participant