From 00c91c92d193d03027159bec380ec807f574e70d Mon Sep 17 00:00:00 2001 From: Maurits van der Schee Date: Sun, 31 Mar 2024 10:15:29 +0200 Subject: [PATCH] fix php7 regression --- api.include.php | 2 +- api.php | 2 +- build.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api.include.php b/api.include.php index 730c32dd..f3676846 100644 --- a/api.include.php +++ b/api.include.php @@ -2268,7 +2268,7 @@ public function withoutAttribute($attribute): ServerRequestInterface */ class Stream implements StreamInterface { - function __toString() {} + function __toString():string { return ""; } /** @var resource|null A resource reference */ private $stream; diff --git a/api.php b/api.php index 4422502f..47cb1386 100644 --- a/api.php +++ b/api.php @@ -2268,7 +2268,7 @@ public function withoutAttribute($attribute): ServerRequestInterface */ class Stream implements StreamInterface { - function __toString() {} + function __toString():string { return ""; } /** @var resource|null A resource reference */ private $stream; diff --git a/build.php b/build.php index 3dfd9007..8122f161 100644 --- a/build.php +++ b/build.php @@ -109,7 +109,7 @@ function run(string $base, array $dirs, string $filename, array $ignore, array $ ]; $replaces = [ - 'use StreamTrait;' => 'function __toString() {}' + 'use StreamTrait;' => 'function __toString():string { return ""; }' ]; $directories = ['vendor/nyholm', 'src'];