[PropertyAccess] Made naming consistent with Form and Validator

This commit is contained in:
Bernhard Schussek 2013-04-25 18:28:27 +02:00
parent 0b0872784c
commit 8817e70042
3 changed files with 38 additions and 3 deletions

View File

@ -238,6 +238,26 @@ UPGRADE FROM 2.x to 3.0
* The `FormItegrationTestCase` and `FormPerformanceTestCase` classes were moved form the `Symfony\Component\Form\Tests` namespace to the `Symfony\Component\Form\Test` namespace.
### PropertyAccess
* Renamed `PropertyAccess::getPropertyAccessor` to `createPropertyAccessor`.
Before:
```
use Symfony\Component\PropertyAccess\PropertyAccess;
$accessor = PropertyAccess::getPropertyAccessor();
```
After:
```
use Symfony\Component\PropertyAccess\PropertyAccess;
$accessor = PropertyAccess::createPropertyAccessor();
```
### Routing
* Some route settings have been renamed:

View File

@ -10,3 +10,5 @@ CHANGELOG
method even if a non-public match was found. Before, a PropertyAccessDeniedException
was thrown in this case. Class PropertyAccessDeniedException was removed
now.
* deprecated PropertyAccess::getPropertyAccessor
* added PropertyAccess::createPropertyAccessor and PropertyAccess::createPropertyAccessorBuilder

View File

@ -23,9 +23,9 @@ final class PropertyAccess
*
* @return PropertyAccessor The new property accessor
*/
public static function getPropertyAccessor()
public static function createPropertyAccessor()
{
return new PropertyAccessor();
return self::createPropertyAccessorBuilder()->getPropertyAccessor();
}
/**
@ -33,11 +33,24 @@ final class PropertyAccess
*
* @return PropertyAccessorBuilder The new property accessor builder
*/
public static function getPropertyAccessorBuilder()
public static function createPropertyAccessorBuilder()
{
return new PropertyAccessorBuilder();
}
/**
* Alias of {@link getPropertyAccessor}.
*
* @return PropertyAccessor The new property accessor
*
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
* {@link createPropertyAccessor()} instead.
*/
public static function getPropertyAccessor()
{
return self::createPropertyAccessor();
}
/**
* This class cannot be instantiated.
*/