Open epalmans opened 2 months ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
thanks for approving.... but a bit reluctant to see it merged&tagged though due to this: https://github.com/openfoodfacts/openfoodfacts-php/pull/53#issuecomment-2159967859
Add the user-agent as first parameter help us to force developer to add it, if it was the last, it will never used. You can create a 0.4.0 version.
-- @teolemon what did you think ? Force developer to add user agent (but it could use the same) or move it to last parameter with default value (it will be probably the same for all developer)
@Benoit382 Just my two cents: if you change the order of the parameters - you break every implementation using the current library and to follow semantic versioning - you might consider doing this only with a new major release. (I know it is still on a 0.x version - but this is not really a nice way of changing things)
Every code using this library will then have to adapt - please consider - also the laravel plugin of @epalmans
another thought... we could keep the constructor like it was before, but now check for the User-Agent request header. Then, if it's missing, return a 403 with an errormessage?
@Benoit382 I don't have massive opinions. We proposed that as we were overwhelmed with queries. I would assume that a developer has fixed/pinned dependancies, and will spot the issue on updating as the SDK will spit out an error in his/her console or the CI. That will entice them to provide some info about his/her app/service (or worst case put bogus info) We should definitely provide a easy to apply sample that takes 1 min to adapt (MySuperApp contact@mysuperapp.com v1.53 )
(and sorry for the delay, I was in holidays last week)
What
Use of
ext-gd
appears to only be required in tests (throughimagepng()
call), introduced in https://github.com/openfoodfacts/openfoodfacts-php/pull/47. Therefore, proposing to move from require to require-devFixes bug(s)