Skip to content

Commit 006ebf9

Browse files
fix: remove deprecations
1 parent cbda052 commit 006ebf9

File tree

6 files changed

+6
-67
lines changed

6 files changed

+6
-67
lines changed

src/Doctrine/Common/Filter/ExistsFilterTrait.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ abstract protected function normalizePropertyName($property): string;
7272

7373
private function normalizeValue($value, string $property): ?bool
7474
{
75-
if (\is_array($value) && isset($value[self::QUERY_PARAMETER_KEY])) {
76-
@trigger_error(
77-
sprintf('The ExistsFilter syntax "%s[exists]=true/false" is deprecated since 2.5. Use the syntax "%s[%s]=true/false" instead.', $property, $this->existsParameterName, $property),
78-
\E_USER_DEPRECATED
79-
);
80-
$value = $value[self::QUERY_PARAMETER_KEY];
81-
}
82-
8375
if (\in_array($value, [true, 'true', '1', '', null], true)) {
8476
return true;
8577
}

src/GraphQl/Type/TypeConverter.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,12 @@ final class TypeConverter implements TypeConverterInterface
4444
private $resourceMetadataCollectionFactory;
4545
private $propertyMetadataFactory;
4646

47-
public function __construct(TypeBuilderInterface $typeBuilder, TypesContainerInterface $typesContainer, ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory = null)
47+
public function __construct(TypeBuilderInterface $typeBuilder, TypesContainerInterface $typesContainer, ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory)
4848
{
4949
$this->typeBuilder = $typeBuilder;
5050
$this->typesContainer = $typesContainer;
5151
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
5252
$this->propertyMetadataFactory = $propertyMetadataFactory;
53-
54-
if (null === $this->propertyMetadataFactory) {
55-
@trigger_error(sprintf('Not injecting %s in the TypeConverter is deprecated since 2.7 and will not be supported in 3.0.', PropertyMetadataFactoryInterface::class), \E_USER_DEPRECATED);
56-
}
5753
}
5854

5955
/**

src/JsonLd/Serializer/ObjectNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ public function normalize($object, $format = null, array $context = [])
7373
* normalized data array is empty.
7474
*
7575
* This is useful when traversing from a non-resource towards an attribute
76-
* which is a resource, as we do not have the benefit of {@see PropertyMetadata::isReadableLink}.
76+
* which is a resource, as we do not have the benefit of {@see ApiProperty::isReadableLink}.
7777
*
78-
* It must not be propagated to subresources, as {@see PropertyMetadata::isReadableLink}
78+
* It must not be propagated to resources, as {@see ApiProperty::isReadableLink}
7979
* should take effect.
8080
*/
8181
$context['api_empty_resource_as_iri'] = true;

src/Serializer/AbstractItemNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ public function normalize($object, $format = null, array $context = [])
144144
* IRI, if the normalized data array is empty.
145145
*
146146
* This is useful when traversing from a non-resource towards an attribute
147-
* which is a resource, as we do not have the benefit of {@see PropertyMetadata::isReadableLink}.
147+
* which is a resource, as we do not have the benefit of {@see ApiProperty::isReadableLink}.
148148
*
149-
* It must not be propagated to subresources, as {@see PropertyMetadata::isReadableLink}
149+
* It must not be propagated to resources, as {@see ApiProperty::isReadableLink}
150150
* should take effect.
151151
*/
152152
$emptyResourceAsIri = $context['api_empty_resource_as_iri'] ?? false;

src/Symfony/Security/ExpressionLanguage.php

Lines changed: 0 additions & 49 deletions
This file was deleted.

tests/Symfony/Security/ResourceAccessCheckerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
namespace ApiPlatform\Tests\Symfony\Security;
1515

16-
use ApiPlatform\Symfony\Security\ExpressionLanguage;
1716
use ApiPlatform\Symfony\Security\ResourceAccessChecker;
1817
use ApiPlatform\Tests\Fixtures\Serializable;
1918
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Dummy;
@@ -24,6 +23,7 @@
2423
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
2524
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2625
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
26+
use Symfony\Component\Security\Core\Authorization\ExpressionLanguage;
2727

2828
/**
2929
* @author Kévin Dunglas <[email protected]>

0 commit comments

Comments
 (0)