Fix tests for 8.4 issue-php84 135/head
authorRemi Collet <remi@remirepo.net>
Tue, 9 Jul 2024 13:33:22 +0000 (15:33 +0200)
committerRemi Collet <remi@php.net>
Tue, 9 Jul 2024 13:33:22 +0000 (15:33 +0200)
tests/client002.phpt
tests/client028.phpt
tests/info002.phpt

index d020f16e22ff4d5916b2ba4830ae1083c48c321a..8849ae94101fe43931f2470dfbfab63dc4ebe574 100644 (file)
@@ -15,7 +15,7 @@ echo "Test\n";
 class Observer implements SplObserver
 {
        #[ReturnTypeWillChange]
-       function update(SplSubject $client, http\Client\Request $request = null, StdClass $progress = null) {
+       function update(SplSubject $client, ?http\Client\Request $request = null, ?StdClass $progress = null) {
                echo "P";
                /* fence against buggy infof() calls in some curl versions */
                $compare = $client->getProgressInfo($request);
index f14fb8e5f7d9aadf9ede5e772abf3c9028385f2d..58adc685b6134ca484f5515ede24ce975202e3d1 100644 (file)
@@ -80,7 +80,7 @@ class UserHandler implements http\Client\Curl\User
                return count($this->client);
        }
        
-       function wait(int $timeout_ms = null) {
+       function wait(?int $timeout_ms = null) {
                echo "W";
                
                if ($timeout_ms === null) {
index 4d0344030115ba691bad92ea2e860f03aaac1185..44172b8d41ff075b3a3af3f41ae96721c3784fe7 100644 (file)
@@ -37,13 +37,13 @@ Test
 http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket' in %sinfo002.php:%d
 Stack trace:
 #0 %sinfo002.php(%d): http\Message->__construct('HTTP/1.1 99 App...')
-#1 %sinfo002.php(%d): {closure}()
+#1 %sinfo002.php(%d): {closur%s}()
 #2 %sinfo002.php(%d): trap(Object(Closure))
 #3 {main}
 http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1' in %sinfo002.php:%d
 Stack trace:
 #0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....')
-#1 %sinfo002.php(%d): {closure}()
+#1 %sinfo002.php(%d): {closur%s}()
 #2 %sinfo002.php(%d): trap(Object(Closure))
 #3 {main}
 HTTP/1.1 200