nextcloud / nextcloud/office

psalm-matrix.yml installs OCP compat-matrix version into root vendor, not vendor-bin/nextcloud-ocp

Open
#131 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage medium
Dominant language
JavaScript
Stars
6
Forks
1
Avg merge
1d 3h
Merged PRs (30d)
10

Description

TL;DR: Since #128 moved nextcloud/ocp:dev-master into vendor-bin/nextcloud-ocp/composer.json (bamarni composer-bin-plugin pattern), .github/workflows/psalm-matrix.yml still installs its OCP compat-matrix version into the root vendor tree, while the bamarni-managed dev-master install lives in vendor-bin/nextcloud-ocp/vendor. psalm.xml's extraFiles now lists both locations, so psalm scans two copies of nextcloud/ocp. Harmless today because the matrix currently resolves to a single entry (dev-master, since appinfo/info.xml pins one Nextcloud version), so both copies are identical — but once the matrix widens to more than one OCP version, which copy psalm actually analyzes becomes unspecified.

Detail
  • psalm-matrix.yml "Install dependencies" step:
    composer remove nextcloud/ocp --dev --no-scripts
    composer i
    composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies
    
    This installs the matrix version at root. The composer remove step is now a no-op (nextcloud/ocp is not required in your composer.json and has not been removed — confirmed non-fatal in CI logs), since root no longer requires it after #128.
  • Meanwhile composer install (invoked via the bamarni plugin, or directly) installs dev-master under vendor-bin/nextcloud-ocp/vendor, and psalm.xml's extraFiles now includes both:
    <extraFiles>
        <directory name="vendor"/>
        <directory name="vendor-bin/nextcloud-ocp/vendor"/>
    </extraFiles>
    
  • Suggested fix: switch the psalm-matrix install step to use the bamarni-aware command consistently, e.g. composer bin nextcloud-ocp require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' ..., and drop the now-dead composer remove nextcloud/ocp --dev --no-scripts lines in both psalm-matrix.yml and lint-php-cs.yml.
  • Found during review of #128/#130 dependency chain.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/workflows/psalm-matrix.yml and lint-php-cs.yml, focusing on their dependency-install steps and the bamarni composer-bin setup described in the issue. Check the resulting vendor paths and Psalm's extraFiles configuration; done means the matrix version is installed in the intended vendor-bin/nextcloud-ocp location without duplicate root installation, and the affected CI jobs pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, php
Domain
ci-cd, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.