Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Slim\Psr7\Request instantiation #127

Merged
merged 1 commit into from
Sep 9, 2019
Merged

Fix Slim\Psr7\Request instantiation #127

merged 1 commit into from
Sep 9, 2019

Conversation

chunfeilung
Copy link
Contributor

This is how SlimRequest (Slim\Psr7\Request) is currently instantiated:

new SlimRequest($method, $uri, $h, $serverParams, $cookies, $stream)

And this is what Slim\Psr7\Request actually expects:

public function __construct(
        $method,
        UriInterface $uri,
        HeadersInterface $headers,
        array $cookies,      👈
        array $serverParams, 👈
        StreamInterface $body,
        array $uploadedFiles = []
    )

The proposed change swaps the order in which $cookies and $serverParams are passed to Request, so that it’s instantiated correctly.

This makes sure that $cookies and $serverParams are passed to Slim\Psr7\Request in the correct order.
@l0gicgate l0gicgate added this to the 4.0.3 milestone Sep 9, 2019
@l0gicgate l0gicgate merged commit 7d4ec02 into slimphp:master Sep 9, 2019
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