Skip to content

Commit

Permalink
Fix deprecation warning for native return types
Browse files Browse the repository at this point in the history
Method "Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension()" might add "?ExtensionInterface" as a native return type declaration in the future. Do the same in child class "Ibericode\Vat\Bundle\VatBundle" now to avoid errors or add an explicit @return annotation to suppress this message.

https://wouterj.nl/2021/09/symfony-6-native-typing
  • Loading branch information
arneee authored Jan 7, 2022
1 parent 1b0080a commit 2634766
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/VatBundle.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
namespace Ibericode\Vat\Bundle;

use Ibericode\Vat\Bundle\DependencyInjection\VatExtension;
use Ibericode\Vat\Bundle\DependencyInjection\VatExtension;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;

class VatBundle extends \Symfony\Component\HttpKernel\Bundle\Bundle
{
public function getContainerExtension()
public function getContainerExtension() : ?ExtensionInterface
{
return new VatExtension();
}
}
}

0 comments on commit 2634766

Please sign in to comment.