Skip to content

fix #6 compatibility with psr 1.2.0 #7

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/Factory/createUploadedFile_err01.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ try {

?>
--EXPECTF--
%sttpMessage\Factory::createUploadedFile()%s Psr\Http\Message\StreamInterface, string given
%sttpMessage\Factory::createUploadedFile()%s Psr\Http\Message\StreamInterface,%sstdClass given
%sttpMessage\Factory::createUploadedFile()%s\Http\Message\StreamInterface, string given
%sttpMessage\Factory::createUploadedFile()%s\Http\Message\StreamInterface,%sstdClass given
%sttpMessage\Factory::createUploadedFile()%s, array given
%sttpMessage\Factory::createUploadedFile()%sint, array given
%sttpMessage\Factory::createUploadedFile()%s, array given
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/body_err01.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ try {

?>
--EXPECTF--
%sttpMessage\Message::withBody()%s Psr\Http\Message\StreamInterface, resource given
%sttpMessage\Message::withBody()%s\Http\Message\StreamInterface, resource given
HttpMessage\Message::withBody() expects exactly 1 %s, 0 given
2 changes: 1 addition & 1 deletion tests/Request/uri_err01.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ try {
?>
--EXPECTF--
HttpMessage\Request::withUri() expects exactly 1 %s, 0 given
%sttpMessage\Request::withUri()%sPsr\Http\Message\UriInterface, string given
%sttpMessage\Request::withUri()%s\Http\Message\UriInterface, string given
5 changes: 4 additions & 1 deletion uri.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ PHP_METHOD(Uri, __construct)


/* __toString */

#if PHP_VERSION_ID >= 80000 && PHP_PSR_VERSION_ID >= 10200
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_HttpMessageUri_toString, 0, 0, IS_STRING, 0)
#else
ZEND_BEGIN_ARG_INFO_EX(arginfo_HttpMessageUri_toString, 0, 0, 0)
#endif
ZEND_END_ARG_INFO()

PHP_METHOD(Uri, __toString)
Expand Down