sensiolabs / GotenbergBundle

A Symfony Bundle for interacting with Gotenberg. Integrates natively with twig, router, PHPStorm and more !
MIT License
21 stars 7 forks source link

Allow empty array to disable options like failOnHttpStatusCodes #76

Closed Jean-Beru closed 2 months ago

Jean-Beru commented 2 months ago
          So, I can't disable it. Maybe it will be interesting to allow `[]` as a valid value and `null` to use default.

_Originally posted by @Jean-Beru in https://github.com/sensiolabs/GotenbergBundle/pull/49#discussion_r1647548763_

Neirda24 commented 2 months ago

Maybe set to null or a method unset(string $key) WDYT ?

Jean-Beru commented 2 months ago

IMO, failOnHttpStatusCodes should consider an empty array as a correct value:

Neirda24 commented 2 months ago

ok. Must have to double check how Gotenberg behaves when sending failOnHttpStatusCodes as []. Does it behave differently than nothing sent at all ?

Jean-Beru commented 2 months ago

Sure! If Gotenberg doesn't care, this issue is useless :-/

Neirda24 commented 2 months ago

Just tried it. It works. So yes :

Checking on configuration if it is possible.