Skip to content

Run Rector from the Claude Code setup; drop redundant root user from the release workflow#57

Merged
turegjorup merged 3 commits into
developfrom
ci/rector-claude-hook
Jul 9, 2026
Merged

Run Rector from the Claude Code setup; drop redundant root user from the release workflow#57
turegjorup merged 3 commits into
developfrom
ci/rector-claude-hook

Conversation

@turegjorup

@turegjorup turegjorup commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Two small tooling changes.

Rector in the Claude Code setup (mirrors event-database-imports#107)

The Rector CI gate + Taskfile targets already landed here in the Rector PR; this adds the Claude-integration parts:

  • .claude/settings.jsonPostToolUse hook runs rector process on edited src//tests/ PHP before php-cs-fixer.
  • .claude/agents/pr-readiness.md — adds a Rector (dry-run) step after PHPStan.
  • CLAUDE.md — lists Rector in the PostToolUse description.

Drop redundant root user from the release workflow (mirrors devops_itkdev-docker#116)

phpfpm runs as ${COMPOSE_USER:-deploy}, so build_release.yml's --user=root — and the COMPOSER_ALLOW_SUPERUSER that paired with it — were redundant. Set COMPOSE_USER: runner at the workflow level, drop both, keep APP_ENV inline via -e APP_ENV=prod.

Mirror event-database-imports#107's Claude integration for Rector (the CI
gate and Taskfile targets already landed in the Rector PR):

- PostToolUse hook runs `rector process` on the edited src/tests PHP file
  before php-cs-fixer, so single-file edits are modernized then formatted.
- pr-readiness agent gains a Rector (dry-run) check mirroring the CI gate.
- CLAUDE.md notes Rector in the PostToolUse list.
@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.89%. Comparing base (d4463c7) to head (63839c8).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #57   +/-   ##
==========================================
  Coverage      72.89%   72.89%           
  Complexity       232      232           
==========================================
  Files             29       29           
  Lines            653      653           
==========================================
  Hits             476      476           
  Misses           177      177           
Flag Coverage Δ
unittests 72.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Mirror devops_itkdev-docker#116: the phpfpm service runs as
${COMPOSE_USER:-deploy}, so the release job's `--user=root` (and the
`COMPOSER_ALLOW_SUPERUSER` that paired with it) are redundant. Set
`COMPOSE_USER: runner` at the workflow level and drop both, keeping
APP_ENV inline via `-e APP_ENV=prod`.
@turegjorup turegjorup changed the title Run Rector from the Claude Code setup Run Rector from the Claude Code setup; drop redundant root user from the release workflow Jul 9, 2026
@turegjorup turegjorup self-assigned this Jul 9, 2026
@turegjorup turegjorup merged commit c41ac2b into develop Jul 9, 2026
12 checks passed
@turegjorup turegjorup deleted the ci/rector-claude-hook branch July 9, 2026 06:56
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