Skip to content

[codex] fix stale config during plugin update - #4

Merged
AlwinGarside merged 5 commits into
mainfrom
codex/fix-call-to-undefined-getDuplicateServiceMappingScripts
May 9, 2026
Merged

[codex] fix stale config during plugin update#4
AlwinGarside merged 5 commits into
mainfrom
codex/fix-call-to-undefined-getDuplicateServiceMappingScripts

Conversation

@AlwinGarside

Copy link
Copy Markdown
Contributor

Summary

  • guard service-mapping warnings when Composer still has the old config class loaded during plugin update
  • suppress stale service-mapping unknown-key warning in that update window
  • add an integration regression for updating from old commit 1e1b4e7

Validation

  • composer test
  • composer stan
  • DOCKER_COMPOSER_INTEGRATION=1 ./vendor/bin/phpunit --testsuite Integration --filter testServiceMappingProjectCanUpdateFromOldPluginVersion
  • composer style-fix

Composer can keep helper classes loaded from the old plugin version while eval-loading the new plugin class during an update. Guarding the new duplicate service-mapping API prevents the update from failing when projects already use service-mapping.

Add an integration regression that installs the old plugin commit and updates to the current package.
The regression installed the old plugin from the local checkout as a VCS repository, but GitHub Actions checks out pull requests as shallow detached merge refs without usable branch or tag metadata.

Use the canonical GitHub VCS repository for the old install and keep the local path repository for the update under test.
Composer 1 does not provide the minimal-changes require option used by the regression. Build the require command from the active integration Composer version so the update path is still covered across the CI matrix.
Pinned Composer versions in the integration matrix do not all support the require --minimal-changes option. Keep that option for the floating current Composer v2 case and use the broadly supported require command for historical versions.
@AlwinGarside
AlwinGarside force-pushed the codex/fix-call-to-undefined-getDuplicateServiceMappingScripts branch 4 times, most recently from eab8c9a to a772d52 Compare May 9, 2026 22:21
@AlwinGarside
AlwinGarside force-pushed the codex/fix-call-to-undefined-getDuplicateServiceMappingScripts branch from a772d52 to d0fac23 Compare May 9, 2026 22:25
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Code Coverage Summary (ubuntu)

Code Coverage

Package Line Rate Branch Rate Health
ComposerProcessRunner.php 100% 100%
DockerComposeCommandBuilder.php 100% 100%
DockerComposerConfig.php 100% 100%
DockerComposerPlugin.php 100% 100%
EnvironmentContainerDetector.php 100% 100%
Summary 100% (324 / 324) 100% (0 / 0)

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Code Coverage Summary (windows)

Code Coverage

Package Line Rate Branch Rate Health
ComposerProcessRunner.php 100% 100%
DockerComposeCommandBuilder.php 100% 100%
DockerComposerConfig.php 100% 100%
DockerComposerPlugin.php 100% 100%
EnvironmentContainerDetector.php 100% 100%
Summary 100% (324 / 324) 100% (0 / 0)

@AlwinGarside
AlwinGarside marked this pull request as ready for review May 9, 2026 22:27
@AlwinGarside AlwinGarside self-assigned this May 9, 2026
@AlwinGarside
AlwinGarside merged commit 0334f89 into main May 9, 2026
25 checks passed
@AlwinGarside
AlwinGarside deleted the codex/fix-call-to-undefined-getDuplicateServiceMappingScripts branch May 9, 2026 22:41
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