Update dependencies to address security advisories, #PG-5387 - #644
Merged
Conversation
AltamashShaikh
approved these changes
Aug 20, 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.
Description
Brings the Matomo 6 line up to the same dependency versions as
5.x-dev, which fixed several security advisories in #641. Without this the Matomo 6 release would ship the vulnerable versions.This PR is based on
prepare6x, not6.x-dev, and should merge into #639. The regenerated tree has to be built against the PHP floor the plugin will actually have: #639 raises it from>=7.2.5to>=8.1.0, so building on6.x-devtoday would produce a tree transpiled for PHP 7.2 that #639 then invalidates.It is deliberately not a cherry-pick of the 5.x commit. That commit's
vendor/prefixedtree is php-scoper output for a PHP 7.2 floor — it shipssymfony/polyfill-php80and a Rector downgrade to PHP 7.3, neither of which belongs at 8.1. The tree here was regenerated from scratch.What changed:
composer.json— apiclient^2.15.3→^2.19.4, apiclient-services^0.224.1→^0.454.0, guzzle7.10.1→7.15.3, psr72.10.4→2.13.0, phpseclib3.0.52→3.0.56. The explicitparagonie/constant_time_encodingpin is dropped, matching 5.x — it remains as a transitive dependency. The PHP floor stays asprepare6xsets it.scoper.inc.php— taken from5.x-dev, carrying the patchers written for Update dependencies to address security advisories, #PG-5387 #641: prefixing phpseclib class names held in string literals, keeping PHP'sOverrideattribute global, and moving scoped attributes onto their own line.config/config.php— loads the scopedtrigger_deprecation()directly. Composer keys file-autoloading by a hash of package and path, identical across every plugin scoping the same package, so only the first plugin to load gets its copy; psr7 2.13 calls the function unconditionally. The 5.x change also guards the php80 polyfill for the same reason, which is dead code at this PHP floor and is left out..github/workflows/min-php-lint.yml— lints every scoped file against the minimum PHP, since tests only parse a file when something loads it. Set to 8.1 here rather than 5.x's 7.2.vendor/prefixed/**and the autoloader metadata — regenerated.config.platform.phpis now pinned to this branch's minimum PHP. Without it Composer resolves against whatever PHP the developer happens to run — mine was 8.3 — and silently produces a lock that will not install on the minimum the plugin declares. That is what broke PHPCS on the first push here:ramsey/uuidpulled inbrick/math0.18, which requires PHP 8.2, socomposer requirefailed outright on CI's 8.1. With the pin it resolves tobrick/math0.13.1 and the CI step passes.No Rector downgrade is needed once resolution is correct. The intermediate commit on this branch applied one at
DOWN_TO_PHP_81, because the bad lock had put PHP 8.2'sfinal readonly classinto the scoped tree; the re-scope after fixing resolution removes the need entirely, and a dry run now changes nothing but trailing whitespace. The README's Rector snippet is still updated toDOWN_TO_PHP_81, since that is the correct level for this line if a future dependency ever does need it, and it now also documents the platform pin. The config itself is deliberately not committed, as the README already says it belongs in a separate project.Verified after regenerating: no unprefixed
GuzzleHttp,phpseclib3,Google,Firebase,PsrorSymfony\Polyfillnamespace remains undervendor/prefixed, every installed package has a scoped counterpart, all 2211 files in the scoped tree passphp -lon PHP 8.1 itself rather than on a newer local PHP,composer updatereports no remaining advisories, and the exactcomposer require matomo-org/matomo-coding-standardsstep that PHPCS failed on was replayed inside a PHP 8.1 container and succeeds. The autoloader still emits the pre-existing ambiguous-class warnings forgoogle/common-protos, which ships the same metadata classes under two paths; that is unchanged by this PR.Issue No
PG-5387, on the 6.x line. Equivalent of #641.
Steps to Replicate the Issue
composer.jsonon5.x-devand the 6.x line.Checklist