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

Update to match ArrayAccess interface for PHP 8.0 #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

curio-david
Copy link

Resolves the error I get from PHP 8.1

Error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of
Web3p\EthereumTx\Transaction::offsetExists($offset) should either be compatible
with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute
should be used to temporarily suppress the notice in
/app/vendor/web3p/ethereum-tx/src/Transaction.php:292

@@ -23,7 +23,7 @@
}
},
"require": {
"PHP": "^7.1|^8.0",
Copy link
Member

@sc0Vu sc0Vu Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to support old version of php.

Copy link
Member

@sc0Vu sc0Vu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@curio-david Thanks! The code changed a lot, I'll check code formatter.

@hustynetwork
Copy link

hustynetwork commented Jan 4, 2024

Hi, is this update live? Im facing the same issue with PHP 8.1 when a transaction is signed.

Return type of Web3p\EthereumTx\Transaction::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

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

Successfully merging this pull request may close these issues.

3 participants