Skip to content

Array and string offset access syntax with curly braces is no longer supported #32

@DRAJI

Description

@DRAJI

When trying to upgrade the Magento version to 2.4.5-p14. Upgraded successfully. But when i compile, i got an error like

strpos(): Argument #1 ($haystack) must be of type string, bool given#0 setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(71)

I tried the following code to get a list of files that have a parsing error

find app/code vendor -type f -name "*.php" -exec php -l {} ; | grep -B1 "Errors parsing"

I'm using PHP version 8.1. & "astock/stock-api-libphp" - "version": "1.1.6"
PHP 8 removed curly brace syntax for arrays/strings. But the following file still uses {} for an array

PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in vendor/astock/stock-api-libphp/libs/phpcs-psr2-stock/PSR2Stock/Sniffs/Methods/ValidFunctionNameSniff.php on line 133

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions