Basic-Shopify-API
Basic-Shopify-API copied to clipboard
v10.0.6 throws errors in PHP 7.4
We've been using this module for our Shopify module for some time and it's been great for us.
It appears the return type work in #129 may have caused issues in PHP 7.4. The graph command throws the following:
ERROR [Emergency]: Uncaught TypeError: Return value of Osiset\BasicShopifyAPI\ResponseAccess::offsetGet() must be an instance of Osiset\BasicShopifyAPI\mixed, instance of Osiset\BasicShopifyAPI\ResponseAccess returned
IN GET dev/tasks/ShopifyImportTask
Line 67 in /Users/xxx/Sites/silverstripe-shopify/vendor/osiset/basic-shopify-api/src/ResponseAccess.php
Using v10.0.5 with PHP 7.4 works as expected. v10.0.6 with PHP 7.4 throws the error above. PHP 8.0 with v10.0.6 works as expected.
This is happening because mixed was introduced in PHP 8.0, but v10.0.6 of this package has the PHP version requirement as >=7.3.0:
https://github.com/osiset/Basic-Shopify-API/blob/48497d512ae9e457635fb9f9d5859cb7339e38b1/composer.json#L24
This is related to issue #136.