Skip to content

Commit

Permalink
Update Membrane dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
charjr committed Apr 25, 2024
1 parent e889c25 commit f8eb7e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
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

0 comments on commit f8eb7e6

Please sign in to comment.