8000 [Form] Composer use the wrong version of PropertyAccess · Issue #9959 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Form] Composer use the wrong version of PropertyAccess #9959
Closed
@mbutkereit

Description

@mbutkereit

Form's since 2.3 need PropertyAccess version 2.3 and not 2.2 because form's use
the method
Symfony\Component\PropertyAccess\PropertyAccess::createPropertyAccessor()
in the class
Symfony/Component/Form/Extension/Core/CoreExtension.

2.3 Forms

namespace Symfony\Component\Form\Extension\Core;

use Symfony\Component\Form\AbstractExtension;
use Symfony\Component\PropertyAccess\PropertyAccess;

/**
* Represents the main form extension, which loads the core functionality.
*
* @author Bernhard Schussek 
*/
class CoreExtension extends AbstractExtension
{
    protected function loadTypes()
    {
        return array(
            new Type\FormType(PropertyAccess::createPropertyAccessor()),
            new Type\BirthdayType(),
            new Type\CheckboxType(),
            new Type\ChoiceType(),
            new Type\CollectionType(),

2.2 PropertyAccess

namespace Symfony\Component\PropertyAccess;

/**
* Entry point of the PropertyAccess component.
*
* @author Bernhard Schussek 
*/
final class PropertyAccess
{
    /**
* Creates a property accessor with the default configuration.
*
* @return PropertyAccessor The new property accessor
*/
    public static function getPropertyAccessor()
    {
        return new PropertyAccessor();
    }

    /**
* This class cannot be instantiated.
*/
    private function __construct()
    {
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0