Closed muratbinerbay closed 6 months ago
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
recheck
@kingjia90 on v2.2.0 the formValue
has protected access. I reverted last 2 commits to what @blankse suggested.
https://github.com/gotenberg/gotenberg-php/blob/main/src/MultipartFormDataModule.php#L92
@muratbinerbay @kingjia90 The formValue is only in 1.1.8 public.
See:
https://github.com/gotenberg/gotenberg-php/commit/33298eb81eb8e63fb0aaca71607f98b553a3bb50
https://github.com/gotenberg/gotenberg-php/commit/993384d30dadc6cb74b8e2daa1355756f9fbf331
So we need to bump the version in composer, right?
"gotenberg/gotenberg-php": "^1.1.8 || ^2.2",
So many plot twists 😄 Thank you for the changes. It seems that PHPStan is triggering some false positive i guess, do we need to mute these?
@kingjia90 Yes PhpStan doesn't want the formValue method because it is protected in 2.2. But it isn't reachable there.
@blankse @kingjia90 do we want to try something like ReflectionMethod. Seems rather excessive to me but I'm willing to try it :)
Doesn't work :(
I think we need the same construct like in pimcore/pimcore. We have there a own phpstan config for lowest with reportUnmatchedIgnoredErrors: false
:
https://github.com/pimcore/pimcore/blob/11.x/phpstan-lowest.neon
So we can create a phpstan baseline with the highest dependencies.
Of course, we could also process the metadata with version 2.2 only, if that is an alternative :)
Of course, we could also process the metadata with version 2.2 only, if that is an alternative :)
would also be acceptable in my opinion, @kingjia90 what do you think?
That would be also fine to me, no any objection, but it seems that then it would need a doc or changelog entry (as example) to better explain that "difference" (that metadata is available only if you use gotenberg-php 2.2+ )
maybe let's have a final confirmation by @fashxp first on how to proceed
Hi @kingjia90 @fashxp, just wanted to ping you to check if I can go ahead and make the metadata available only for gotenberg-php:2.2+ ? Thanks!
Thank you for your patience @muratbinerbay !
I think it would be fine to support metadata only for 2.2+ and we can proceed with that, we also have a similar situation with the screenshot feature in 2.0 and it's "diverging" more and more in what one version can do and what not, so at some point we just need to properly document the difference and recommend to use the latest when possible.
This will let us pass metadata to the PDF file like title, author, copyright, and creation date.
Documentation links: