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

Deprecated in PHP 8 #12

Open
allanmcarvalho opened this issue Feb 3, 2022 · 1 comment
Open

Deprecated in PHP 8 #12

allanmcarvalho opened this issue Feb 3, 2022 · 1 comment

Comments

@allanmcarvalho
Copy link

The warning:
Deprecated (8192): Return type of GateApi\Model\Ticker::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

I don't know if the same error is on the other models or parts of the library.

@revilwang
Copy link
Collaborator

revilwang commented Apr 2, 2022

Sorry for the late reply. Since PHP 8, ArrayAccess interface the Ticker model implements from adds a bool return type for its method offsetExists, but the Ticker model doesn't specify the return type, causing PHP 8 reports a warning(actually the Ticker model returns bool too).

We'll add the return type explicitly in Ticker model(and other models inherits from ArrayAccess) to avoid such warnings.

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

2 participants