diff --git a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache index f406ba075cff..c698d8da8ce0 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache @@ -19,6 +19,7 @@ namespace {{controllerPackage}}; +use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use {{servicePackage}}\SerializerInterface; @@ -32,7 +33,7 @@ use {{servicePackage}}\ValidatorInterface; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Controller +class Controller extends BaseController { protected $validator; protected $serializer; diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php index 5081ae4ec39c..e50111d6b38d 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php @@ -29,6 +29,7 @@ namespace OpenAPI\Server\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use OpenAPI\Server\Service\SerializerInterface; @@ -42,7 +43,7 @@ * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Controller +class Controller extends BaseController { protected $validator; protected $serializer;