Development

Changeset 32424

You must first sign up to be able to contribute.

Changeset 32424

Show
Ignore:
Timestamp:
03/31/11 07:00:05 (4 years ago)
Author:
fabien
Message:

Merge branch 'master' of git://github.com/symfony/symfony

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/UPDATE.md

    r32400 r32424  
    66API of the framework. If you "hack" the core, you should probably follow the 
    77timeline closely anyway. 
     8 
     9PR8 to PR10 
     10----------- 
     11 
     12* Namespace for validators has changed from `validation` to `assert` (it was 
     13  announced for PR9 but it was not the case then): 
     14 
     15    Before: 
     16 
     17        @validation:NotNull 
     18 
     19    After: 
     20 
     21        @assert:NotNull 
     22 
     23    Moreover, the `Assert` prefix used for some constraints has been removed 
     24    (`AssertTrue` to `True`). 
    825 
    926PR8 to PR9 
     
    5269        app/Resources/AcmeDemo/views/base.html.twig 
    5370 
    54 * Namespace for validators has changed from `validation` to `assert`: 
    55  
    56     Before: 
    57  
    58         @validation:NotNull 
    59  
    60     After: 
    61  
    62         @assert:NotNull 
    63  
    64     Moreover, the `Assert` prefix used for some constraints has been removed 
    65     (`AssertTrue` to `True`). 
    66  
    6771* Bundle logical names lose their `Bundle` suffix: 
    6872 
  • branches/2.0/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml

    r32423 r32424  
    1717        <parameter key="validator.validator_factory.class">Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory</parameter> 
    1818        <parameter key="validator.annotations.namespaces" type="collection"> 
    19             <parameter key="validation">Symfony\Component\Validator\Constraints\</parameter> 
     19            <parameter key="assert">Symfony\Component\Validator\Constraints\</parameter> 
    2020        </parameter> 
    2121    </parameters> 
  • branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

    r32417 r32424  
    173173 
    174174        $namespaces = $container->getParameter('validator.annotations.namespaces'); 
    175         $this->assertEquals('Symfony\\Component\\Validator\\Constraints\\', $namespaces['validation'], '->registerValidationConfiguration() loads the default "validation" namespace'); 
     175        $this->assertEquals('Symfony\\Component\\Validator\\Constraints\\', $namespaces['assert'], '->registerValidationConfiguration() loads the default "assert" prefix'); 
    176176        $this->assertEquals('Application\\Validator\\Constraints\\', $namespaces['app'], '->registerValidationConfiguration() loads custom validation namespaces'); 
    177177    } 
  • branches/2.0/tests/Symfony/Tests/Component/Config/Definition/Builder/NodeBuilderTest.php

    r32303 r32424  
    33namespace Symfony\Tests\Component\Config\Definition\Builder; 
    44 
    5 use Symfony\Component\Config\Definition\Builder\NodeBuilder
    6 use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition
     5use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder
     6use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition
    77 
    88class NodeBuilderTest extends \PHPUnit_Framework_TestCase 
     
    1313    public function testThrowsAnExceptionWhenTryingToCreateANonRegisteredNodeType() 
    1414    { 
    15         $builder = new NodeBuilder(); 
     15        $builder = new BaseNodeBuilder(); 
    1616        $builder->node('', 'foobar'); 
    1717    } 
     
    2222    public function testThrowsAnExceptionWhenTheNodeClassIsNotFound() 
    2323    { 
    24         $builder = new NodeBuilder(); 
     24        $builder = new BaseNodeBuilder(); 
    2525        $builder 
    2626            ->setNodeClass('noclasstype', '\\foo\\bar\\noclass') 
     
    3232        $class = __NAMESPACE__.'\\SomeNodeDefinition'; 
    3333         
    34         $builder = new NodeBuilder(); 
     34        $builder = new BaseNodeBuilder(); 
    3535        $node = $builder 
    3636            ->setNodeClass('newtype', $class) 
     
    4444        $class = __NAMESPACE__.'\\SomeNodeDefinition'; 
    4545 
    46         $builder = new NodeBuilder(); 
     46        $builder = new BaseNodeBuilder(); 
    4747        $node = $builder 
    4848            ->setNodeClass('variable', $class) 
     
    5454    public function testNodeTypesAreNotCaseSensitive() 
    5555    { 
    56         $builder = new NodeBuilder(); 
     56        $builder = new BaseNodeBuilder(); 
    5757 
    5858        $node1 = $builder->node('', 'VaRiAbLe'); 
     
    7070} 
    7171 
    72 class SomeNodeDefinition extends VariableNodeDefinition 
     72class SomeNodeDefinition extends BaseVariableNodeDefinition 
    7373{ 
    7474}