Skip to content

Commit

Permalink
Replace deprecated Controller with new one
Browse files Browse the repository at this point in the history
  • Loading branch information
ossinkine committed Feb 13, 2019
1 parent b6c2266 commit b45453e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace {{controllerPackage}};

use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use {{servicePackage}}\SerializerInterface;
Expand All @@ -33,7 +33,7 @@ use {{servicePackage}}\ValidatorInterface;
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
class Controller extends BaseController
class Controller extends AbstractController
{
protected $validator;
protected $serializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"ext-mbstring": "*",
"symfony/validator": "*",
"jms/serializer-bundle": "^2.0",
"symfony/framework-bundle": "^2.3|^3.0|^4.1"
"symfony/framework-bundle": "^3.3|^4.1"
},
"require-dev": {
"phpunit/phpunit": "~4.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
- [setValidator, ['@{{bundleAlias}}.service.validator']]
- [setApiServer, ['@{{bundleAlias}}.api.api_server']]
tags: ['controller.service_arguments']
autowire: true

{{/operations}}
{{/apis}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

namespace OpenAPI\Server\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use OpenAPI\Server\Service\SerializerInterface;
Expand All @@ -43,7 +43,7 @@
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
class Controller extends BaseController
class Controller extends AbstractController
{
protected $validator;
protected $serializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ services:
- [setValidator, ['@open_apiserver.service.validator']]
- [setApiServer, ['@open_apiserver.api.api_server']]
tags: ['controller.service_arguments']
autowire: true

open_apiserver.controller.store:
class: OpenAPI\Server\Controller\StoreController
Expand All @@ -34,6 +35,7 @@ services:
- [setValidator, ['@open_apiserver.service.validator']]
- [setApiServer, ['@open_apiserver.api.api_server']]
tags: ['controller.service_arguments']
autowire: true

open_apiserver.controller.user:
class: OpenAPI\Server\Controller\UserController
Expand All @@ -42,4 +44,5 @@ services:
- [setValidator, ['@open_apiserver.service.validator']]
- [setApiServer, ['@open_apiserver.api.api_server']]
tags: ['controller.service_arguments']
autowire: true

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ext-mbstring": "*",
"symfony/validator": "*",
"jms/serializer-bundle": "^2.0",
"symfony/framework-bundle": "^2.3|^3.0|^4.1"
"symfony/framework-bundle": "^3.3|^4.1"
},
"require-dev": {
"phpunit/phpunit": "~4.8",
Expand Down

0 comments on commit b45453e

Please sign in to comment.