Browse Source

Remove non stable feature

Thomas Rabaix 12 years ago
parent
commit
96e052de58
2 changed files with 7 additions and 1 deletions
  1. 4 0
      Admin/AdminInterface.php
  2. 3 1
      Resources/doc/reference/conditional_validation.rst

+ 4 - 0
Admin/AdminInterface.php

@@ -504,10 +504,14 @@ interface AdminInterface
     function hasSubject();
 
     /**
+     *
      * @param \Sonata\AdminBundle\Validator\ErrorElement $errorElement
      * @param mixed                                      $object
      *
      * @return void
+     *
+     * @deprecated this feature cannot be stable, use a custom validator,
+     *             the feature will be removed with Symfony 2.2
      */
     function validate(ErrorElement $errorElement, $object);
 

+ 3 - 1
Resources/doc/reference/conditional_validation.rst

@@ -57,7 +57,7 @@ Add the ``InlineConstraint`` class constraint to your bundle's validation config
     <constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
-    
+
         <class name="Application\Sonata\PageBundle\Entity\Block">
             <constraint name="Sonata\AdminBundle\Validator\Constraints\InlineConstraint">
                 <option name="service">sonata.page.cms.page</option>
@@ -122,6 +122,8 @@ Example from the ``SonataPageBundle``
 Using the Admin class
 ---------------------
 
+This feature is deprecated and will be removed on the 2.2 branch.
+
 The above examples show how to delegate validation to a service. For completeness, it's worth remembering that
 the ``Admin`` class itself contains an empty ``validate`` method. This is automatically called, so you can override it in your own admin class: