Taskfile Reference
Complete reference of all available Task commands for Data Helpers development.
Introduction
Section titled βIntroductionβThis project uses Task as the task runner. Task is a modern alternative to Make with YAML syntax and better readability.
Why Task?
Section titled βWhy Task?β- β Cross-platform - Works on macOS, Linux and Windows
- β Fast - Written in Go, much faster than Make
- β Simple - YAML-based configuration
- β Powerful - Variables, dependencies, includes
- β Beautiful Output - Consistent formatting with colors and icons
Installation
Section titled βInstallationβSee Development Setup for installation instructions.
Quick Reference
Section titled βQuick Referenceβ# Show all available taskstask
# Show detailed task listtask --list
# Start Docker containerstask docker:up
# Run teststask test:run
# Run all quality checkstask quality:check
# Complete development setuptask dev:setup
# Sync fork with upstreamtask fork:update
# Check fork statustask fork:statusTask Categories
Section titled βTask Categoriesβπ³ Docker Management
Section titled βπ³ Docker ManagementβManage Docker containers and environment.
task docker:build # Build containerstask docker:up # Start containerstask docker:down # Stop containerstask docker:restart # Restart containerstask docker:logs # Show logstask docker:logs:follow # Follow logs (tail -f)task docker:clean # Remove containers & volumestask docker:rebuild # Clean + build + uptask docker:ps # Show container statusVariables:
PHP=8.2|8.3|8.4- Specify PHP version (default: 8.4)
Examples:
# Start containerstask docker:up
# View logstask docker:logs
# Rebuild everythingtask docker:rebuildπ₯οΈ Shell Access
Section titled βπ₯οΈ Shell AccessβOpen shell in Docker containers.
task shell # Shell in PHP 8.4 (default)task shell PHP=8.2 # Shell in PHP 8.2task shell:82 # Shell in PHP 8.2task shell:83 # Shell in PHP 8.3task shell:84 # Shell in PHP 8.4Examples:
# Open shell in PHP 8.4task shell
# Open shell in PHP 8.2task shell:82π¦ Dependencies
Section titled βπ¦ DependenciesβInstall and update dependencies.
task install # Install dependencies (all containers)task install:82 # Install in PHP 8.2task install:83 # Install in PHP 8.3task install:84 # Install in PHP 8.4task update # Update dependencies (PHP 8.4)task update PHP=8.2 # Update in PHP 8.2Examples:
# Install dependencies in all containerstask install
# Update dependencies in PHP 8.4task updateπ§ͺ Testing - Basic
Section titled βπ§ͺ Testing - BasicβRun unit and E2E tests.
task test:run # Run tests (PHP 8.4)task test:run PHP=8.2 # Run tests (PHP 8.2)task test:unit # Unit tests onlytask test:e2e # E2E tests onlytask test:coverage # Tests with coveragetask test:full # Full test suite (unit + e2e)task test:documentation # Documentation testsAliases:
task testβtask test:runtask test:docsβtask test:documentation
Examples:
# Run tests with PHP 8.4task test:run
# Run tests with PHP 8.2task test:run PHP=8.2
# Run with coveragetask test:coverageπ§ͺ Testing - Framework Specific
Section titled βπ§ͺ Testing - Framework SpecificβTest with specific frameworks (isolated containers).
# Laraveltask test:laravel10 # Laravel 10 (PHP 8.3)task test:laravel11 # Laravel 11 (PHP 8.4)task test:l10 # Alias for laravel10task test:l11 # Alias for laravel11
# Symfonytask test:symfony6 # Symfony 6 (PHP 8.4)task test:symfony7 # Symfony 7 (PHP 8.4)task test:s6 # Alias for symfony6task test:s7 # Alias for symfony7
# Doctrinetask test:doctrine2 # Doctrine 2 (PHP 8.4)task test:doctrine3 # Doctrine 3 (PHP 8.4)task test:d2 # Alias for doctrine2task test:d3 # Alias for doctrine3
# Plain PHPtask test:plain # Plain PHP (PHP 8.4)Variables:
PHP=8.2|8.3|8.4- Specify PHP version
Examples:
# Test Laravel 11 with PHP 8.4task test:laravel11
# Test Symfony 7 with PHP 8.2task test:symfony7 PHP=8.2π§ͺ Testing - Test Matrix
Section titled βπ§ͺ Testing - Test MatrixβRun comprehensive test matrix.
# Complete matrixtask test:matrix # All 33 tests
# By PHP versiontask test:matrix:82 # All PHP 8.2 tests (11 tests)task test:matrix:83 # All PHP 8.3 tests (11 tests)task test:matrix:84 # All PHP 8.4 tests (11 tests)
# By frameworktask test:matrix:plain # Plain PHP only (3 tests)task test:matrix:laravel # All Laravel tests (6 tests)task test:matrix:symfony # All Symfony tests (6 tests)task test:matrix:doctrine # All Doctrine tests (6 tests)
# By framework versiontask test:matrix:laravel9 # Laravel 9 (3 tests)task test:matrix:laravel10 # Laravel 10 (2 tests)task test:matrix:laravel11 # Laravel 11 (3 tests)task test:matrix:symfony6 # Symfony 6 (3 tests)task test:matrix:symfony7 # Symfony 7 (3 tests)task test:matrix:doctrine2 # Doctrine 2 (3 tests)task test:matrix:doctrine3 # Doctrine 3 (3 tests)Examples:
# Run complete matrixtask test:matrix
# Run all Laravel teststask test:matrix:laravel
# Run all PHP 8.4 teststask test:matrix:84β¨ Code Quality - PHPStan
Section titled ββ¨ Code Quality - PHPStanβStatic analysis with PHPStan Level 9.
task quality:phpstan # Run PHPStan (PHP 8.4)task quality:phpstan:82 # Run PHPStan (PHP 8.2)task quality:phpstan:83 # Run PHPStan (PHP 8.3)task quality:phpstan:84 # Run PHPStan (PHP 8.4)task quality:phpstan:baseline # Generate baselinetask quality:phpstan:clear # Clear cacheVariables:
PHP=8.2|8.3|8.4- Specify PHP version
Examples:
# Run PHPStan with PHP 8.4task quality:phpstan
# Run PHPStan with PHP 8.2task quality:phpstan PHP=8.2
# Generate baselinetask quality:phpstan:baseline⨠Code Quality - ECS
Section titled ββ¨ Code Quality - ECSβCode style checks with PHP Easy Coding Standard.
task quality:ecs # Check code styletask quality:ecs:fix # Fix code style automaticallyVariables:
PHP=8.2|8.3|8.4- Specify PHP version
Examples:
# Check code styletask quality:ecs
# Fix code styletask quality:ecs:fix⨠Code Quality - Rector
Section titled ββ¨ Code Quality - RectorβPHP refactoring with Rector.
task quality:rector # Run Rector dry-runtask quality:rector:fix # Apply Rector changesVariables:
PHP=8.2|8.3|8.4- Specify PHP version
Examples:
# Check what Rector would changetask quality:rector
# Apply Rector changestask quality:rector:fix⨠Code Quality - Combined
Section titled ββ¨ Code Quality - CombinedβRun all quality checks at once.
task quality:check # Run all quality checks (ECS + PHPStan + Rector)Examples:
# Run all quality checkstask quality:checkβ‘ Benchmarking
Section titled ββ‘ BenchmarkingβPerformance benchmarking.
task bench:run # Run benchmarkstask bench:compare # Compare with baselinetask bench:profile # Profile performanceExamples:
# Run benchmarkstask bench:run
# Compare with baselinetask bench:compareπ Documentation
Section titled βπ DocumentationβStarlight documentation server.
task docs:dev # Start documentation server (http://localhost:4321)task docs:build # Build documentationtask docs:preview # Preview production buildtask docs:clean # Clean documentation cacheExamples:
# Start documentation servertask docs:dev
# Build documentationtask docs:buildπ» Development Workflows
Section titled βπ» Development WorkflowsβCommon development workflows.
task dev:setup # Complete development setuptask dev:pre-commit # Pre-commit checks (ECS + PHPStan + Tests)task dev:pre-push # Pre-push checks (Quality + Matrix)task dev:clean # Clean cache and temp filestask dev:reset # Reset environment (clean + rebuild)Examples:
# Setup development environmenttask dev:setup
# Run pre-commit checkstask dev:pre-commit
# Reset environmenttask dev:resetCommon Workflows
Section titled βCommon WorkflowsβStarting Development
Section titled βStarting Developmentβ# 1. Setup environmenttask dev:setup
# 2. Open shelltask shell
# 3. Make changes and testtask test:runBefore Commit
Section titled βBefore Commitβ# Run pre-commit checkstask dev:pre-commit
# Or run individual checkstask quality:ecs:fix # Fix code styletask quality:phpstan # Static analysistask test:run # Run testsBefore Push
Section titled βBefore Pushβ# Run pre-push checks (includes matrix tests)task dev:pre-push
# Or run complete test suitetask test:runπ Fork Management
Section titled βπ Fork ManagementβManage forks and sync with upstream repository.
task fork:update # Sync fork with upstreamtask fork:status # Check fork statustask fork:update
Section titled βtask fork:updateβSyncs your fork with the upstream repository (event4u-app/data-helpers).
What it does:
- Adds upstream remote (if not exists)
- Fetches all changes from upstream
- Merges upstream/main into current branch
- Fetches and pushes all tags
Example:
# Sync your forktask fork:updateOutput:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ π Syncing Fork with Upstreamββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Step 1/4: Adding upstream remote...β
Upstream remote added
π₯ Step 2/4: Fetching from upstream...β
Fetched from upstream
π Step 3/4: Merging upstream/main...β
Merged upstream/main
π·οΈ Step 4/4: Syncing tags...β
Tags synced
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
Fork successfully synced with upstream!ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββtask fork:status
Section titled βtask fork:statusβShows the status of your fork compared to upstream.
What it does:
- Adds upstream remote (if not exists)
- Fetches from upstream
- Shows commits ahead/behind
Example:
# Check fork statustask fork:statusOutput:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ π Fork Statusββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Upstream remote exists
π₯ Fetching from upstream...
π Comparison with upstream/main:
β¬οΈ Your fork is 3 commit(s) behind upstream
π‘ Run 'task fork:update' to sync with upstream
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββNext Steps
Section titled βNext Stepsβ- Development Setup - Setup your environment
- Test Matrix - Learn about the test matrix
- Contributing Guide - Learn how to contribute
- Fork Setup - Create and configure your fork
- Fork Sync - Keep your fork up-to-date
- Pull Requests - Contribute changes back