Skip to content

Make install work and read the config where it is registered - #13

Merged
imanimanyara merged 1 commit into
mainfrom
fix/read-config-at-registered-key
Oct 3, 2026
Merged

imanimanyara merged 1 commit into
mainfrom
fix/read-config-at-registered-key

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Two defects stopped the package working at all. The shipped config named
the hook command Simtabi\GitCommitChecker\Commands\PreCommitHookCommand, a
namespace the package never had, so install aborted with "Class [...] not
found". And both commands read the bare git-commit-checker key while the
provider registers laranail.git-commit-checker. On an unpublished install,
install iterated no hooks and the hook always reported itself disabled.

The config now names the real class. Both commands read through one helper
that prefers laranail.git-commit-checker and still honours a config
published to the old bare path, as a deprecated fallback. The publish tag
now writes config/laranail/git-commit-checker.php.

Tests cover the class existing, the hook running when enabled and skipping
when disabled at the registered key, and the legacy override. The class and
enabled tests failed before the fix. The README gains its Quick start.

Two defects stopped the package working at all. The shipped config named
the hook command Simtabi\GitCommitChecker\Commands\PreCommitHookCommand, a
namespace the package never had, so install aborted with "Class [...] not
found". And both commands read the bare git-commit-checker key while the
provider registers laranail.git-commit-checker. On an unpublished install,
install iterated no hooks and the hook always reported itself disabled.

The config now names the real class. Both commands read through one helper
that prefers laranail.git-commit-checker and still honours a config
published to the old bare path, as a deprecated fallback. The publish tag
now writes config/laranail/git-commit-checker.php.

Tests cover the class existing, the hook running when enabled and skipping
when disabled at the registered key, and the legacy override. The class and
enabled tests failed before the fix. The README gains its Quick start.
Copilot AI balanced review requested due to automatic review settings October 3, 2026 08:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@imanimanyara
imanimanyara merged commit 89a41df into main Oct 3, 2026
6 checks passed
@imanimanyara
imanimanyara deleted the fix/read-config-at-registered-key branch October 3, 2026 08:32
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