Skip to content

Fix global GrumPHP hook fallback rendering#306

Merged
coisa merged 7 commits intomainfrom
bugfix/305-global-grumphp-hook-fallback
Apr 30, 2026
Merged

Fix global GrumPHP hook fallback rendering#306
coisa merged 7 commits intomainfrom
bugfix/305-global-grumphp-hook-fallback

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 30, 2026

Related Issue

Closes #305

Motivation / Context

  • keep globally synced Git hooks from passing an absolute packaged grumphp.yml path into the consumer's local vendor/bin/grumphp.phar
  • make the managed fallback path safe for both local dependency installs and global DevTools installs

Changes

  • add a DevToolsPathResolver helper that renders packaged paths relative to the consumer project root
  • render the managed GrumPHP hook placeholder through that relative-path helper during git-hooks sync
  • extend hook/path resolver regression coverage and update docs plus CHANGELOG.md

Verification

  • composer dev-tools
  • Focused command(s):
    • composer dev-tools tests -- --filter='(DevToolsPathResolverTest|HookContentRendererTest|GitHooksCommandTest|PackagedHooksTest)'
    • composer dev-tools code-style
    • composer dev-tools phpdoc
  • Manual verification:

Documentation / Generated Output

  • README updated
  • docs/ updated
  • Generated or synchronized output reviewed

Changelog

  • Added a notable CHANGELOG.md entry

Reviewer Notes

  • .github/wiki was already dirty in the local checkout and was intentionally left out of this branch

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7365228630

ℹ️ 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".

Comment thread src/Console/Command/GitHooksCommand.php Outdated
@coisa
Copy link
Copy Markdown
Contributor Author

coisa commented Apr 30, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35cbaa08ce

ℹ️ 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".

Comment thread src/Path/DevToolsPathResolver.php Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19a2d5c069

ℹ️ 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".

Comment thread src/Console/Command/GitHooksCommand.php
@coisa coisa merged commit ccfecaf into main Apr 30, 2026
39 checks passed
@coisa coisa deleted the bugfix/305-global-grumphp-hook-fallback branch April 30, 2026 04:59
@github-project-automation github-project-automation Bot moved this from Backlog to Released in PHP Fast Forward Project Apr 30, 2026
github-actions Bot added a commit that referenced this pull request Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Fix global GrumPHP hook fallback using an invalid packaged config path

1 participant