Skip to content

Use resilient GrumPHP binary resolution in packaged git hooks #331

@coisa

Description

@coisa

Context

Current packaged hooks invoke vendor/bin/grumphp.phar directly. This fails for global installs of fast-forward/dev-tools, where local repository vendor/ may not contain that phar.

Goal

Make hook invocation path-agnostic so hooks work in both local and global DevTools setups.

Acceptance criteria

  • Hook templates no longer use a hardcoded vendor/bin/grumphp.phar path.
  • Hooks first prefer local ./vendor/bin/grumphp when available.
  • Hooks fall back to ./vendor/bin/grumphp.phar for compatibility.
  • Hooks fall back to grumphp from PATH when no local executable exists.
  • Existing local/managed config behavior (./grumphp.yml > managed config fallback) is unchanged.
  • Add/update tests/docs if hook-template expectations change.

Relation

This is an intermediate fix prior to full extraction for #296.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Merged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions