Skip to content

Commit

Permalink
fixed : add doc blocks to silence Symfony deprecations (#1922)
Browse files Browse the repository at this point in the history
* fixed : add doc blocks to silence Symfony deprecations

Symfony 5.4 returning deprecations about 
```
User Deprecated: Method "Twig\Extension\ExtensionInterface::getFunctions()" might add "array" as a native return type declaration in the future.
Do the same in implementation "Nelmio\ApiDocBundle\Render\Html\GetNelmioAsset" now to avoid errors or add an explicit @return annotation to suppress this message.
```

* fixed : native hint
  • Loading branch information
encreinformatique committed Dec 11, 2021
1 parent 82bb3cb commit 4148dfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Render/Html/GetNelmioAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(AssetExtension $assetExtension)
$this->resourcesDir = __DIR__.'/../../Resources/public';
}

public function getFunctions()
public function getFunctions(): array
{
return [
new TwigFunction('nelmioAsset', $this, ['is_safe' => ['html']]),
Expand Down

0 comments on commit 4148dfd

Please sign in to comment.