Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
0628d68
refactor: apply Clean Architecture to Dashboard (DDD + Ports & Adapters)
jblairy Oct 15, 2025
d8796de
refactor: introduce Rector and improve DTO immutability
jblairy Oct 16, 2025
e7b8041
feat: add DashboardDataProviderPort interface
jblairy Oct 16, 2025
622bffb
refactor: simplify dashboard DTOs and add repository interface
jblairy Oct 17, 2025
a806b7d
refactor: move queries from provider to repository
jblairy Oct 17, 2025
3a470e3
refactor: optimize dashboard statistics queries
jblairy Oct 17, 2025
9487529
feat: add BenchmarkGroupBuilder and presentation layer
jblairy Oct 17, 2025
29661d8
feat: add UX Live Component for reactive benchmarks
jblairy Oct 17, 2025
855391c
refactor: simplify repository and add Twig components
jblairy Oct 17, 2025
f108697
feat: add Mercure bundle and event subscriber integration
jblairy Oct 28, 2025
a8cfd97
docs: add complete Mercure documentation and scripts
jblairy Oct 28, 2025
76f5e1e
docs: add benchmark descriptions and update Makefile
jblairy Oct 28, 2025
7686c4b
refactor: improve Mercure progress controller and clean benchmarks
jblairy Oct 28, 2025
43e693c
feat: implement Mercure real-time dashboard updates
jblairy Oct 28, 2025
3c3fb0f
refactor: improve Mercure dashboard controller structure
jblairy Oct 29, 2025
5fc6088
feat: add live benchmark updates via Stimulus controllers
jblairy Nov 3, 2025
5763134
feat: enhance benchmark card template with detailed view
jblairy Nov 3, 2025
b4853bf
refactor: improve benchmark card UI and progress styles
jblairy Nov 3, 2025
8feab02
feat: add benchmark filtering UI component with styles
jblairy Nov 3, 2025
efe945d
refactor: remove old benchmark classes and add Doctrine fixtures
jblairy Nov 3, 2025
c0efef0
feat: add YAML benchmark fixtures (100+ benchmarks)
jblairy Nov 3, 2025
a51de34
docs: refactor and harmonize documentation (fixtures + naming)
jblairy Nov 3, 2025
09f85f7
feat: add DatabaseCodeExtractor for YAML benchmarks
jblairy Nov 3, 2025
0608e35
config: use DatabaseCodeExtractor for benchmark execution
jblairy Nov 3, 2025
43ed2c3
fix: use benchmark slug instead of class name for database benchmarks
jblairy Nov 3, 2025
aa70ff1
docs: add comprehensive guide on atomic commits
jblairy Nov 3, 2025
c543ee2
chore: remove unecessary documentation
jblairy Nov 3, 2025
a99a4ff
feat: add DashboardStatsData DTO for type-safe statistics
jblairy Nov 3, 2025
0d2313c
feat: add getDashboardStats method to benchmark repository
jblairy Nov 3, 2025
9fb0eee
i18n: translate dashboard UI from French to English
jblairy Nov 3, 2025
5cde71d
feat: add statistics overview cards to dashboard
jblairy Nov 3, 2025
49c67a9
style: apply PHP-CS-Fixer formatting rules
jblairy Nov 3, 2025
d0aeb9b
feat: add statistics overview cards to dashboard
jblairy Nov 3, 2025
86a41d7
fix: correct benchmark filter controller targeting
jblairy Nov 3, 2025
3ceb439
feat: add getTopCategories method to benchmark repository
jblairy Nov 3, 2025
ee44723
feat: make category filter buttons dynamic
jblairy Nov 3, 2025
a095a09
chore: change name and add github pseudo
jblairy Nov 3, 2025
f70d76a
fix: prevent search input overflow on reset button
jblairy Nov 3, 2025
c9f420e
feat: add unit selection buttons matching existing design
jblairy Nov 3, 2025
c63337a
feat: add make assets.refresh command for cache invalidation
jblairy Nov 3, 2025
ef72e90
refactor: move unit toggle to stats section with pill-shaped design
jblairy Nov 3, 2025
092b119
refactor: remove Show/Hide Chart button and improve card design
jblairy Nov 3, 2025
11b3f90
feat: modernize benchmark card UI with toggle chart/table view
jblairy Nov 3, 2025
76cd0ea
chore: remove dead code from frontend (controllers, SCSS, unused clas…
jblairy Nov 3, 2025
19a0cf8
fix: resolve critical architecture violations (DDD/Hexagonal)
jblairy Nov 3, 2025
ccc8a8f
fix: use domain exception BenchmarkNotFound instead of InvalidArgumen…
jblairy Nov 3, 2025
edc5228
fix: resolve 34 PHPStan errors (61 → 27)
jblairy Nov 3, 2025
7e51f5c
fix: resolve ALL remaining PHPStan errors (27 → 0) 🎉
jblairy Nov 3, 2025
81c835d
style: apply Rector and PHP CS Fixer code style fixes
jblairy Nov 3, 2025
9722db2
fix: restore PHPDoc comment for PHPStan type inference
jblairy Nov 3, 2025
d73c371
chore: cleaning documentation
jblairy Nov 3, 2025
88d42e7
fix: add type guard for getDashboardStats() to resolve PHPStan error
jblairy Nov 3, 2025
6725e09
refactor: replace comments with self-documenting code and extract met…
jblairy Nov 3, 2025
26e8ff2
test: add comprehensive unit tests for Domain layer (41 tests, 157 as…
jblairy Nov 3, 2025
18f3394
fix: configure PHPStan to ignore intentional test assertions
jblairy Nov 3, 2025
27f9aa3
fix: resolve PHPMD violations (naming, early returns, error suppression)
jblairy Nov 3, 2025
eb749d5
fix: resolve all remaining PHPMD violations (26 → 0)
jblairy Nov 3, 2025
755128c
refactor: extract magic numbers to named constants
jblairy Nov 3, 2025
d9b048d
docs: add Architecture Decision Records (ADR) and CI/CD pipeline
jblairy Nov 3, 2025
199c971
fix: add memory limit to PHPStan analysis
jblairy Nov 3, 2025
a1aa461
refactor: improve architectural boundaries and reduce violations
jblairy Nov 3, 2025
aaf5284
feat(domain): add EventDispatcherPort to abstract event dispatching
jblairy Nov 4, 2025
015683f
feat(domain): add AsyncExecutorPort to abstract async execution
jblairy Nov 4, 2025
fffe555
feat(infrastructure): add SymfonyEventDispatcherAdapter
jblairy Nov 4, 2025
1260e7c
feat(infrastructure): add SpatieAsyncExecutorAdapter
jblairy Nov 4, 2025
0e95d87
refactor(application): use Ports instead of direct dependencies in As…
jblairy Nov 4, 2025
18b7181
config: wire EventDispatcherPort and AsyncExecutorPort to their adapters
jblairy Nov 4, 2025
b66b4e9
test(application): add comprehensive tests for AsyncBenchmarkRunner
jblairy Nov 4, 2025
2718bb2
ci: add PHPArkitect architecture validation to quality checks
jblairy Nov 4, 2025
01499cb
docs: add ADR 006 for AsyncExecutorPort and EventDispatcherPort
jblairy Nov 4, 2025
892f6db
build: add infection/infection for mutation testing
jblairy Nov 4, 2025
0a203d2
config: add infection.json5 for mutation testing configuration
jblairy Nov 4, 2025
9280e1f
build: add mutation testing commands to Makefile
jblairy Nov 4, 2025
3a1fdc9
docs: add comprehensive mutation testing guide
jblairy Nov 4, 2025
bb1bd6b
docs: update CLAUDE.md with mutation testing commands
jblairy Nov 4, 2025
477bd2c
fix(application): add explicit getters for percentiles in BenchmarkSt…
jblairy Nov 4, 2025
2ec749e
test(application): add comprehensive tests for BenchmarkStatisticsDat…
jblairy Nov 4, 2025
c96161f
fix(application): expose percentiles as direct properties in Benchmar…
jblairy Nov 4, 2025
bbea04e
chore: update dependencies
jblairy Nov 4, 2025
18c47eb
chore: add composer description
jblairy Nov 4, 2025
ad04263
refactor: reduce BenchmarkStatisticsData constructor parameters from …
jblairy Nov 4, 2025
e254276
chore: allow phpmd to fail
jblairy Nov 4, 2025
4fa6b13
docs: enhance README with professional layout, badges, and comprehens…
jblairy Nov 4, 2025
8e9b715
chore: allow phpmd to fail
jblairy Nov 4, 2025
65eb4bb
docs: unify badge format with HTML anchor tags for consistency
jblairy Nov 4, 2025
e750552
docs: customize GitHub Actions badge to match flat-square style with …
jblairy Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,13 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###> symfony/mailer ###
MAILER_DSN=null://null
###< symfony/mailer ###

###> symfony/mercure-bundle ###
# See https://symfony.com/doc/current/mercure.html#configuration
# The URL of the Mercure hub, used by the app to publish updates (can be a local URL)
MERCURE_URL=http://mercure/.well-known/mercure
# The public URL of the Mercure hub, used by the browser to connect
MERCURE_PUBLIC_URL=http://localhost:3000/.well-known/mercure
# The secret used to sign the JWTs
MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
###< symfony/mercure-bundle ###
92 changes: 92 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Code Quality

on:
push:
branches: [ main, develop, chore/*, feature/*, fix/* ]
pull_request:
branches: [ main, develop ]

jobs:
quality-checks:
name: Quality Checks (PHP 8.4)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP 8.4
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, json
coverage: none
tools: composer:v2

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run PHPStan (Level Max)
run: vendor/bin/phpstan analyse --no-progress --error-format=github --memory-limit=512M

- name: Run PHP-CS-Fixer (Check only)
run: vendor/bin/php-cs-fixer fix --dry-run --diff --verbose

- name: Run PHPUnit Tests
run: vendor/bin/phpunit --testdox

- name: Run PHPMD
run: vendor/bin/phpmd src github rulesets.xml
continue-on-error: true

- name: Run PHPArkitect (Architecture validation)
run: vendor/bin/phparkitect check

phpunit-coverage:
name: PHPUnit with Coverage
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP 8.4
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, json
coverage: xdebug
tools: composer:v2

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run PHPUnit with Coverage
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
52 changes: 52 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Quick Reference for Coding Agents

## Commands
```bash
# Database & Fixtures
make db.reset # Drop, create, migrate database (empty)
make db.refresh # Reset database + load YAML fixtures
make fixtures # Load benchmarks from fixtures/benchmarks/*.yaml

# Tests
docker-compose run --rm main vendor/bin/phpunit # All tests
docker-compose run --rm main vendor/bin/phpunit tests/Path/To/SpecificTest.php # Single test

# Code Quality
make phpcsfixer-fix # Fix code style (PSR-12)
make phpstan # Static analysis (level 9)
make quality # Run all checks + fixes

# Assets (CSS/JS)
make assets.refresh # Force refresh assets: compile, regenerate hashes, clear cache, restart
# Use when CSS/JS changes don't appear in browser
# Don't forget to hard refresh browser (Ctrl+Shift+R)

# Benchmarks
make run test=Loop iterations=10 # Run specific benchmark
docker-compose run --rm main php bin/console benchmark:run --test=Loop --php-version=php84

# Mercure (Real-Time)
./scripts/mercure-verify.sh # Verify Mercure setup
./scripts/mercure-listen.sh # Watch real-time events
./scripts/mercure-test.sh 5 Loop php84 # End-to-end test
```

## Code Style
- **PHP 8.4+** with `declare(strict_types=1)` at top of every file
- **PSR-12** + Symfony style enforced by PHP-CS-Fixer
- **Imports**: Fully qualified, alphabetically sorted (classes, functions, constants)
- **Arrays**: Short syntax `[]`, trailing commas in multiline
- **Strings**: Concatenation with ` . ` (spaces around dot)
- **Comparison**: Strict (`===`, `!==`) always, Yoda style (`null === $var`)
- **Classes**: `final readonly` by default, ordered elements (constants → properties → constructor → methods)
- **Types**: Full type hints everywhere (params, returns, properties with asymmetric visibility `public private(set)`)
- **PHPDoc**: Only for interfaces, complex return types (`@return Type[]`), or "why" explanations

## Architecture (Clean + DDD + Hexagonal)
- **Namespace**: `Jblairy\PhpBenchmark\{Domain|Application|Infrastructure}\...`
- **Dependencies flow INWARD**: Infrastructure → Application → Domain
- **Domain**: Pure PHP, no framework (Symfony/Doctrine), defines Ports (interfaces)
- **Infrastructure**: Implements Adapters for Domain Ports, uses any library
- **Naming**: Ports end with `Port`, Value Objects are nouns, Services are verbs

See [docs/architecture/01-overview.md](docs/architecture/01-overview.md) and [CLAUDE.md](CLAUDE.md) for details.
Loading
Loading