forked from loafle/openapi-generator-original
[PHP-Symfony] Fix Symfony warning on OpenAPIServerBundle (#15960)
This fixes this Symfony warning: User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "OpenAPI\Server\OpenAPIServerBundle" now to avoid errors or add an explicit @return annotation to suppress this message This fixes #15959
This commit is contained in:
parent
50d8e7820b
commit
7572e73b8e
@ -33,7 +33,7 @@ use {{invokerPackage}}\DependencyInjection\Compiler\{{bundleName}}ApiPass;
|
|||||||
*/
|
*/
|
||||||
class {{bundleClassName}} extends Bundle
|
class {{bundleClassName}} extends Bundle
|
||||||
{
|
{
|
||||||
public function build(ContainerBuilder $container)
|
public function build(ContainerBuilder $container): void
|
||||||
{
|
{
|
||||||
$container->addCompilerPass(new {{bundleName}}ApiPass());
|
$container->addCompilerPass(new {{bundleName}}ApiPass());
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ use OpenAPI\Server\DependencyInjection\Compiler\OpenAPIServerApiPass;
|
|||||||
*/
|
*/
|
||||||
class OpenAPIServerBundle extends Bundle
|
class OpenAPIServerBundle extends Bundle
|
||||||
{
|
{
|
||||||
public function build(ContainerBuilder $container)
|
public function build(ContainerBuilder $container): void
|
||||||
{
|
{
|
||||||
$container->addCompilerPass(new OpenAPIServerApiPass());
|
$container->addCompilerPass(new OpenAPIServerApiPass());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user