6a148465da
The constraint "Valid" does not accept any options or groups anymore. As per JSR303 1.0 final, section 3.5.1 "Object graph validation" (page 39), properties annotated with valid should be cascaded independent of the current group (i.e. always). Thus the group "*" is not necessary anymore and was removed from the "Valid" constraint in the Form validation.xml.
25 lines
674 B
PHP
25 lines
674 B
PHP
<?php
|
|
|
|
namespace Symfony\Tests\Component\Validator\Fixtures;
|
|
|
|
use Symfony\Component\Validator\Mapping\ClassMetadata;
|
|
use Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface;
|
|
|
|
class FakeClassMetadataFactory implements ClassMetadataFactoryInterface
|
|
{
|
|
protected $metadatas = array();
|
|
|
|
public function getClassMetadata($class)
|
|
{
|
|
if (!isset($this->metadatas[$class])) {
|
|
throw new \RuntimeException('No metadata for class ' . $class);
|
|
}
|
|
|
|
return $this->metadatas[$class];
|
|
}
|
|
|
|
public function addClassMetadata(ClassMetadata $metadata)
|
|
{
|
|
$this->metadatas[$metadata->getClassName()] = $metadata;
|
|
}
|
|
} |