@tperrelli/phx
v0.0.2
Published
Minimal monorepo tooling for PHP
Downloads
28
Readme
phx
Minimal monorepo tooling for PHP.
Run tasks only in affected packages based on dependency graph.
⚡ Install
No install needed --- use with npx:
npx phx affected:testOr install globally:
npm install -g phx🧠 Problem
In PHP monorepos, running tests across all packages is slow and inefficient.
Tools like Composer do not provide:
- affected detection
- task orchestration
- dependency-aware execution
✅ Solution
phx runs tasks only in affected packages.
If core changes → only core and dependents (e.g. billing) run.
📦 Example structure
packages/
core/
billing/If billing depends on core:
{
"require": {
"app/core": "*"
}
}▶️ Usage
Run tests only where needed:
phx affected:test⚙️ What it does
- detects changed files via git
- maps package dependencies
- computes affected packages
- runs tasks in parallel
- skips packages without tests
🧪 Example output
▶ Running in app/billing
⚠️ Skipping app/billing (no tests configured)
▶ Running in app/core
OK (1 test, 1 assertion)🚧 Limitations (MVP)
- no caching yet
- no task config
- phpunit-focused
🚀 Roadmap
- task runner (
phx run build) - caching
- concurrency control
- config file
🤝 Contributing
PRs welcome.
