adobe / adobe/stock-api-libphp

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

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
20
Forks
23
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.