8000 minor #9353 [2.3] Removed deprecated calls (WouterJ) · symfony/symfony@fac711c · GitHub
[go: up one dir, main page]

Skip to content

Commit fac711c

Browse files
committed
minor #9353 [2.3] Removed deprecated calls (WouterJ)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] Removed deprecated calls | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- a6562b3 Fixed deprecated method calls
2 parents c33341d + a6562b3 commit fac711c

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(ManagerRegistry $registry)
2727
protected function loadTypes()
2828
{
2929
return array(
30-
new Type\EntityType($this->registry, PropertyAccess::getPropertyAccessor()),
30+
new Type\EntityType($this->registry, PropertyAccess::createPropertyAccessor()),
3131
);
3232
}
3333

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ abstract class DoctrineType extends AbstractType
4545
public function __construct(ManagerRegistry $registry, PropertyAccessorInterface $propertyAccessor = null)
4646
{
4747
$this->registry = $registry;
48-
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
48+
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
4949
}
5050

5151
public function buildForm(FormBuilderInterface $builder, array $options)

src/Symfony/Bridge/Propel1/Form/PropelExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class PropelExtension extends AbstractExtension
2424
protected function loadTypes()
2525
{
2626
return array(
27-
new Type\ModelType(PropertyAccess::getPropertyAccessor()),
27+
new Type\ModelType(PropertyAccess::createPropertyAccessor()),
2828
new Type\TranslationCollectionType(),
2929
new Type\TranslationType()
3030
);

src/Symfony/Bridge/Propel1/Form/Type/ModelType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ModelType extends AbstractType
5757

5858
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
5959
{
60-
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
60+
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
6161
}
6262

6363
public function buildForm(FormBuilderInterface $builder, array $options)

src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testTransWithoutCaching()
4545
{
4646
$translator = $this->getTranslator($this->getLoader());
4747
$translator->setLocale('fr');
48-
$translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
48+
$translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR'));
4949

5050
$this->assertEquals('foo (FR)', $translator->trans('foo'));
5151
$this->assertEquals('bar (EN)', $translator->trans('bar'));
@@ -61,7 +61,7 @@ public function testTransWithCaching()
6161
// prime the cache
6262
$translator = $this->getTranslator($this->getLoader(), array('cache_dir' => $this->tmpDir));
6363
$translator->setLocale('fr');
64-
$translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
64+
$translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR'));
6565

6666
$this->assertEquals('foo (FR)', $translator->trans('foo'));
6767
$this->assertEquals('bar (EN)', $translator->trans('bar'));
@@ -75,7 +75,7 @@ public function testTransWithCaching()
7575
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
76 67E6 76
$translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir));
7777
$translator->setLocale('fr');
78-
$translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
78+
$translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR'));
7979

8080
$this->assertEquals('foo (FR)', $translator->trans('foo'));
8181
$this->assertEquals('bar (EN)', $translator->trans('bar'));

src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php

Lines changed: 1 addition & 1 deletion
90
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class ObjectChoiceList extends ChoiceList
8787
*/
8888
public function __construct($choices, $labelPath = null, array $preferredChoices = array(), $groupPath = null, $valuePath = null, PropertyAccessorInterface $propertyAccessor = null)
8989
{
90-
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
+
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
9191
$this->labelPath = null !== $labelPath ? new PropertyPath($labelPath) : null;
9292
$this->groupPath = null !== $groupPath ? new PropertyPath($groupPath) : null;
9393
$this->valuePath = null !== $valuePath ? new PropertyPath($valuePath) : null;

src/Symfony/Component/Form/Extension/Core/CoreExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CoreExtension extends AbstractExtension
2424
protected function loadTypes()
2525
{
2626
return array(
27-
new Type\FormType(PropertyAccess::getPropertyAccessor()),
27+
new Type\FormType(PropertyAccess::createPropertyAccessor()),
2828
new Type\BirthdayType(),
2929
new Type\CheckboxType(),
3030
new Type\ChoiceType(),

src/Symfony/Component/Form/Extension/Core/Type/FormType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FormType extends BaseType
3131

3232
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
3333
{
34-
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
34+
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
3535
}
3636

3737
/**

0 commit comments

Comments
 (0)
0