Skip to content

Migrate repository-local tmp artifacts into .dev-tools #151

@coisa

Description

@coisa

Objective

Consolidate repository-managed temporary artifacts and generated tool state under .dev-tools/ instead of the project-local tmp/ tree.

Current Limitation

The repository currently splits generated outputs across two internal locations:

  • .dev-tools/ already hosts reports, coverage, metrics, release-notes previews, and other generated artifacts.
  • tmp/ still hosts several tool caches and workflow-produced report directories such as tmp/cache/phpunit, tmp/cache/phpdoc, tmp/cache/rector, tmp/cache/php-cs-fixer, and tmp/reports in reports.yml.

This split makes the repository harder to reason about, weakens discoverability for generated artifacts, and makes cleanup and ignore rules more scattered than they need to be.

Proposed Work

Standardize repository-local generated output and caches under .dev-tools/ so DevTools uses a single internal workspace for managed artifacts.

This should cover command defaults, docs, tests, and workflows that still reference repository-local tmp/ paths today.

Scope

  • Move repository-local cache defaults such as PHPUnit, phpDocumentor, Rector, and PHP-CS-Fixer caches from tmp/ into .dev-tools/.
  • Update command defaults, config classes, tests, docs, and examples that still reference repository-local tmp/ paths.
  • Update workflows that publish or copy generated report content so they use .dev-tools/ consistently.
  • Ensure deploy and publish workflows do not accidentally ship cache directories when they publish .dev-tools/-backed output.
  • Keep generated reports, coverage, metrics, and release-note previews consistent with the new .dev-tools/ layout.

Non-goals

  • Replacing runner-level ephemeral paths such as /tmp/composer-cache or /tmp/curl-error.log that intentionally live outside the repository workspace.
  • Redesigning the reports, wiki, or changelog workflows beyond the path migration required for this consolidation.
  • Changing the semantic behavior of the underlying tools beyond their default workspace locations.

Acceptance Criteria

Delivery Criteria

  • Repository-local cache defaults that currently point into tmp/ are migrated to deterministic paths inside .dev-tools/.
  • Commands, tests, config classes, docs, and examples are updated so repository-local generated artifacts consistently reference .dev-tools/.
  • reports.yml and any other workflow that currently uses repository-local tmp/ paths are updated to use .dev-tools/ instead.
  • Deploy and publish workflows explicitly exclude or avoid .dev-tools/ cache directories so only intended published artifacts are shipped.
  • Ignore rules and generated-output expectations stay accurate for the new .dev-tools/ layout.
  • composer dev-tools continues to pass after the path migration.

Architectural / Isolation Criteria

  • MUST: The core logic MUST be isolated into dedicated classes or services instead of living inside command or controller entrypoints.
  • MUST: Responsibilities MUST be separated across input resolution, domain logic, processing or transformation, and output rendering when the change is non-trivial.
  • MUST: The command or controller layer MUST act only as an orchestrator.
  • MUST: The implementation MUST avoid tight coupling between core behavior and CLI or framework-specific I/O.
  • MUST: The design MUST allow future extraction or reuse with minimal changes.
  • MUST: The solution MUST remain extensible without requiring major refactoring for adjacent use cases.
  • MUST: Data gathering or transformation MUST be isolated from filesystem writes or publishing steps.
  • MUST: Generated output ordering and formatting MUST remain deterministic across runs.
  • MUST: Re-running the workflow MUST be idempotent or clearly bounded in its side effects.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions