Skip to content

Commit 827d816

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: Username and password in basic auth are allowed to contain '.' Remove obsolete PHPDoc from UriSigner [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed [PropertyInfo] Add support for the iterable type pdo session fix Fixed unsetting from loosely equal keys OrderedHashMap [Debug] Fix same vendor detection in class loader Updated the source text and translation reject remember-me token if user check fails
2 parents 6fa394e + 70e2d18 commit 827d816

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Normalizer/ObjectNormalizer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\PropertyAccess\PropertyAccess;
1616
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
1717
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
18+
use Symfony\Component\Serializer\Exception\RuntimeException;
1819
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
1920
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
2021

@@ -32,6 +33,10 @@ class ObjectNormalizer extends AbstractObjectNormalizer
3233

3334
public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null, PropertyTypeExtractorInterface $propertyTypeExtractor = null)
3435
{
36+
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccess')) {
37+
throw new RuntimeException('The ObjectNormalizer class requires the "PropertyAccess" component. Install "symfony/property-access" to use it.');
38+
}
39+
3540
parent::__construct($classMetadataFactory, $nameConverter, $propertyTypeExtractor);
3641

3742
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();

0 commit comments

Comments
 (0)