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

Update Membrane dependencies #27

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"illuminate/http": "^9.0 || ^10.0",
"illuminate/support": "^9.0 || ^10.0",
"nyholm/psr7": "^1.8",
"membrane/membrane": "^0.6.0",
"membrane/openapi-router": "0.2.1",
"membrane/membrane": "^0.8",
"membrane/openapi-router": "^0.4.0",
"symfony/psr-http-message-bridge": "^2.1"
},
"require-dev": {
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/RequestValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Membrane\Laravel\ApiProblemBuilder;
use Membrane\Laravel\ToPsr7;
use Membrane\Membrane;
use Membrane\OpenAPI\Exception\CannotProcessRequest;
use Membrane\OpenAPI\Exception\CannotProcessSpecification;
use Membrane\OpenAPI\Specification\Request as MembraneRequestSpec;
use Membrane\Result\Result;
Expand Down
12 changes: 9 additions & 3 deletions tests/Middleware/RequestValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Membrane\Laravel\ToPsr7;
use Membrane\Laravel\ToSymfony;
use Membrane\OpenAPI\Exception\CannotProcessSpecification;
use Membrane\OpenAPI\Method;
use Membrane\OpenAPIReader\ValueObject\Valid\Enum\Method;
use Membrane\Result\Result;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
Expand All @@ -29,11 +29,17 @@ class RequestValidationTest extends TestCase
#[Test]
public function registersResultInstanceInContainer(): void
{
$url = '/pets?limit=5&tags[]=cat&tags[]=tabby';
$url = '/pets?limit=5&tags=cat&tags=tabby';
$expected = Result::valid([
'path' => [],
'query' => ['limit' => 5, 'tags' => ['cat', 'tabby']],
'header' => [],
'header' => [
'host' => ['localhost'],
'user-agent' => ['Symfony'],
'accept' => ['text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'],
'accept-language' => ['en-us,en;q=0.5'],
'accept-charset' => ['ISO-8859-1,utf-8;q=0.7,*;q=0.7'],
],
'cookie' => [],
'body' => '',
'request' => ['method' => 'get', 'operationId' => 'findPets'],
Expand Down
Loading