Skip to content

Commit

Permalink
[PHP-Symfony] Fix Symfony warning on OpenAPIServerBundle (#15960)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gturri authored Jul 2, 2023
1 parent 50d8e78 commit 7572e73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use {{invokerPackage}}\DependencyInjection\Compiler\{{bundleName}}ApiPass;
*/
class {{bundleClassName}} extends Bundle
{
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new {{bundleName}}ApiPass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
class OpenAPIServerBundle extends Bundle
{
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new OpenAPIServerApiPass());
}
Expand Down

0 comments on commit 7572e73

Please sign in to comment.