Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[PropertyInfo][BC Break] Attempted to call an undefined method named "isInitializable"  #29440

Copy link
Copy link
Closed
@skalpa

Description

@skalpa
Issue body actions

Symfony version(s) affected: 4.2.0

Description
4.2.0 attempts to call isInitializable() on my extractor that doesn't implement PropertyInitializableExtractorInterface.
Probable caused by the @dunglas changes in #26997

How to reproduce
I have a custom ReflectionExtractor service that decorates the default one:

MyNamespace\ReflectionExtractor:
    decorates: property_info.reflection_extractor
class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface
{
}

It used to work before 4.2.0, but I now get an UndefinedMethodException because it doesn't have an isInitializable() method.

Possible Solution
I haven't checked further, but it seems to be a problem with the configuration: my extractor is injected in the $initializableExtractors constructor argument of PropertyInfoExtractor, even though it doesn't implement PropertyInitializableExtractorInterface.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.