Skip to content

Feature/symfony responses (part 2)#2648

Open
tvdijen wants to merge 20 commits into
simplesamlphp-3.0from
feature/symfony-responses
Open

Feature/symfony responses (part 2)#2648
tvdijen wants to merge 20 commits into
simplesamlphp-3.0from
feature/symfony-responses

Conversation

@tvdijen

@tvdijen tvdijen commented Jun 29, 2026

Copy link
Copy Markdown
Member

Was: #2645

@tvdijen tvdijen force-pushed the simplesamlphp-3.0 branch from 665ece0 to 4f5d845 Compare June 29, 2026 11:11
@tvdijen tvdijen force-pushed the feature/symfony-responses branch from 8aa8d0e to fde26cd Compare June 29, 2026 11:14
@tvdijen tvdijen force-pushed the feature/symfony-responses branch from c1c6693 to 0fc7a4a Compare June 29, 2026 20:34
@monkeyiq

Copy link
Copy Markdown
Contributor

The LogoutTest.php is failing because it gets a redirect which is not seen as success, https://github.com/symfony/symfony/blob/b066d276a261458c1ad93d9418c424a8ebefac25/src/Symfony/Component/HttpFoundation/Response.php#L1184

That can work if replaced with

$this->assertTrue($response->isRedirection());

@monkeyiq

Copy link
Copy Markdown
Contributor

I think the IndexTest.php are failing because the sendContent in RunnableResponse needs to get the Response from call_user_func_array and run that rather than just ignoring it...

--- a/src/SimpleSAML/HTTP/RunnableResponse.php
+++ b/src/SimpleSAML/HTTP/RunnableResponse.php
@@ -65,7 +65,10 @@ class RunnableResponse extends Response
      */
     public function sendContent(): static
     {
-        call_user_func_array($this->callable, $this->arguments);
+        $response = call_user_func_array($this->callable, $this->arguments);
+        if ($response instanceof Response) {
+            $response->send();
+        }
         return $this;
     }
 }

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

Successfully merging this pull request may close these issues.

2 participants