Fixed deprecated method calls
This commit is contained in:
parent
60a14f6ffe
commit
a6562b36c4
@ -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()),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
);
|
||||
|
@ -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)
|
||||
|
@ -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'));
|
||||
|
@ -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;
|
||||
|
@ -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(),
|
||||
|
@ -31,7 +31,7 @@ class FormType extends BaseType
|
||||
|
||||
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
|
||||
{
|
||||
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::getPropertyAccessor();
|
||||
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user