Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Notice: Undefined variable: serviceLocator #148

Closed
@simonmacor

Description

@simonmacor

Hi,
The error is in Service/DiAbstractServiceFactoryFactory.php on line 32
I'm getting this error when I try create a service with a factory.

public function __invoke(ContainerInterface $container, $name, array $options = null)
    {
        $factory = new DiAbstractServiceFactory($container->get('Di'), DiAbstractServiceFactory::USE_SL_BEFORE_DI);

        if ($serviceLocator instanceof ServiceManager) {
            $serviceLocator->addAbstractFactory($factory, false);
        }

        return $factory;
    }

The problem seems to be present since the release 2.7.0

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