From a6562b36c4b1393d6991f2dbce42a6d96086a36c Mon Sep 17 00:00:00 2001 From: Wouter J Date: Sun, 20 Oct 2013 22:36:31 +0200 Subject: [PATCH] Fixed deprecated method calls --- src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php | 2 +- src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php | 2 +- src/Symfony/Bridge/Propel1/Form/PropelExtension.php | 2 +- src/Symfony/Bridge/Propel1/Form/Type/ModelType.php | 2 +- .../FrameworkBundle/Tests/Translation/TranslatorTest.php | 6 +++--- .../Form/Extension/Core/ChoiceList/ObjectChoiceList.php | 2 +- src/Symfony/Component/Form/Extension/Core/CoreExtension.php | 2 +- src/Symfony/Component/Form/Extension/Core/Type/FormType.php | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php index a98b2d2a24540..3553b2c4ae45e 100644 --- a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php +++ b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php @@ -27,7 +27,7 @@ public function __construct(ManagerRegistry $registry) protected function loadTypes() { return array( - new Type\EntityType($this->registry, PropertyAccess::getPropertyAccessor()), + new Type\EntityType($this->registry, PropertyAccess::createPropertyAccessor()), ); } diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index 81623966c1087..f07f1af3c011c 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -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) diff --git a/src/Symfony/Bridge/Propel1/Form/PropelExtension.php b/src/Symfony/Bridge/Propel1/Form/PropelExtension.php index b238a5e6ff1f5..77e044b9c6a19 100644 --- a/src/Symfony/Bridge/Propel1/Form/PropelExtension.php +++ b/src/Symfony/Bridge/Propel1/Form/PropelExtension.php @@ -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() ); diff --git a/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php b/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php index 16d633cda2e78..02090d3638a25 100644 --- a/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php +++ b/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php @@ -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) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index de918c85f0ba4..614f6dbc2d2c7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -45,7 +45,7 @@ public function testTransWithoutCaching() { $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 @@ public function testTransWithCaching() // 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 @@ public function testTransWithCaching() $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')); diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php index 0a153883a3868..7c7aa0c76898f 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php @@ -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; diff --git a/src/Symfony/Component/Form/Extension/Core/CoreExtension.php b/src/Symfony/Component/Form/Extension/Core/CoreExtension.php index bbcac4baea933..a0153a57eb700 100644 --- a/src/Symfony/Component/Form/Extension/Core/CoreExtension.php +++ b/src/Symfony/Component/Form/Extension/Core/CoreExtension.php @@ -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(), diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php index a64b5ac465eb7..a4fce3327201a 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php @@ -31,7 +31,7 @@ class FormType extends BaseType public function __construct(PropertyAccessorInterface $propertyAccessor = null) { - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor(); + $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); } /**