Nglm
Nglm

Reputation: 1

Symfony Deprecated : Return type of Knp

When switching to prod mode in .env (with DEBUG=0), I have this error :

Error picture

I can't neither solve it nor remove it. I'm in version 5.3.16 for Symfony, 8.1.3 for php and in composer.json I have: knplabs/knp-paginator-bundle": "v5.8.0"

Can anyone help me?

Upvotes: -1

Views: 180

Answers (1)

IndyDevGuy
IndyDevGuy

Reputation: 176

Unfortunately the deprecation notices you see are from the third party KNP bundle you are using. The only true way to make these permanently go away (without any tricks) is for the code to be updated.

You should at least be able to suppress these notices with PHP error_reporting or like you mentioned with logs.

You could fork their repo on github, fix the code and then create a merge request.

Hope this helps!

Upvotes: 1

Related Questions