Fix GrumPHP config paths for global dev-tools sync#295
Conversation
|
🚀 Preview is available for this pull request. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2ef340b0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| $composerJsonData['extra'] = $extra; | ||
| $composerJsonData['extra'] = $this->managedConfigPathSynchronizer->synchronize( | ||
| $extra, | ||
| \dirname($file), |
There was a problem hiding this comment.
Normalize composer.json base directory before sync
updatedComposerJsonContents() passes dirname($file) directly into ManagedConfigPathSynchronizer::synchronize(). With the default --file value (composer.json), this becomes . (a relative path), and isManagedConfigPath() then calls Path::makeRelative() with an absolute managed path and a relative base path, which raises InvalidArgumentException. In practice this causes default update-composer-json/dev-tools:sync runs to fail instead of updating metadata.
Useful? React with 👍 / 👎.
Related Issue
Closes #288
Motivation / Context
Changes
Verification
Documentation / Generated Output
Changelog
Reviewer Notes