Skip to content

Commit af558c3

Browse files
dunglasteohhanhui
authored andcommitted
Fix more deprecations
1 parent 7876825 commit af558c3

File tree

12 files changed

+46
-42
lines changed

12 files changed

+46
-42
lines changed

composer.json

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
"fig/link-util": "^1.0@dev",
1919
"psr/cache": "^1.0",
2020
"psr/container": "^1.0",
21-
"symfony/http-foundation": "^3.4 || ^4.0",
22-
"symfony/http-kernel": "^3.4 || ^4.0",
23-
"symfony/property-access": "^3.4 || ^4.0",
24-
"symfony/property-info": "^3.4 || ^4.0",
25-
"symfony/serializer": "^4.3",
26-
"symfony/web-link": "^4.1",
21+
"symfony/http-foundation": "^4.3@dev || ^5.0",
22+
"symfony/http-kernel": "^3.4 || ^4.0 || ^5.0",
23+
"symfony/property-access": "^3.4 || ^4.0 || ^5.0",
24+
"symfony/property-info": "^3.4 || ^4.0 || ^5.0",
25+
"symfony/serializer": "^4.3 || ^5.0",
26+
"symfony/web-link": "^4.1 || ^5.0",
2727
"willdurand/negotiation": "^2.0.3"
2828
},
2929
"require-dev": {
@@ -36,7 +36,7 @@
3636
"doctrine/annotations": "^1.7",
3737
"doctrine/common": "^2.11",
3838
"doctrine/data-fixtures": "^1.2.2",
39-
"doctrine/doctrine-bundle": "^1.8",
39+
"doctrine/doctrine-bundle": "^1.8 || ^2.0",
4040
"doctrine/doctrine-cache-bundle": "^1.3.5",
4141
"doctrine/mongodb-odm": "^2.0",
4242
"doctrine/mongodb-odm-bundle": "^4.0",
@@ -60,32 +60,32 @@
6060
"ramsey/uuid": "^3.7",
6161
"ramsey/uuid-doctrine": "^1.4",
6262
"sebastian/object-enumerator": "^3.0.3",
63-
"symfony/asset": "^3.4 || ^4.0",
64-
"symfony/browser-kit": "^4.3",
65-
"symfony/cache": "^3.4 || ^4.0",
66-
"symfony/config": "^3.4 || ^4.0",
67-
"symfony/console": "^3.4 || ^4.0",
68-
"symfony/css-selector": "^3.4 || ^4.0",
69-
"symfony/debug": "^3.4 || ^4.0",
70-
"symfony/dependency-injection": "^3.4 || ^4.0",
71-
"symfony/doctrine-bridge": "^3.4 || ^4.0",
72-
"symfony/dom-crawler": "^3.4 || ^4.0",
73-
"symfony/event-dispatcher": "^3.4 || ^4.0",
74-
"symfony/expression-language": "^3.4 || ^4.0",
75-
"symfony/finder": "^3.4 || ^4.0",
76-
"symfony/form": "^3.4 || ^4.0",
77-
"symfony/framework-bundle": "^4.3.2",
78-
"symfony/http-client": "^4.3",
63+
"symfony/asset": "^3.4 || ^4.0 || ^5.0",
64+
"symfony/browser-kit": "^4.3 || ^5.0",
65+
"symfony/cache": "^3.4 || ^4.0 || ^5.0",
66+
"symfony/config": "^3.4 || ^4.0 || ^5.0",
67+
"symfony/console": "^3.4 || ^4.0 || ^5.0",
68+
"symfony/css-selector": "^3.4 || ^4.0 || ^5.0",
69+
"symfony/debug": "^3.4 || ^4.0 || ^5.0",
70+
"symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0",
71+
"symfony/doctrine-bridge": "^3.4 || ^4.0 || ^5.0",
72+
"symfony/dom-crawler": "^3.4 || ^4.0 || ^5.0",
73+
"symfony/event-dispatcher": "^3.4 || ^4.0 || ^5.0",
74+
"symfony/expression-language": "^3.4 || ^4.0 || ^5.0",
75+
"symfony/finder": "^3.4 || ^4.0 || ^5.0",
76+
"symfony/form": "^3.4 || ^4.0 || ^5.0",
77+
"symfony/framework-bundle": "^4.3.2 || ^5.0",
78+
"symfony/http-client": "^4.3 || ^5.0",
7979
"symfony/mercure-bundle": "*",
80-
"symfony/messenger": "^4.3",
81-
"symfony/phpunit-bridge": "^4.3@dev",
82-
"symfony/routing": "^3.4 || ^4.3",
83-
"symfony/security-bundle": "^3.4 || ^4.0",
84-
"symfony/security-core": "^4.3",
85-
"symfony/twig-bundle": "^3.4 || ^4.0",
86-
"symfony/validator": "^3.4 || ^4.0",
87-
"symfony/web-profiler-bundle": "^4.2",
88-
"symfony/yaml": "^3.4 || ^4.0",
80+
"symfony/messenger": "^4.3 || ^5.0",
81+
"symfony/phpunit-bridge": "^4.3 || ^5.0",
82+
"symfony/routing": "^3.4 || ^4.3 || ^5.0",
83+
"symfony/security-bundle": "^3.4 || ^4.0 || ^5.0",
84+
"symfony/security-core": "^4.3 || ^5.0",
85+
"symfony/twig-bundle": "^3.4 || ^4.0 || ^5.0",
86+
"symfony/validator": "^3.4 || ^4.0 || ^5.0",
87+
"symfony/web-profiler-bundle": "^4.2 || ^5.0",
88+
"symfony/yaml": "^3.4 || ^4.0 || ^5.0",
8989
"twig/twig": "^1.42.3 || ^2.12",
9090
"webonyx/graphql-php": ">=0.13.1 <1.0"
9191
},
@@ -129,5 +129,6 @@
129129
"branch-alias": {
130130
"dev-master": "2.5.x-dev"
131131
}
132-
}
132+
},
133+
"minimum-stability": "dev"
133134
}

src/Bridge/Doctrine/EventListener/WriteListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(ManagerRegistry $managerRegistry)
4242
public function onKernelView(GetResponseForControllerResultEvent $event): void
4343
{
4444
$request = $event->getRequest();
45-
if ($request->isMethodSafe(false)) {
45+
if ($request->isMethodSafe()) {
4646
return;
4747
}
4848

src/Bridge/FosUser/EventListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function onKernelView(GetResponseForControllerResultEvent $event): void
4444
}
4545

4646
$user = $event->getControllerResult();
47-
if (!$user instanceof UserInterface || $request->isMethodSafe(false)) {
47+
if (!$user instanceof UserInterface || $request->isMethodSafe()) {
4848
return;
4949
}
5050

src/Bridge/Symfony/Bundle/Action/SwaggerUiAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private function getContext(Request $request, Documentation $documentation): arr
153153
'scopes' => $this->oauthScopes,
154154
];
155155

156-
if ($request->isMethodSafe(false) && null !== $resourceClass = $request->attributes->get('_api_resource_class')) {
156+
if ($request->isMethodSafe() && null !== $resourceClass = $request->attributes->get('_api_resource_class')) {
157157
$swaggerData['id'] = $request->attributes->get('id');
158158
$swaggerData['queryParameters'] = $request->query->all();
159159

src/Bridge/Symfony/Validator/EventListener/ValidateListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function onKernelView(GetResponseForControllerResultEvent $event): void
5252
{
5353
$request = $event->getRequest();
5454
if (
55-
$request->isMethodSafe(false)
55+
$request->isMethodSafe()
5656
|| $request->isMethod('DELETE')
5757
|| !($attributes = RequestAttributesExtractor::extractAttributes($request))
5858
|| !$attributes['receive']

src/EventListener/DeserializeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function onKernelRequest(GetResponseEvent $event): void
7373

7474
if (
7575
'DELETE' === $method
76-
|| $request->isMethodSafe(false)
76+
|| $request->isMethodSafe()
7777
|| !($attributes = RequestAttributesExtractor::extractAttributes($request))
7878
|| !$attributes['receive']
7979
|| $this->isOperationAttributeDisabled($attributes, self::OPERATION_ATTRIBUTE_KEY)

src/EventListener/WriteListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function onKernelView(GetResponseForControllerResultEvent $event): void
5757

5858
if (
5959
$controllerResult instanceof Response
60-
|| $request->isMethodSafe(false)
60+
|| $request->isMethodSafe()
6161
|| !($attributes = RequestAttributesExtractor::extractAttributes($request))
6262
|| !$attributes['persist']
6363
|| $this->isOperationAttributeDisabled($attributes, self::OPERATION_ATTRIBUTE_KEY)

src/Filter/QueryParameterValidateListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function onKernelRequest(GetResponseEvent $event): void
4242
{
4343
$request = $event->getRequest();
4444
if (
45-
!$request->isMethodSafe(false)
45+
!$request->isMethodSafe()
4646
|| !($attributes = RequestAttributesExtractor::extractAttributes($request))
4747
|| !isset($attributes['collection_operation_name'])
4848
|| 'get' !== ($operationName = $attributes['collection_operation_name'])

src/Validator/EventListener/ValidateListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function onKernelView(GetResponseForControllerResultEvent $event): void
5353

5454
if (
5555
$controllerResult instanceof Response
56-
|| $request->isMethodSafe(false)
56+
|| $request->isMethodSafe()
5757
|| $request->isMethod('DELETE')
5858
|| !($attributes = RequestAttributesExtractor::extractAttributes($request))
5959
|| !$attributes['receive']

tests/Bridge/Symfony/Bundle/Twig/ApiPlatformProfilerPanelTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ protected function setUp(): void
5454
$this->schemaTool->dropSchema($classes);
5555
$this->manager->clear();
5656
$this->schemaTool->createSchema($classes);
57+
58+
$this->ensureKernelShutdown();
5759
}
5860

5961
protected function tearDown(): void

tests/Fixtures/app/AppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getProjectDir()
8484

8585
protected function configureRoutes(RouteCollectionBuilder $routes)
8686
{
87-
$routes->import("config/routing_{$this->getEnvironment()}.yml");
87+
$routes->import(__DIR__."/config/routing_{$this->getEnvironment()}.yml");
8888

8989
if ($_SERVER['LEGACY'] ?? true) {
9090
$routes->import('@NelmioApiDocBundle/Resources/config/routing.yml', '/nelmioapidoc');

tests/Fixtures/app/config/config_common.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ doctrine:
3030

3131
twig:
3232
strict_variables: '%kernel.debug%'
33+
exception_controller: null
3334

3435
mercure:
3536
hubs:

0 commit comments

Comments
 (0)