Skip to content

Update jsignpdf-php in LibreSign 3rdparty #8411

Description

@vitormattos

Context

LibreSign ships PHP dependencies through the LibreSign/3rdparty submodule.

The jsignpdf/jsignpdf-php package is currently included there, but the locked version is still v3.0.0.

New upstream work adds the JSignPdf 3.2.0 runtime and the typed API required for existing PDF signature fields.

LibreSign should update its vendored jsignpdf-php package only after that upstream work is available in a released package version.

Dependencies

This issue is blocked by:

Both upstream issues need to be completed and included in a released jsignpdf/jsignpdf-php version before this dependency update can be finished.

Do not start the final dependency bump using an arbitrary development commit only to bypass these blockers.

Goal

Update jsignpdf/jsignpdf-php in LibreSign/3rdparty to a released version that includes the required upstream changes, then update the 3rdparty submodule reference in LibreSign.

This issue is only about updating the vendored dependency.

Do not implement existing signature-field support in LibreSign here.

Current state

LibreSign/3rdparty currently requires:

"jsignpdf/jsignpdf-php": "^3.0.0"

and the current composer.lock resolves:

v3.0.0

The update must use a released version that contains both upstream changes listed in the Dependencies section.

Update LibreSign/3rdparty

Follow the update process documented in:

https://github.com/LibreSign/3rdparty/blob/main/README.md

In the LibreSign/3rdparty repository:

  1. update the jsignpdf/jsignpdf-php version constraint if required;
  2. run:
composer update jsignpdf/jsignpdf-php
  1. remove the generated dependency directories as described in the README:
rm -rf ./composer/*/ ./vendor/*/
  1. regenerate the vendored dependencies:
composer install --no-dev
  1. clean ignored generated files as documented:
git clean -X -d -f
  1. regenerate the autoloader:
composer dump-autoload
  1. review the generated changes;
  2. run the available checks;
  3. open a PR in LibreSign/3rdparty.

Do not manually edit files generated under composer/.

They must be generated by the existing Composer/PHP-Scoper process.

Verify the dependency update

Confirm that:

If composer update jsignpdf/jsignpdf-php changes unrelated dependencies, review why before including them.

Update the LibreSign submodule

After the LibreSign/3rdparty PR is ready, test it from LibreSign using the process described in the same README.

Create a LibreSign branch such as:

3rdparty/jsignpdf-php

Then point the 3rdparty submodule to the commit from the LibreSign/3rdparty PR:

cd 3rdparty
git checkout <commit-sha>
cd ..
git add 3rdparty
git commit -s

Push the LibreSign branch and open a PR.

After the LibreSign/3rdparty PR is merged, update the submodule again to the merge commit and amend the LibreSign commit:

cd 3rdparty
git checkout <merge-commit-sha>
cd ..
git add 3rdparty
git commit --amend
git push --force-with-lease

Validation in LibreSign

Run the LibreSign CI with the updated 3rdparty submodule.

Existing signing behavior must continue to work.

At minimum, verify that:

  • PHP autoloading works with the scoped package;
  • existing JSignPdf-based signing tests still pass;
  • no namespace or PHP-Scoper regression is introduced;
  • existing signing behavior is unchanged.

This issue does not need to add support for existing PDF signature fields to LibreSign.

That integration belongs in a separate issue.

Scope

This issue updates the dependency only.

Do not:

  • implement getSignatureFields() usage in LibreSign;
  • change the LibreSign field domain;
  • add existing-signature-field workflow behavior;
  • change signing-engine interfaces;
  • modify upstream jsignpdf-php;
  • manually edit generated scoped dependency files.

Good first issue

The dependency update process is already documented in LibreSign/3rdparty/README.md.

The upstream implementation work is tracked separately and must be completed first.

After the blockers are resolved, the work here is mainly:

  1. update one Composer dependency;
  2. regenerate the scoped dependencies;
  3. open the LibreSign/3rdparty PR;
  4. update the LibreSign submodule pointer;
  5. validate the existing CI.

No LibreSign architecture decision is required.

If the dependency update causes unexpected compatibility or PHP-Scoper problems, report them before expanding the scope.

Done when

  • Update default JSignPdf runtime to 3.2.0 JSignPdf/jsignpdf-php#63 is completed and included in a released package version.
  • Add typed API for existing PDF signature fields JSignPdf/jsignpdf-php#62 is completed and included in a released package version.
  • LibreSign/3rdparty uses that released jsignpdf/jsignpdf-php version.
  • composer.lock contains the expected version.
  • Scoped dependencies are regenerated using the documented process.
  • No generated scoped files were manually edited.
  • The LibreSign/3rdparty PR is merged.
  • LibreSign points its 3rdparty submodule to the merged commit.
  • LibreSign CI passes with the updated dependency.
  • Existing signing behavior continues to work.
  • No existing-signature-field LibreSign behavior is implemented in this issue.

Activity

  1. added theissue type on Sep 15, 2026
  2. vikas-kushwaha-dev commented on Sep 16, 2026

    @vikas-kushwaha-dev
    Contributor

    Hi @vitormattos, I'd like to work on this issue.
    I understand that #8411 is currently blocked by JSignPdf/jsignpdf-php#63 and #62, and that the dependency update should only use a released jsignpdf/jsignpdf-php version containing both changes rather than an arbitrary development commit.
    I noticed that both upstream issues are currently open and unassigned. I'd also be interested in contributing to those blockers, starting with #63 (updating the default JSignPdf runtime to 3.2.0) and then #62 (adding the typed API for existing PDF signature fields).
    Once those changes are completed and included in a released jsignpdf/jsignpdf-php version, I can continue with #8411 by updating LibreSign/3rdparty, regenerating the scoped dependencies using the documented process, and then updating the LibreSign 3rdparty submodule reference.
    If that approach works for you, could you assign #8411 to me? I'm also happy to work on #63 and #62 upstream to help unblock it.
    Thanks!

  3. vitormattos commented on Sep 16, 2026

    @vitormattos
    MemberAuthor

    @vikas-kushwaha-dev fists, finish the contributions to JSignPdf-PHP, after this, I can assign this issue to you.

  4. vikas-kushwaha-dev commented on Sep 19, 2026

    @vikas-kushwaha-dev
    Contributor

    @vitormattos can i start working on this?

  5. moved this from 0. Backlog to 1. to do in LibreSign Roadmapon Sep 21, 2026
  6. moved this from 1. to do to 4. Done in LibreSign Roadmapon Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

backendBackend workphpWork involving PHP code

Type

Fields

Priority

Low

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions