Skip to content

Conversation

@ofabel
Copy link

@ofabel ofabel commented Jul 14, 2024

The current implementation always creates the HTTP request from the superglobals:

public function __construct()
{
    if (null === $this->request) {
        $this->request = HttpRequest::createFromGlobals();
    }
}

But this is not always possible (e.g. when using RoadRunner). It's also an issue in combination with other frameworks (see #440).

With this pull request, users can pass their own Symfony HTTP request object in the constructor - if necessary.

Of course one could also extend the Request class and do the same. But this would also require extending the Server class.

@codecov
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.60%. Comparing base (a466a9b) to head (41acd14).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #442   +/-   ##
=========================================
  Coverage     99.60%   99.60%           
  Complexity      362      362           
=========================================
  Files            20       20           
  Lines          1007     1008    +1     
=========================================
+ Hits           1003     1004    +1     
  Misses            4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant