Skip to content

Parameters auto-resolution for generated factories depends on variable name #60

@janedbal

Description

@janedbal

Following example:

services:
    - ISomeControlFactory
interface ISomeControlFactory {
    /** @return SomeControl */
    public function create(SomeEntity $someEntity);
}

class SomeControl {
    public function __construct(SomeEntity $entity) {}
}

class SomeEntity {}

leads to exception

Service 'XX_ISomeControlFactory': Service of type SomeEntity needed by SomeControl::__construct() not found. Did you register it in configuration file?

just because the parameter variables have different names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions