Skip to content

Commit

Permalink
Merge pull request #3 from answear/support-symfony6
Browse files Browse the repository at this point in the history
Support Symfony6
  • Loading branch information
lukasz-falda authored Aug 16, 2022
2 parents 05b2a5b + 811bb99 commit 403a3d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"guzzlehttp/guzzle": "^6.0|^7.0",
"marc-mabe/php-enum": "^3.0|^4.3",
"psr/log": "^1.0",
"symfony/http-kernel": "^4.4|^5.1.5",
"symfony/property-info": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/property-info": "^5.4|^6.0",
"symfony/serializer": "^5.4|^6.0",
"webmozart/assert": "^1.3"
},
"require-dev": {
Expand All @@ -22,7 +22,7 @@
"phpstan/phpstan-webmozart-assert": "^1.0",
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-master",
"symfony/phpunit-bridge": "^5.3"
"symfony/phpunit-bridge": "6.1.*"
},
"autoload": {
"psr-4": {
Expand All @@ -48,6 +48,9 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpro/grumphp": true
}
}
}
4 changes: 2 additions & 2 deletions src/Serializer/Normalizer/EnumNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public function normalize($object, $format = null, array $context = [])
return $object->getValue();
}

public function supportsNormalization($data, $format = null): bool
public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof Enum;
}

public function supportsDenormalization($data, $type, $format = null): bool
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
try {
$type::get($data);
Expand Down

0 comments on commit 403a3d2

Please sign in to comment.