Skip to content

Commit f3c1b20

Browse files
committed
Silex 2.* update
Makes ConsoleServiceProvider compatible with Silex 2.*
1 parent 1f1a331 commit f3c1b20

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Knp/Provider/ConsoleServiceProvider.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
namespace Knp\Provider;
44

5-
use Silex\ServiceProviderInterface;
5+
use Pimple\Container;
6+
use Pimple\ServiceProviderInterface;
67
use Silex\Application;
78

89
use Knp\Console\Application as ConsoleApplication;
@@ -11,9 +12,9 @@
1112

1213
class ConsoleServiceProvider implements ServiceProviderInterface
1314
{
14-
public function register(Application $app)
15+
public function register(Container $app)
1516
{
16-
$app['console'] = $app->share(function() use ($app) {
17+
$app['console'] = function() use ($app) {
1718
$application = new ConsoleApplication(
1819
$app,
1920
$app['console.project_directory'],
@@ -24,7 +25,7 @@ public function register(Application $app)
2425
$app['dispatcher']->dispatch(ConsoleEvents::INIT, new ConsoleEvent($application));
2526

2627
return $application;
27-
});
28+
};
2829
}
2930

3031
public function boot(Application $app)

0 commit comments

Comments
 (0)