From 5d3dfe23b1fa34805f63161a3ed97da99b15ab28 Mon Sep 17 00:00:00 2001 From: Atul-glo35265 Date: Wed, 13 Nov 2024 12:52:23 +0530 Subject: [PATCH] Php8.4 support - Reverting method changes Signed-off-by: Atul-glo35265 --- src/AutoDiscover.php | 14 +++----------- test/AutoDiscoverTest.php | 9 +++++---- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/AutoDiscover.php b/src/AutoDiscover.php index db3716f..f370426 100644 --- a/src/AutoDiscover.php +++ b/src/AutoDiscover.php @@ -625,19 +625,11 @@ public function toXml() } /** - * Handle WSDL document - * - * @param string|null|callable $responseHandler - * @return void + * Handle WSDL document. */ - public function handle($responseHandler = null) + public function handle() { - if (is_callable($responseHandler)) { - $responseHandler('Content-Type: text/xml'); - } else { - header($responseHandler ?? 'Content-Type: text/xml'); - } - + header('Content-Type: text/xml'); echo $this->toXml(); } } diff --git a/test/AutoDiscoverTest.php b/test/AutoDiscoverTest.php index e19408d..210f1e2 100644 --- a/test/AutoDiscoverTest.php +++ b/test/AutoDiscoverTest.php @@ -1453,16 +1453,17 @@ public function testRecursiveWsdlDependencies() $this->documentNodesTest(); } + /** + * @runInSeparateProcess + */ public function testHandle() { $scriptUri = 'http://localhost/MyService.php'; + $this->server->setClass(Test::class); ob_start(); - - $this->server->handle(function (?string $header) { - $this->assertEquals('Content-Type: text/xml', $header); - }); + $this->server->handle(); $actualWsdl = ob_get_clean();