Skip to content

1.5.0 - Contract-based code-quality workflows with new fix/check CLI

Choose a tag to compare

@allanmcarvalho allanmcarvalho released this 03 Sep 18:45
· 32 commits to 1.x since this release

Summary

This release switches code-quality execution to a contract-based workflow model and updates the CI/menu UX to split the former unified quality flow into separate quality:fix and quality:check commands.

Added

New contract-based quality types

New marker interfaces were added under App\Quality\Contracts to represent quality “contract” surfaces (used for selection/discovery and container binding), including:

  • RunsPestCheck
  • RunsPhpStanCheck
  • RunsPintCheck
  • RunsPintFix
  • RunsRectorFix
  • RunsVitePlusCheck

New CLI commands

Two new commands are introduced and wired to the existing quality.fix / quality.test configuration workflows:

  • quality:check (app/Commands/CodeQuality/RunCheckCommand.php)
    • Runs CI code-quality checks.
    • Uses shared execution workflow logic.
  • quality:fix (app/Commands/CodeQuality/RunFixCommand.php)
    • Runs fix workflows and is able to create a commit when appropriate.
    • Can run checks as part of the fix flow.
    • Supports --tool=* to run only selected configured tools.

Shared workflow command

A new shared abstract workflow command RunCodeQualityWorkflowCommand implements the core execution flow, including:

  • Validating the project root.
  • Loading configured QualityCommand contract implementations from maintainer configuration (via subclass-provided config).
  • Interactive tool selection.
  • Per-project tool availability checks (with warnings and skips when a tool isn’t available for the root).
  • Resolving tool-specific configuration declared by each tool.

Container bindings for contract types

New container bindings were added so the framework can resolve contract types to their concrete implementations, including (at minimum):

  • RunsPintFix
  • RunsRectorFix
  • RunsPestCheck
  • RunsPintCheck
  • RunsPhpStanCheck
  • RunsVitePlusCheck
  • RunsVitePlusTest
  • RunsVueTscCheck

Changed

CI/menu workflow UX: split quality into quality:fix and quality:check

The former single quality flow is replaced in user selection UX with:

  • quality:fix
    • Defaults include Pint, Rector, and the package script invoking the fix workflow.
  • quality:check

This changes how users run quality tooling:

  • Instead of selecting individual tools via the previous multiselect/CI menu behavior, users now select quality:fix or quality:check.
  • Users can optionally narrow tool execution using --tool=*.

Quality tool selection/discovery moves to contracts

Quality tool selection and discovery now rely on contract implementations rather than the older console command classes.

Migration impact (configuration):

  • Any quality.fix / quality.test configuration entries that referenced legacy App\Support\Quality\Commands\... must be migrated to the corresponding Runs... contract FQCNs.

Improved Versionable class discovery

Versionable class discovery was updated to use:

  • the production Composer autoload.classmap, and
  • direct production PSR-4 namespaces,

so that exact-file exports remain correct without broadly expanding namespaces.

Release automation strengthened

Release creation now:

  • runs quality:fix non-interactively (the release command fails if it fails), and
  • conditionally runs quality:check non-interactively based on shouldRun().

A helper preserves prompt/input interactivity after --no-interaction => true.

Maintainer version constant

The maintainer version constant is bumped to 1.5.0.

Package publishing encryption/SSH email adjustment

Publishing behavior is adjusted to skip Maintainer SSH key email generation for Laravel package project types, avoiding a dependency on application encryption key requirements.

Fixed

  • Introduced contract-based workflow execution and “fix/check” wiring corrections so quality tooling resolves and runs via the new contract-based surfaces.

Removed

Deleted legacy quality command behavior

The old LaravelZero console command app/Commands/CI/RunQualityCommand.php was deleted.

This included the former interactive/behavioral features such as:

  • quality {--tool=*} command handling,
  • tool config creation,
  • extra-arg derivation from maintainer configuration,
  • and optional git commit prompting.

Compatibility impact:

  • Any external consumers or automation invoking that removed command/behavior will break.
  • Update scripts/integration to use quality:fix and/or quality:check instead.

Migration / Compatibility Notes

  1. Update configuration FQCNs: migrate any quality.fix / quality.test entries from:
    • App\Support\Quality\Commands\...
      to the new:
    • Runs... contract FQCNs (e.g., RunsPintFix, RunsPintCheck, RunsRectorFix, etc.).
  2. Update CLI usage:
    • Replace usages of the removed quality {--tool=*} behavior with quality:fix and/or quality:check.
  3. Release behavior:
    • Expect release automation to enforce non-interactive quality:fix runs and fail releases when fixes fail.