Commit graph

12 commits

Author SHA1 Message Date
Vitor Mattos
e59f67736e
chore: changes after code review
https://github.com/LibreSign/libresign/pull/5494#discussion_r2396380424

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 22:09:47 -03:00
Vitor Mattos
7d085d9c52
fix: patcher for mpdf
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 21:44:39 -03:00
Vitor Mattos
95caa3bbcd
fix: revert wrong file remove
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 14:24:56 -03:00
Vitor Mattos
5d89aefcdf
fix: create patcher for pdfparser
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 14:14:49 -03:00
Vitor Mattos
4daa2f222e
fix: cs
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 13:21:28 -03:00
Vitor Mattos
a5640d8279
chore: remove comment
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 13:20:15 -03:00
Vitor Mattos
b8267b0042
fix: patcher for phpseclib
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 13:18:32 -03:00
Vitor Mattos
a9dc208932
fix: patchers for mpdf
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 12:03:27 -03:00
Vitor Mattos
43d4691cda
fix: apply cs
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 12:03:26 -03:00
Vitor Mattos
f38574a311
fix: twig
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 12:03:26 -03:00
Vitor Mattos
e407305967
fix: isolate all dependencies
prevent conflicts with other apps

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-10-01 12:03:26 -03:00
Vitor Mattos
07a231aea2
fix: isolate PHP-pdftk dependency
I identified some issues with the follow log:

```
[PHP] Warning: include(): Failed opening '<redacted>/apps/richdocuments/vendor/composer/../mikehaertl/php-pdftk/src/Pdf.php' for inclusion (include_path='<redacted>/3rdparty/pear/archive_tar:/<redacted>/3rdparty/pear/console_getopt:<redacted>/3rdparty/pear/pear-core-minimal/src:/<redacted>/3rdparty/pear/pear_exception:/<redacted>/apps') at /<redacted>/lib/composer/composer/ClassLoader.php#576
	GET /ocs/v2.php/apps/libresign/api/v1/file/validate/file_id/2556
```

It's only occurr when use the app richdocuments, I saw that the package
mikehaertl/php-pdftk also is used by this app and because this the
autoload was mixed.

To solve this issue I used the package humbug/php-scoper that isolate
the dependency into a different namespace.

I also followed this article:

https://arthur-schiwon.de/isolating-nextcloud-app-dependencies-php-scoper

And the follow search results to see implementation examples:

https://github.com/search?q=OCA+path%3Ascoper.inc.php&type=code
https://github.com/search?q=org%3Anextcloud+path%3Ascoper.inc.php&type=code

Considering that we already have tests to cover the usage of pdftk,
isn't necessary to add new tests, if the test pass, this change worked
fine because loaded the isolated packages and the isolated packages made
the necessary.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-09-03 09:55:55 -03:00