Skip to content

Commit

Permalink
Merge 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jan 12, 2024
2 parents 804da1b + 38007aa commit ce560cf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ parameters:
- src/Serializer/CacheableSupportsMethodInterface.php
- tests/Hal/Serializer/ItemNormalizerTest.php
- tests/Symfony/Validator/Metadata/Property/ValidatorPropertyMetadataFactoryTest.php
- src/Symfony/Bundle/ArgumentResolver/CompatibleValueResolverInterface.php
earlyTerminatingMethodCalls:
PHPUnit\Framework\Constraint\Constraint:
- fail
Expand Down Expand Up @@ -98,3 +99,4 @@ parameters:
# Backward compatibility
- '#Call to method hasCacheableSupportsMethod\(\) on an unknown class Symfony\\Component\\Serializer\\Normalizer\\CacheableSupportsMethodInterface\.#'
- '#Class Symfony\\Component\\Serializer\\Normalizer\\CacheableSupportsMethodInterface not found\.#'
- '#Access to undefined constant Symfony\\Component\\HttpKernel\\HttpKernelInterface::MASTER_REQUEST\.#'
6 changes: 3 additions & 3 deletions tests/Symfony/EventListener/AddTagsListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function testAddTagsWithXKey(): void
$event = new ResponseEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
new Request([], [], ['_resources' => ['/foo' => '/foo', '/bar' => '/bar'], '_api_resource_class' => Dummy::class, '_api_operation_name' => 'get']),
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$response
);

Expand Down Expand Up @@ -239,7 +239,7 @@ public function testAddTagsWithoutHeader(): void
$event = new ResponseEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
new Request([], [], ['_resources' => ['/foo' => '/foo', '/bar' => '/bar'], '_api_resource_class' => Dummy::class, '_api_operation_name' => 'get']),
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$response
);

Expand Down Expand Up @@ -269,7 +269,7 @@ public function testDummyHeaderTag(): void
$event = new ResponseEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
new Request([], [], ['_resources' => ['/foo' => '/foo', '/bar' => '/bar'], '_api_resource_class' => Dummy::class, '_api_operation_name' => 'get']),
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$response
);

Expand Down
16 changes: 8 additions & 8 deletions tests/Symfony/EventListener/WriteListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function testOnKernelViewWithControllerResultAndPersist(): void
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$operationResource
);

Expand Down Expand Up @@ -118,7 +118,7 @@ public function testOnKernelViewDoNotCallIriConverterWhenOutputClassDisabled():
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$operationResource
);

Expand All @@ -144,7 +144,7 @@ public function testOnKernelViewWithControllerResultAndRemove(): void
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$operationResource
);

Expand Down Expand Up @@ -172,7 +172,7 @@ public function testOnKernelViewWithSafeMethod(): void
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$operationResource
);

Expand All @@ -190,7 +190,7 @@ public function testDoNotWriteWhenControllerResultIsResponse(): void
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$response
);

Expand All @@ -215,7 +215,7 @@ public function testDoNotWriteWhenCant(): void
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$operationResource
);

Expand All @@ -237,7 +237,7 @@ public function testOnKernelViewWithNoResourceClass(): void
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$operationResource
);

Expand Down Expand Up @@ -268,7 +268,7 @@ public function testOnKernelViewInvalidIdentifiers(): void
$event = new ViewEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
$request,
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$attributeResource
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getConstraintViolationList(): ConstraintViolationListInterface
$exceptionEvent = new ExceptionEvent(
$this->prophesize(HttpKernelInterface::class)->reveal(),
new Request(),
HttpKernelInterface::MASTER_REQUEST,
\defined(HttpKernelInterface::class.'::MAIN_REQUEST') ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST,
$exception
);

Expand Down

0 comments on commit ce560cf

Please sign in to comment.