Skip to content

Fix nested process color output#247

Merged
coisa merged 6 commits intomainfrom
fix/239-process-color-output
Apr 24, 2026
Merged

Fix nested process color output#247
coisa merged 6 commits intomainfrom
fix/239-process-color-output

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 24, 2026

Summary

  • restore color-friendly nested process execution without PTY by configuring child process environments and explicit Symfony Console ANSI flags
  • add concise process labels and local Symfony-style sections for human-readable queue output
  • keep PhpMetrics Composer analysis enabled while excluding nested fixture projects and bounding per-package Packagist lookups so metrics generation does not hang
  • suppress repeated nested Composer Xdebug warnings by setting XDEBUG_MODE=off for queued child processes unless coverage needs Xdebug and PCOV is unavailable

Verification

  • composer dev-tools metrics -- --target=.dev-tools/tmp-metrics --progress
  • composer dev-tools phpdoc -- --fix
  • composer dev-tools code-style -- --fix
  • composer dev-tools tests -- --filter='(EnvironmentTest|OutputCapabilityDetectorTest|ColorPreservingProcessEnvironmentConfiguratorTest|ProcessQueueTest|OutputFormatLoggerTest|TestsCommandTest|MetricsCommandTest|CodeStyleCommandTest|RefactorCommandTest|DocsCommandTest|PhpDocCommandTest|ReportsCommandTest|StandardsCommandTest|DependenciesCommandTest|WikiCommandTest|FundingCommandTest|SyncCommandTest)'
  • composer dev-tools tests -- --filter='(MetricsCommandTest|OutputCapabilityDetectorTest|XdebugDisablingProcessEnvironmentConfigurator|CompositeProcessEnvironmentConfigurator|Extension)'
  • composer dev-tools tests -- --filter=XdebugDisablingProcessEnvironmentConfigurator --coverage=.dev-tools/coverage/xdebug-smoke --coverage-summary
  • composer dev-tools tests
  • composer dev-tools changelog:check
  • git diff --check
  • GrumPHP pre-commit hook

Notes

  • PHP-CS-Fixer still emits its upstream warning when running on PHP 8.5 while the project minimum is PHP 8.3; PHP_CS_FIXER_IGNORE_ENV is deprecated and did not suppress that warning, so this PR avoids adding that env-based workaround.
  • A top-level composer dev-tools ... invocation can still print Composer's Xdebug warning before DevTools starts. The new environment policy targets queued child processes, which removes the repeated warnings from orchestrated Composer calls.
  • PhpMetrics still performs Composer package enrichment, but nested fixture manifests are excluded and each Packagist socket lookup is bounded defensively at 1 second to keep aggregate workflows under their hook and CI time budgets.
  • Colored --pretty-json was intentionally deferred to Support colored pretty JSON and structured tool result payloads #248 so strict --json/--pretty-json output remains parseable JSON while we design structured tool-result payloads.

Closes #239

@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

@coisa coisa force-pushed the fix/239-process-color-output branch from f46fea6 to 2c13bf8 Compare April 24, 2026 21:17
@coisa coisa merged commit 3cc6cdc into main Apr 24, 2026
32 checks passed
@coisa coisa deleted the fix/239-process-color-output branch April 24, 2026 21:32
@github-project-automation github-project-automation Bot moved this from Backlog to Released in PHP Fast Forward Project Apr 24, 2026
github-actions Bot added a commit that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Restore color and clearer nested output for orchestrated commands

1 participant