Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed : add doc blocks to silence Symfony deprecations #1922

Merged
merged 2 commits into from
Dec 11, 2021
Merged

fixed : add doc blocks to silence Symfony deprecations #1922

merged 2 commits into from
Dec 11, 2021

Conversation

encreinformatique
Copy link
Contributor

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.

Closes #1921

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.
```
@haidukua
Copy link
Contributor

haidukua commented Dec 8, 2021

@encreinformatique
mb use native PHP types)

/**
* {@inheritdoc}
*/
public function getFunctions(): array
{}

@encreinformatique
Copy link
Contributor Author

encreinformatique commented Dec 8, 2021

@encreinformatique mb use native PHP types)

@haidukua It was my first choice but I have doubts about child inheritance and PHP 7.1 (min package of this repo) as the parent function do not have type hinting.
I had in mind it was introduced in PHP 7.3. I'll check.

--
I got confused with property inheritance. All good for me then. Made the change.

@GuilhemN GuilhemN merged commit 4148dfd into nelmio:master Dec 11, 2021
@GuilhemN
Copy link
Collaborator

Nice, thank you @encreinformatique!

@encreinformatique encreinformatique deleted the patch-1 branch December 13, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Twig deprecations
3 participants