baopham / laravel-dynamodb

Eloquent syntax for DynamoDB
https://packagist.org/packages/baopham/dynamodb
MIT License
484 stars 128 forks source link

Could you fix this code? (PHP5.6 FatalError Analyzer.php ) #249

Closed sinzo33 closed 2 years ago

sinzo33 commented 2 years ago

File: /vendor/baopham/dynamodb/src/ConditionAnalyzer/Analyzer.php Line: 202 and 206

$hashConditionType = $this->getCondition($hash)['type'] ?? null; $rangeConditionType = $this->getCondition($range)['type'] ?? null;

What is issue? : スクリーンショット 2021-11-05 4 52 01

My php version is 5.6 (sorry,my customer using old php ver... TT) [??] has not been implemented yet. ( Maybe ?? implemented php7.0~)

Please fix to

$hashConditionType = $this->getCondition($hash)['type'] ? $this->getCondition($hash)['type'] : null;

and

$rangeConditionType = $this->getCondition($range)['type'] ? $this->getCondition($range)['type'] : null;

It's all user be happy : ) Thank you for watching.

JackPriceBurns commented 2 years ago

PHP 5.6 is not supported by this package. PHP 5.6 was end-of-life 3 years ago, I'd highly advise you update your PHP version to at least 7.4.

Alternatively you could fork the package, add the backwards compatibility yourself and pull in your own private version of this package. However, we can't help you with this.