diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 5d99685..446e4a8 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -17,8 +17,9 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('token_authentication'); + + $treeBuilder = new TreeBuilder('token_authentication'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() diff --git a/Service/Listener/ExceptionListener.php b/Service/Listener/ExceptionListener.php index cbe6ee2..6836f86 100644 --- a/Service/Listener/ExceptionListener.php +++ b/Service/Listener/ExceptionListener.php @@ -3,7 +3,7 @@ namespace Youshido\TokenAuthenticationBundle\Service\Listener; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Event\ExceptionEvent; /** * Date: 2/3/16 @@ -20,13 +20,13 @@ public function __construct($tokenRequestHeader) $this->tokenRequestHeader = $tokenRequestHeader; } - public function onKernelException(GetResponseForExceptionEvent $event) + public function onKernelException(ExceptionEvent $event) { $response = new JsonResponse([ 'errors' => [ [ - 'message' => $event->getException()->getMessage(), - 'code' => $event->getException()->getCode() + 'message' => $event->getThrowable()->getMessage(), + 'code' => $event->getThrowable()->getCode() ] ] ], 200, [ diff --git a/composer.json b/composer.json index 9c1a794..08e93d7 100644 --- a/composer.json +++ b/composer.json @@ -1,24 +1,20 @@ { - "name": "youshido/token-authenticator", + "name": "ozznest/token-authenticator", "type": "symfony-bundle", "description": "Symfony bundle to allow you token based authentication", "keywords": ["token", "auth", "authentication", "symfony", "bundle"], "homepage": "https://github.com/Youshido/TokenAuthenticationBundle", "license": "MIT", - "version": "1.1.1", + "version": "1.3.1", "authors": [ { - "name": "Alexandr Viniychuk", - "email": "a@viniychuk.com" - }, - { - "name": "Portey Vasil", - "email": "portey@gmail.com" + "name": "Olexiy Chuiko", + "email": "oznest@i.ua" } ], "require": { "php": ">=5.5", - "symfony/framework-bundle": "~2.3|~3.0|~4.0" + "symfony/framework-bundle": "~2.3|~3.0|~4.0|~5.0" }, "autoload": { "psr-4": { "Youshido\\TokenAuthenticationBundle\\": "" }