Skip to content

Commit 367355f

Browse files
committed
fix(bench): bootstrap project autoload in phpbench scripts
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 774d93a commit 367355f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ composer benchmark:run
2121
composer benchmark:run:ci
2222

2323
# Direct PHPBench invocation with custom options
24-
vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --report=aggregate
24+
vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --bootstrap=vendor/autoload.php --report=aggregate benchmarks
2525
```
2626

2727
PHPBench automatically:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
"test:integration": "vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit --testsuite integration",
7676
"test:coverage": "XDEBUG_MODE=coverage vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit --coverage-text --coverage-clover=build/coverage/clover.xml",
7777
"mutation:test": "vendor-bin/mutation/vendor/infection/infection/bin/infection --threads=max",
78-
"benchmark:run": "vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --report=aggregate benchmarks",
79-
"benchmark:run:ci": "mkdir -p build && vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --iterations=20 --revs=10 --warmup=2 --report=aggregate --output=json:build/benchmark-results.json benchmarks",
78+
"benchmark:run": "vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --bootstrap=vendor/autoload.php --report=aggregate benchmarks",
79+
"benchmark:run:ci": "mkdir -p build && vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --bootstrap=vendor/autoload.php --iterations=20 --revs=10 --warmup=2 --report=aggregate --output=json:build/benchmark-results.json benchmarks",
8080
"bin": [
8181
"composer bin all list"
8282
]

0 commit comments

Comments
 (0)