Permalink
Browse files

fix GroupsVersionExclusionStrategy

  • Loading branch information...
1 parent aec3e06 commit bc481c0849f35b383079b705498bd7cc04a62c22 @lsmith77 lsmith77 committed Dec 9, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 View/GroupsVersionExclusionStrategy.php
@@ -12,6 +12,7 @@
namespace FOS\RestBundle\View;
use JMS\Serializer\Metadata\ClassMetadata;
+use JMS\Serializer\NavigatorContext;
use JMS\Serializer\Metadata\PropertyMetadata;
use JMS\Serializer\Exclusion\ExclusionStrategyInterface;
use JMS\Serializer\Exclusion\VersionExclusionStrategy;
@@ -28,13 +29,15 @@ public function __construct($groups, $version)
$this->versionExclusion = new VersionExclusionStrategy($version);
}
- public function shouldSkipClass(ClassMetadata $metadata, $object = null)
+ public function shouldSkipClass(ClassMetadata $metadata, NavigatorContext $navigatorContext)
{
return false;
}
- public function shouldSkipProperty(PropertyMetadata $metadata, $object = null)
+ public function shouldSkipProperty(PropertyMetadata $property, NavigatorContext $navigatorContext)
{
- return $this->groupExclusion->shouldSkipProperty($metadata) || $this->versionExclusion->shouldSkipProperty($metadata);
+ return $this->groupExclusion->shouldSkipProperty($property, $navigatorContext)
+ || $this->versionExclusion->shouldSkipProperty($property, $navigatorContext)
+ ;
}
}

0 comments on commit bc481c0

Please sign in to comment.