From a4ce0630298f061ee74f98fea5cc97d0fefa6e47 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 21 Jun 2016 08:31:10 +0200 Subject: [PATCH] Revert "feature #18977 [PropertyAccess] Add missing arguments to PropertyAccess::createPropertyAccessor() (chalasr)" This reverts commit 86eb7a333957de8a867ee2c7942ded35f58c35f5, reversing changes made to 856c9f60244b660caae73bb7910f6a8e10f907ef. --- .../PropertyAccess/PropertyAccess.php | 22 +++--------- .../Tests/PropertyAccessTest.php | 36 ------------------- 2 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 src/Symfony/Component/PropertyAccess/Tests/PropertyAccessTest.php diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccess.php b/src/Symfony/Component/PropertyAccess/PropertyAccess.php index 6f27408cab..6c9bb423d0 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -21,35 +21,21 @@ final class PropertyAccess /** * Creates a property accessor with the default configuration. * - * @param bool $throwExceptionOnInvalidIndex - * * @return PropertyAccessor The new property accessor */ - public static function createPropertyAccessor($throwExceptionOnInvalidIndex = false, $magicCall = false) + public static function createPropertyAccessor() { - return self::createPropertyAccessorBuilder($throwExceptionOnInvalidIndex, $magicCall)->getPropertyAccessor(); + return self::createPropertyAccessorBuilder()->getPropertyAccessor(); } /** * Creates a property accessor builder. * - * @param bool $enableExceptionOnInvalidIndex - * * @return PropertyAccessorBuilder The new property accessor builder */ - public static function createPropertyAccessorBuilder($enableExceptionOnInvalidIndex = false, $enableMagicCall = false) + public static function createPropertyAccessorBuilder() { - $propertyAccessorBuilder = new PropertyAccessorBuilder(); - - if ($enableExceptionOnInvalidIndex) { - $propertyAccessorBuilder->enableExceptionOnInvalidIndex(); - } - - if ($enableMagicCall) { - $propertyAccessorBuilder->enableMagicCall(); - } - - return $propertyAccessorBuilder; + return new PropertyAccessorBuilder(); } /** diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessTest.php deleted file mode 100644 index a584dcb3bb..0000000000 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Tests; - -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessor; - -/** - * @author Robin Chalas assertInstanceOf(PropertyAccessor::class, PropertyAccess::createPropertyAccessor()); - } - - public function testCreatePropertyAccessorWithExceptionOnInvalidIndex() - { - $this->assertInstanceOf(PropertyAccessor::class, PropertyAccess::createPropertyAccessor(true)); - } - - public function testCreatePropertyAccessorWithMagicCallEnabled() - { - $this->assertInstanceOf(PropertyAccessor::class, PropertyAccess::createPropertyAccessor(false, true)); - } -}