refactor(deps): move phpseclib to 3rdparty scoped vendor#7801
Merged
Conversation
phpseclib/phpseclib is now provided by the 3rdparty scoped vendor bundle (LibreSign/3rdparty) rather than as a direct Composer dependency. Changes: - Remove phpseclib/phpseclib from composer.json/composer.lock - Remove phpseclib patcher from scoper.inc.php (now in 3rdparty) - Update all namespace imports from 'phpseclib3\' to 'OCA\Libresign\Vendor\phpseclib3\' in: - lib/Handler/SignEngine/TSA.php - lib/Handler/SignEngine/Pkcs12Handler.php - lib/Handler/CertificateEngine/AEngineHandler.php (inline FQCNs) - lib/Service/Install/SignSetupService.php - lib/Command/Developer/SignSetup.php - tests/php/Unit/Handler/SignEngine/TSATest.php The 3rdparty update is tracked in LibreSign/3rdparty#65. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Point 3rdparty submodule to LibreSign/3rdparty#65 (feat/add-phpseclib) which includes the scoped phpseclib/phpseclib 3.0.55 vendor artifacts. This will be updated to the merged main commit once 3rdparty PR#65 is merged. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…tcher Points to fixed commit 54f5e8c that correctly scopes phpseclib3 dynamic class name strings using the post-scoper double-backslash patterns. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
twig, mpdf, and smalot/pdfparser were migrated to the scoped 3rdparty vendor bundle. The libresign scoper only processes its local vendor/, which no longer contains these packages. The patchers were dead code. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
The Playwright container (mcr.microsoft.com/playwright:v1.59.1-noble) does not include libgd.so.3 or libc-client.so.2007e, causing PHP's gd and imap extensions to fail on startup. This prevents occ maintenance:install from running (Nextcloud requires GD). Install the system libraries before setup-php and add imap to the PHP extensions list. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Remove manual apt install of libgd3 and libc-client2007e. shivammathur/setup-php installs system dependencies automatically when extensions are listed — gd and imap are already declared. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
setup-php reports gd/imap as Enabled because the .so files are present in the Playwright container, but does not install the underlying system libraries (libgd3, libc-client2007e) that the .so files depend on. Install them explicitly so PHP can actually load the extensions. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
All packages that required scoping (mpdf, twig, smalot/pdfparser, phpseclib) have been migrated to the LibreSign/3rdparty bundle where scoping is handled centrally. libresign's local vendor/ now only contains jeidison/signer-php (used directly with its own namespace) and psr/ (Nextcloud-provided). lib/Vendor is never built, not tracked in git, and not referenced in autoload. The scoper infrastructure is entirely dead code. Remove scoper.inc.php and vendor-bin/php-scoper/. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
Member
Author
|
/backport to stable32 |
This was referenced Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates phpseclib from a direct Composer dependency to the scoped 3rdparty vendor bundle.
Background
phpseclib was previously installed directly via Composer as
phpseclib/phpseclib. This created a namespace collision risk and was inconsistent with how other vendor libraries are handled. All vendor dependencies used by LibreSign should be scoped through LibreSign/3rdparty to avoid conflicts.The 3rdparty bundle uses PHP-Scoper to rewrite all class namespaces to
OCA\Libresign\Vendor\.Changes
composer.json/composer.lock: removephpseclib/phpseclibdirect dependencyscoper.inc.php: remove phpseclib patcher (it's now in 3rdparty'sscoper.inc.php)phpseclib3\→OCA\Libresign\Vendor\phpseclib3\lib/Handler/SignEngine/TSA.phplib/Handler/SignEngine/Pkcs12Handler.phplib/Handler/CertificateEngine/AEngineHandler.php(inline FQCNs)lib/Service/Install/SignSetupService.phplib/Command/Developer/SignSetup.phptests/php/Unit/Handler/SignEngine/TSATest.phpRelated
/composer-updateCI)