From 2b41fb58143b9c60c0407c246fe5a503ff0e720b Mon Sep 17 00:00:00 2001 From: Gl0bal Date: Mon, 24 Jul 2017 01:22:54 +0200 Subject: [PATCH] Adds support for silex 2 --- src/Mashkin/RecaptchaServiceProvider.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Mashkin/RecaptchaServiceProvider.php b/src/Mashkin/RecaptchaServiceProvider.php index 6ed1fe1..ec6d70b 100644 --- a/src/Mashkin/RecaptchaServiceProvider.php +++ b/src/Mashkin/RecaptchaServiceProvider.php @@ -8,23 +8,23 @@ namespace Mashkin; -use Silex\Application; -use Silex\ServiceProviderInterface; +use Pimple\Container; +use Pimple\ServiceProviderInterface; class RecaptchaServiceProvider implements ServiceProviderInterface { - public function register (Application $app) + public function register(Container $app) { $app['recaptcha.streamContext'] = null; - $app['recaptcha'] = $app->share(function () use ($app) { + $app['recaptcha'] = function () use ($app) { return new Recaptcha($app['recaptcha.sitekey'], $app['recaptcha.secret'], $app['locale'], $app['recaptcha.streamContext']); - }); + }; } - public function boot (Application $app) + public function boot (Container $app) {} }