Skip to content
This repository was archived by the owner on Sep 14, 2018. It is now read-only.

Silex 2.0 and 'Identifier "dispatcher" does not contain an object definition.' #70

@J7mbo

Description

@J7mbo

Note: I'm using silex 2.0.x-dev#c207787 and WebProfiler 2.0.x-dev.

Registering the WebProfilerServiceProvider with the following code:

    $app->register(new WebProfilerServiceProvider, [
        'profiler.cache_dir'    => __DIR__ .  $cacheDir,
        'profiler.mount_prefix' => $mountPrefix
    ]);

Throws the following exception:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Identifier "dispatcher" does not contain an object definition.' in /vagrant/vendor/pimple/pimple/src/Pimple/Container.php on line 232
( ! ) InvalidArgumentException: Identifier "dispatcher" does not contain an object definition. in /vagrant/vendor/pimple/pimple/src/Pimple/Container.php on line 232

It seems that Container::extend() is throwing the exception because the value "dispatcher" (the EventDispatcher object) doesn't contain the __invoke() method:

screen shot 2015-09-05 at 18 36 28

screen shot 2015-09-05 at 18 37 10

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