Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v10.0.6 throws errors in PHP 7.4 #135

Open
jsirish opened this issue Sep 6, 2022 · 2 comments
Open

v10.0.6 throws errors in PHP 7.4 #135

jsirish opened this issue Sep 6, 2022 · 2 comments

Comments

@jsirish
Copy link

jsirish commented Sep 6, 2022

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.

@squatto
Copy link

squatto commented Sep 6, 2022

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

@fourstacks
Copy link

This is related to issue #136.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants