Skip to content

fix(ci): audit PHP dependencies and pin the platform PHP to 8.2.35 - #78

Merged
oleksandr-nc merged 3 commits into
mainfrom
chore/php-8.2-baseline
Oct 22, 2026
Merged

oleksandr-nc merged 3 commits into
mainfrom
chore/php-8.2-baseline

Conversation

@oleksandr-nc

@oleksandr-nc oleksandr-nc commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Nothing in CI checked the PHP dependencies for known security advisories.

Dependencies are audited on every pull request

The psalm workflow now runs composer audit --locked. It checks composer.lock against the advisories Packagist collects from GitHub and FriendsOfPHP and fails on any advisory or abandoned package. It resolves nothing, so the PHP version plays no part in whether it passes.

The platform PHP is pinned to 8.2.35

Without config.platform.php, Composer resolved dependencies against whatever PHP ran it, so a lock file written on PHP 8.4 could pick packages that need more than the app's minimum. The pin fixes it at 8.2.35, the PHP 8.2 security release of 2026-10-21, on the lowest PHP version Nextcloud 33 supports. The pin changes composer.lock only in its hash and platform fields.

The OCP stubs follow Nextcloud 33

require-dev pinned nextcloud/ocp to dev-master, whose stubs now require PHP 8.3 like Nextcloud master, so under the pin a full composer update failed. They now follow stable33, the oldest server the app supports. The psalm workflow replaces the stubs with the server versions it analyses against, so CI is unaffected; in composer.lock only the nextcloud/ocp entry and the hash change.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Without config.platform.php, Composer resolved dependencies against
whatever PHP ran it, so a lock file written on PHP 8.4 could pick packages
that need more than the app's minimum. The pin fixes it at 8.2.35, the PHP
8.2 security release of 2026-10-21; PHP 8.2 is the lowest version Nextcloud
33 supports.

composer.lock changes only in content-hash and platform-overrides; no
locked package moves.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
Nothing in CI checked the PHP dependencies for known security advisories.

composer audit --locked checks composer.lock against the advisories
Packagist collects from GitHub and FriendsOfPHP, and fails on any advisory
or abandoned package. It resolves nothing, so the PHP version plays no part.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
require-dev pinned nextcloud/ocp to dev-master, whose stubs now require PHP
8.3 like Nextcloud master itself, so a full composer update failed against
the 8.2.35 platform PHP. The stubs now follow stable33, the oldest server
the app supports.

The psalm workflow replaces the stubs with the server versions it analyses
against, so CI is unaffected; in composer.lock only the nextcloud/ocp entry
and the hash change. The unit tests load these stubs only when they run
without a server checkout.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
@oleksandr-nc
oleksandr-nc force-pushed the chore/php-8.2-baseline branch from ea46764 to 5f1f508 Compare October 22, 2026 09:03
@oleksandr-nc
oleksandr-nc merged commit a7abd74 into main Oct 22, 2026
26 checks passed
@oleksandr-nc
oleksandr-nc deleted the chore/php-8.2-baseline branch October 22, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant