Fixed deprecated method calls

This commit is contained in:
Wouter J 2013-10-20 22:36:31 +02:00 committed by WouterJ
parent 60a14f6ffe
commit a6562b36c4
8 changed files with 10 additions and 10 deletions

View File

@ -27,7 +27,7 @@ class DoctrineOrmExtension extends AbstractExtension
protected function loadTypes()
{
return array(
new Type\EntityType($this->registry, PropertyAccess::getPropertyAccessor()),
new Type\EntityType($this->registry, PropertyAccess::createPropertyAccessor()),
);
}

View File

@ -45,7 +45,7 @@ abstract class DoctrineType extends AbstractType
public function __construct(ManagerRegistry $registry, PropertyAccessorInterface $propertyAccessor = null)
{
$this->registry = $registry;
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
}
public function buildForm(FormBuilderInterface $builder, array $options)

View File

@ -24,7 +24,7 @@ class PropelExtension extends AbstractExtension
protected function loadTypes()
{
return array(
new Type\ModelType(PropertyAccess::getPropertyAccessor()),
new Type\ModelType(PropertyAccess::createPropertyAccessor()),
new Type\TranslationCollectionType(),
new Type\TranslationType()
);

View File

@ -57,7 +57,7 @@ class ModelType extends AbstractType
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
{
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
}
public function buildForm(FormBuilderInterface $builder, array $options)

View File

@ -45,7 +45,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
{
$translator = $this->getTranslator($this->getLoader());
$translator->setLocale('fr');
$translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
$translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR'));
$this->assertEquals('foo (FR)', $translator->trans('foo'));
$this->assertEquals('bar (EN)', $translator->trans('bar'));
@ -61,7 +61,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
// prime the cache
$translator = $this->getTranslator($this->getLoader(), array('cache_dir' => $this->tmpDir));
$translator->setLocale('fr');
$translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
$translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR'));
$this->assertEquals('foo (FR)', $translator->trans('foo'));
$this->assertEquals('bar (EN)', $translator->trans('bar'));
@ -75,7 +75,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
$translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir));
$translator->setLocale('fr');
$translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
$translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR'));
$this->assertEquals('foo (FR)', $translator->trans('foo'));
$this->assertEquals('bar (EN)', $translator->trans('bar'));

View File

@ -87,7 +87,7 @@ class ObjectChoiceList extends ChoiceList
*/
public function __construct($choices, $labelPath = null, array $preferredChoices = array(), $groupPath = null, $valuePath = null, PropertyAccessorInterface $propertyAccessor = null)
{
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
$this->labelPath = null !== $labelPath ? new PropertyPath($labelPath) : null;
$this->groupPath = null !== $groupPath ? new PropertyPath($groupPath) : null;
$this->valuePath = null !== $valuePath ? new PropertyPath($valuePath) : null;

View File

@ -24,7 +24,7 @@ class CoreExtension extends AbstractExtension
protected function loadTypes()
{
return array(
new Type\FormType(PropertyAccess::getPropertyAccessor()),
new Type\FormType(PropertyAccess::createPropertyAccessor()),
new Type\BirthdayType(),
new Type\CheckboxType(),
new Type\ChoiceType(),

View File

@ -31,7 +31,7 @@ class FormType extends BaseType
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
{
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
}
/**