Skip to content

feat(F5): add phpdup init config wizard - #115

Merged
detain merged 1 commit into
masterfrom
step11.4-init-command
Jul 1, 2026
Merged

feat(F5): add phpdup init config wizard#115
detain merged 1 commit into
masterfrom
step11.4-init-command

Conversation

@detain

@detain detain commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • New phpdup init subcommand for bootstrapping phpdup.json
  • Auto-detects framework via ProjectProfileDetector::detectIn()
  • Shows detected profile to user
  • Generates phpdup.json with exclude/kinds/min_block_size/min_cluster_impact
  • --profile flag, --force to overwrite, --no-interaction supported
  • writeConfig() returns bool, execute() propagates failures

Acceptance Criteria

  • phpdup init creates phpdup.json in CWD
  • Detected profile shown to user
  • Works in --no-interaction mode
  • Handles existing file gracefully
  • Falls back to generic when no profile detected
  • --force skips overwrite prompt
  • Generated config is valid against schema

New `phpdup init` subcommand that auto-detects the project framework
via ProjectProfileDetector::detectIn() and generates a phpdup.json
with recommended settings. Shows detected profile to user.

- InitCommand: --profile flag, --force/-f overwrite, --no-interaction
- writeConfig() returns bool (false on failure), execute() propagates
- Generated JSON has no redundant 'profile' key (settings are baked in)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@detain
detain merged commit 722ec5e into master Jul 1, 2026
0 of 6 checks passed
@detain
detain deleted the step11.4-init-command branch July 1, 2026 10:55
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 high · 6 medium · 23 minor

Alerts:
⚠ 31 issues (≤ 0 issues of at least minor severity)

Results:
31 new issues

Category Results
BestPractice 1 medium
Documentation 4 minor
ErrorProne 3 medium
Security 2 high
CodeStyle 19 minor
Complexity 2 medium

View in Codacy

🟢 Metrics 27 complexity · 0 duplication

Metric Results
Complexity 27
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

detain pushed a commit that referenced this pull request Jul 1, 2026
Phase 11 complete:
- 11.2: FileWatcher unification (PR #113, merged 14c2154)
- 11.3: Async/queued serve (PR #114, merged c7072ea)
- 11.4: phpdup init wizard (PR #115, merged 722ec5e)
- 11.5: Per-pair match explainability (PR #116, merged d764267)
- Fix 11.1b status (was pending, actually merged 9b2e2ed)
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.

1 participant