consolibyte / quickbooks-php

QuickBooks Integration for PHP
Eclipse Public License 1.0
458 stars 338 forks source link

Warnings on PHP 7.4 #299

Closed aik099 closed 3 years ago

aik099 commented 3 years ago

I'm getting these warnings when attempting to use the library on PHP 7.4:

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/Utilities.php on line 90

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/Utilities.php on line 304 (2 times)

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/Driver/Sql.php on line 3258

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 312

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 326 (2 times)

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 331 (2 times)

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 341

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 348

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 352

Sample code triggering the warning is:

if (ord($interval{$i}) < 97 or ord($interval{$i}) > 122)

I'm not sure how to find similar places, but it's possible, that other files might have similar array key index access issues.

ghost commented 3 years ago

What?

On Mon, May 3, 2021 at 03:32 Alex @.***> wrote:

I'm getting these warnings when attempting to use the library on PHP 7.4:

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/Utilities.php on line 90

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/Utilities.php on line 304 (2 times)

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/Driver/Sql.php on line 3258

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 312

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 326 (2 times)

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 331 (2 times)

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 341

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 348

Deprecated: Array and string offset access syntax with curly braces is deprecated in /project/vendor/consolibyte/quickbooks/QuickBooks/XML.php on line 352

Sample code triggering the warning is:

if (ord($interval{$i}) < 97 or ord($interval{$i}) > 122)

I'm not sure how to find similar places, but it's possible, that other files might have similar array key index access issues.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/consolibyte/quickbooks-php/issues/299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ67Z5VFG53W2VX6OV4M7S3TLZ3SZANCNFSM44ASJUYA .

-- Michael R. Gubser

aik099 commented 3 years ago

@michaelrgubser , please specify if I need to provide any additional info.

As you can see from the paths the consolibyte/quickbooks-php project is installed into a project via Composer and in the main project, I'm invoking QuickBooks-related code from this library.

cpp-chirag-crest commented 2 years ago

Hi @aik099 / @consolibyte

Not sure why this PR is closed because I am still getting error when do "Composer install". Currently I am using windows 11 and php 8.1.1.

image

Needs to fix below files and replace "{ }" with "[ ]" :

  1. consolibyte\quickbooks\QuickBooks\Driver\Sql.php:3258
  2. consolibyte\quickbooks\QuickBooks\Utilities.php:90
  3. consolibyte\quickbooks\QuickBooks\Utilities.php:304
  4. consolibyte\quickbooks\QuickBooks\XML.php: 5 places
aik099 commented 2 years ago

@cpp-chirag-crest , The PR is closed, because changes are merged into a master branch. That however doesn't indicate, that a new library version was released to Composer so that people can upgrade.

cpp-chirag-crest commented 2 years ago

Thanks for information @aik099 Any plan when you guys release new version.