Skip to content

request->getParsedBody() returns null #1

@aarbrown

Description

@aarbrown

Hello,

Thank you for writing this library to integrate slim PHP with codeception. I've found it very handy so far. That being said, I believe I have found a bug. When using the codeception-slim-module, the request->getParsedBody() method always returns null. I believe this is due to the following code in Lib\Connector\Slim.php lines 56-61:

$parsed = [];
if ($request->getMethod() !== 'GET') {
    $parsed = $request->getParameters();
}
$slimRequest = $slimRequest
  ->withParsedBody($parsed);

My 'fix' for the bug was to remove those lines :) but I'm not sure if I'm breaking some other functionality in doing so. I'm not sure what the original intention for that code was and I am hoping you can help guide me to a solution for the issue. I'm working on a test that will illustrate the bug and will submit a pull request referencing this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions