Skip to content

[refactor] Integrate Type Perfect into the refactor workflow (#9)#101

Closed
coisa wants to merge 3 commits intomainfrom
codex/9-type-perfect-refactor
Closed

[refactor] Integrate Type Perfect into the refactor workflow (#9)#101
coisa wants to merge 3 commits intomainfrom
codex/9-type-perfect-refactor

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 19, 2026

Summary

Adds an opt-in Type Perfect pass to composer dev-tools refactor so consumer projects can run Rector and Type Perfect as part of the same refactoring workflow without hand-building a dedicated PHPStan config.

Changes

  • add --type-perfect and --type-perfect-groups to RefactorCommand
  • generate tmp/cache/phpstan/type-perfect.neon, automatically including local phpstan.neon or phpstan.neon.dist when present
  • validate the supported Fast Forward installation path by checking for rector/type-perfect and phpstan/extension-installer
  • document the new opt-in flow in the README, refactor command docs, FAQ, and Rector/PHPDoc advanced guide
  • add PHPUnit coverage for the new Type Perfect command behavior and missing-package failure path

Testing

  • ./vendor/bin/phpunit tests/Console/Command/RefactorCommandTest.php - passed
  • ./vendor/bin/phpunit tests/Console/Command - passed (78 tests, 291 assertions); the known JoliNotif runner warning still appears at the end
  • git diff --check - passed
  • composer dev-tools - not reliable in this environment because parallel tool steps hit local socket restrictions (Failed to listen on tcp://127.0.0.1:0: EPERM) and Composer network resolution failed for Packagist (curl error 6)

Closes #9

@github-actions github-actions Bot added the enhancement New feature or request label Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 19, 2026

Copy link
Copy Markdown
Contributor Author

coisa commented Apr 19, 2026

Closing this PR in favor of #14. After revisiting the design, the Type Perfect work belongs with the broader static-analysis command instead of landing as a standalone refactor-flow change. I moved the acceptance criteria into #14 so the implementation can continue there with the right scope.

@coisa coisa closed this Apr 19, 2026
github-actions Bot added a commit that referenced this pull request Apr 19, 2026
@coisa coisa deleted the codex/9-type-perfect-refactor branch April 19, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Integrate Type Perfect into the Rector workflow for stronger type-safety defaults

1 participant