Skip to content

Commit 7755034

Browse files
committed
Merge branch '2.3'
2 parents 28eb702 + 47e8dfb commit 7755034

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
language: php
2-
sudo: false
32

43
cache:
54
directories:

src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private function addExceptionToStatusSection(ArrayNodeDefinition $rootNode)
278278
}
279279

280280
if (\defined($httpStatusCodeConstant = sprintf('%s::%s', Response::class, $httpStatusCode))) {
281-
@trigger_error(sprintf('Using a string "%s" as a constant of the "%s" class is deprecated since API Platform 2.1 and will not be possible anymore in API Platform 3. Use the Symfony\'s custom YAML extension for PHP constants instead (i.e. "!php/const:%s").', $httpStatusCode, Response::class, $httpStatusCodeConstant), E_USER_DEPRECATED);
281+
@trigger_error(sprintf('Using a string "%s" as a constant of the "%s" class is deprecated since API Platform 2.1 and will not be possible anymore in API Platform 3. Use the Symfony\'s custom YAML extension for PHP constants instead (i.e. "!php/const %s").', $httpStatusCode, Response::class, $httpStatusCodeConstant), E_USER_DEPRECATED);
282282

283283
$httpStatusCode = \constant($httpStatusCodeConstant);
284284
}

tests/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function testDefaultConfig()
156156

157157
/**
158158
* @group legacy
159-
* @expectedDeprecation Using a string "HTTP_INTERNAL_SERVER_ERROR" as a constant of the "Symfony\Component\HttpFoundation\Response" class is deprecated since API Platform 2.1 and will not be possible anymore in API Platform 3. Use the Symfony's custom YAML extension for PHP constants instead (i.e. "!php/const:Symfony\Component\HttpFoundation\Response::HTTP_INTERNAL_SERVER_ERROR").
159+
* @expectedDeprecation Using a string "HTTP_INTERNAL_SERVER_ERROR" as a constant of the "Symfony\Component\HttpFoundation\Response" class is deprecated since API Platform 2.1 and will not be possible anymore in API Platform 3. Use the Symfony's custom YAML extension for PHP constants instead (i.e. "!php/const Symfony\Component\HttpFoundation\Response::HTTP_INTERNAL_SERVER_ERROR").
160160
*/
161161
public function testLegacyExceptionToStatusConfig()
162162
{

tests/Fixtures/FileConfigurations/resources.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ resources:
2626
groups: ['default']
2727
hydra_context:
2828
'@type': 'hydra:Operation'
29-
'@hydra:title': 'File config Dummy'
30-
# Use this syntax with Symfony YAML 3.4+:
31-
#'@hydra:title': !php/const ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy::HYDRA_TITLE
29+
'@hydra:title': !php/const ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy::HYDRA_TITLE
3230
iri: 'someirischema'
3331
properties:
3432
'foo':

tests/Fixtures/app/config/config_test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ api_platform:
5959
client_partial: true
6060
items_per_page: 3
6161
exception_to_status:
62-
Symfony\Component\Serializer\Exception\ExceptionInterface: 400
63-
ApiPlatform\Core\Exception\InvalidArgumentException: 400
64-
ApiPlatform\Core\Exception\FilterValidationException: 400
65-
# Use this syntax with Symfony YAML 3.4+:
66-
#ApiPlatform\Core\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
62+
Symfony\Component\Serializer\Exception\ExceptionInterface: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
63+
ApiPlatform\Core\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
64+
ApiPlatform\Core\Exception\FilterValidationException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
6765
http_cache:
6866
invalidation:
6967
enabled: true

0 commit comments

Comments
 (0)