Skip to content

Add composer-config input to module CI#1067

Merged
mikelittle merged 1 commit into
masterfrom
add-composer-config-input
May 21, 2026
Merged

Add composer-config input to module CI#1067
mikelittle merged 1 commit into
masterfrom
add-composer-config-input

Conversation

@mikelittle
Copy link
Copy Markdown
Contributor

Summary

Adds a new optional composer-config input to module-ci.yml, a sibling of the existing module-config input but operating on top-level composer.json keys (e.g. repositories) rather than extra.altis.modules.

The caller passes a JSON object that is shallow-merged into the test-root composer.json before the per-package vcs entry is auto-added later in the same step.

Motivation

altis/advanced-security depends on wpackagist-plugin/patchstack. The wpackagist repository is not configured by altis/skeleton — we are intentionally waiting for the plugin to be published on Packagist proper rather than wiring wpackagist into the skeleton's repositories.

Without a way for the caller to inject the wpackagist source for its own CI, composer could not resolve the dep and the package-under-test injection failed:

Could not find package altis/skeleton with version dev-gha-module-update.
Running composer update altis/advanced-security --with-all-dependencies
##[error]Your requirements could not be resolved to an installable set of packages.

After this PR lands, altis/advanced-security's .github/workflows/ci.yml can pass:

with:
  altis-package: altis/advanced-security
  composer-config: '{"repositories":{"wpackagist":{"type":"composer","url":"https://wpackagist.org"}}}'

and the package-under-test injection step will succeed.

Format note

Use the object form for repositories ({"name": {...}}), not the array form ([{...}]). The workflow auto-adds repositories.$ALTIS_PACKAGE as a keyed entry later in the same step — keeping the caller's input in object form avoids the array/object mismatch composer would otherwise warn about.

Test plan

  • Self-CI on this PR (uses the relative-path form in dev-tools' own ci.yml) verifies the new input doesn't break the default codepath.
  • Once merged: re-pin the 12 module pin-PRs to this SHA + update altis-advanced-security's caller to pass the wpackagist injection; observe the package-under-test injection succeed.

Sibling of module-config but operates on top-level composer.json keys
rather than extra.altis.modules. Callers pass a JSON object that is
shallow-merged into the test-root composer.json before the per-package
vcs entry is added.

Motivating case: altis/advanced-security depends on wpackagist-plugin/patchstack.
The wpackagist repository is not configured by altis/skeleton (kept that
way pending patchstack publication on Packagist proper). The previous
workflow had no way for the caller to inject the wpackagist source for
its own CI, so composer could not resolve the dep and the package-under-
test injection failed.

Now the caller can pass:

    composer-config: '{"repositories":{"wpackagist":{"type":"composer","url":"https://wpackagist.org"}}}'

Use object form (named keys), not array form, so the merged result coexists
with the auto-added `repositories.$ALTIS_PACKAGE` vcs entry composer adds
later in the same step.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mikelittle mikelittle merged commit 088bce7 into master May 21, 2026
1 of 2 checks passed
@mikelittle mikelittle deleted the add-composer-config-input branch May 21, 2026 16:17
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.

2 participants