FastForward\DevTools is a Composer plugin that aggregates multiple PHP development tools into a single unified command. It provides automated execution of tests, static analysis, code styling, refactoring, and documentation generation.
Key Technologies:
- PHP 8.3+
- Composer plugin
- PHPUnit 12.5 (testing)
- Rector 2.x (automated refactoring)
- Easy Coding Standard (code style)
- phpDocumentor (API docs)
- GrumPHP (Git hooks)
- PHPSpec/Prophecy (test doubles)
# Install as development dependency
composer require --dev fast-forward/dev-tools:dev-main
# Install dependencies
composer install# Run all standard checks (refactoring, code styling, docs, tests, reports)
composer dev-tools
# Automatically fix code standards issues
composer dev-tools:fix
# Individual commands
composer dev-tools tests # Run PHPUnit tests
composer dev-tools code-style # Check and fix code style (ECS + Composer Normalize)
composer dev-tools refactor # Refactor code using Rector
composer dev-tools phpdoc # Check and fix PHPDoc comments
composer dev-tools docs # Generate HTML API documentation
composer dev-tools wiki # Generate Markdown documentation for wiki
composer dev-tools reports # Generate docs frontpage and reports
composer dev-tools:sync # Sync scripts, GitHub Actions, .editorconfig, wiki# Run all tests with coverage
composer dev-tools tests
# Run tests matching a pattern
composer dev-tools tests -- --filter=CodeStyle
# Run with coverage report
composer dev-tools tests -- --coverage=public/coverageTest Configuration:
- PHPUnit XML config:
phpunit.xml - Test namespace:
FastForward\DevTools\Tests\ - Source namespace:
FastForward\DevTools\ - Coverage required (strict metadata enforcement)
- Coverage threshold: configured in
phpunit.xml
Test Patterns:
- Tests use PHPUnit 12.x with Prophecy for mocking
- Custom PHPUnit extension:
FastForward\DevTools\PhpUnit\Runner\Extension\DevToolsExtension
Creating/Updating Tests:
- Use skill
phpunit-testsin.agents/skills/phpunit-tests/for creating or updating PHPUnit tests with Prophecy - Run skill when: creating new test classes, adding test methods, or fixing existing tests
PHP Coding Standard: PSR-12 with Symfony style
ECS Configuration: ecs.php
- Uses Symfony, PSR-12, and Symplify rule sets
- PHPDoc alignment: left-aligned
- PHPUnit test case static methods: use
self:: - Skips: vendor, resources, public, tmp directories
File Organization:
- Source code:
src/(PSR-4:FastForward\DevTools\) - Tests:
tests/(PSR-4:FastForward\DevTools\Tests\) - Commands:
src/Command/ - PHPUnit events:
src/PhpUnit/Event/ - Rector rules:
src/Rector/ - Composer plugin:
src/Composer/
Naming Conventions:
- Classes: PascalCase
- Methods: camelCase
- Properties: camelCase
- Constants: UPPER_CASE
PHPdoc Requirements:
- All classes require docblocks with
@copyrightand@license - Use RFC 2119 keywords (MUST, SHOULD, MAY, etc.)
- PHPDoc checked via dev-tools phpdoc command
- Use skill
phpdoc-code-stylein.agents/skills/phpdoc-code-style/for PHPDoc cleanup and repository-specific PHP formatting
This is a Composer plugin - no build step required. The package is published to Packagist.
Package Details:
- Type:
composer-plugin - Class:
FastForward\DevTools\Composer\Plugin - Minimum stability:
stable
Title Format: [<area>] Brief description (#<issue-number>)
Required Checks:
composer dev-toolsBefore Submitting:
- Run full dev-tools suite
- Ensure all tests pass
- Code style must be clean (ECS)
- PHPDoc must be valid
- Coverage must meet threshold
- Rector should handle refactoring automatically
- GrumPHP: Automatically runs on pre-commit (configured in
grumphp.yml) - Rector: Custom rules in
src/Rector/for automated refactoring - Documentation: Sphinx-based docs in
docs/directory - Wiki: GitHub wiki synced via
dev-tools wikianddev-tools:sync - GitHub Actions: Workflows in
.github/workflows/(synced viadev-tools:sync)
- Creating/Updating Tests: Use skill
phpunit-testsin.agents/skills/phpunit-tests/for PHPUnit tests with Prophecy - Generating Documentation: Use skill
sphinx-docsin.agents/skills/sphinx-docs/for Sphinx documentation indocs/ - Updating README: Use skill
package-readmein.agents/skills/package-readme/for generating README.md files - Updating PHPDoc / PHP Style: Use skill
phpdoc-code-stylein.agents/skills/phpdoc-code-style/for PHPDoc cleanup and repository-specific PHP formatting - Drafting / Publishing GitHub Issues: Use skill
github-issuesin.agents/skills/github-issues/to transform a short feature description into a complete, production-ready GitHub issue and create or update it on GitHub when needed - Implementing Issues & PRs: Use skill
github-pull-requestin.agents/skills/github-pull-request/to iterate through open GitHub issues and implement them one by one with branching, testing, documentation, and pull requests
Repository-specific agent prompts live in .agents/agents/ and are mirrored
through .github/agents for GitHub-facing discovery. These role prompts define
behavior and ownership boundaries, while .agents/skills/ remains the
procedural source of truth.
- Use
issue-editorfor issue drafting, refinement, comments, updates, and closure workflows. - Use
issue-implementerfor issue-to-branch-to-PR execution. - Delegate to
test-guardianwhenever behavior changes, regressions, or missing coverage are involved. - Delegate to
php-style-curatorfor PHPDoc cleanup, file-header normalization, and repository style conformance. - Delegate to
readme-maintainerwhen public commands, installation, usage, links, or badges change. - Delegate to
docs-writerwhendocs/must be created or updated. - Delegate to
consumer-sync-auditorwhen packaged skills, sync assets, wiki, workflows, or consumer bootstrap behavior change. - Delegate to
quality-pipeline-auditorwhen a task changes command orchestration, verification flow, or quality gates. - Delegate to
changelog-maintainerwhen a task needs changelog authoring, changelog validation for PRs, release promotion, or release-note export.