Skip to content

Commit

Permalink
[Validator] fixed deprecation notice for ElementMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jan 20, 2015
1 parent 339afca commit 2606a6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Symfony/Component/Validator/Mapping/ElementMetadata.php
Expand Up @@ -11,8 +11,6 @@

namespace Symfony\Component\Validator\Mapping;

trigger_error('The '.__NAMESPACE__.'\ElementMetadata class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED);

/**
* Contains the metadata of a structural element.
*
Expand All @@ -23,4 +21,10 @@
*/
abstract class ElementMetadata extends GenericMetadata
{
public function __construct()
{
if (__CLASS__ === get_class($this) || !in_array(get_parent_class($this), array('Symfony\Component\Validator\Mapping\MemberMetadata', 'Symfony\Component\Validator\Mapping\ClassMetadata'))) {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED);
}
}
}

0 comments on commit 2606a6d

Please sign in to comment.