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

Declaration of Psr\Http\Message\StreamInterface::__toString() must be compatible with Stringable::__toString() #92

Closed
Jeckerson opened this issue Nov 7, 2021 · 2 comments

Comments

@Jeckerson
Copy link
Contributor

Jeckerson commented Nov 7, 2021

Since PHP8.1 it is more stricter.

PHP_PSR_BEGIN_ARG_INFO(HttpMessage, StreamInterface, __toString, 0)

Change from:

PHP_PSR_BEGIN_ARG_INFO(HttpMessage, StreamInterface, __toString, 0)

To:

#if PHP_VERSION_ID >= 80000
PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(HttpMessage, StreamInterface, __toString, 0, IS_STRING, 0)
#else
PHP_PSR_BEGIN_ARG_INFO(HttpMessage, StreamInterface, __toString, 0)
#endif

Also this one:

PHP Fatal error: Declaration of Psr\Http\Message\UriInterface::__toString() must be compatible with Stringable::__toString(): string

Found in https://github.com/zephir-lang/zephir/runs/4132222740?check_suite_focus=true#step:11:12

@sergeyklay
Copy link
Contributor

Could you send a patch?

@Jeckerson
Copy link
Contributor Author

Could you send a patch?

yes, but later.

jbboehr pushed a commit that referenced this issue Dec 11, 2021
* Bump version of `tukio` to `1.3.0`
* Bump version of `laminas/laminas-diactoros` to `2.8.0`
* Add 8.1 version into CI workflows
* Fix `StreamInterface::__toString()` compatibility with PHP 8.1

Closes #92
Closes #93
jbboehr pushed a commit that referenced this issue Dec 11, 2021
* Bump version of `tukio` to `1.3.0`
* Bump version of `laminas/laminas-diactoros` to `2.8.0`
* Add 8.1 version into CI workflows
* Fix `StreamInterface::__toString()` compatibility with PHP 8.1

Closes #92
Closes #93
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