<?php
use Chubbyphp\Deserialization\Denormalizer\DenormalizerContextInterface;
use Chubbyphp\Deserialization\Policy\GroupPolicy;
use MyProject\Model\Model;
$model = new Model();
/** @var DenormalizerContextInterface $context */
$context = ...;
$context = $context->withAttribute('groups', ['group1']);
$policy = new GroupPolicy(['group1']);
echo $policy->isCompliant('path', $model, $context);
// 1
This repository was archived by the owner on Mar 12, 2025. It is now read-only.