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:

