Symfony 5 application that collects and displays
composer install
You need
You need to provide 8 parameters using a .env.local
file or environment variables.
APP_ENV=dev
APP_SECRET=...
DATABASE_URL=...
APP_DB_HOST=127.0.0.1
APP_DB_TABLE=reviewstats
APP_DB_USER=...
APP_DB_PASSWORD=...
APP_GH_TOKEN=...
Example
APP_ENV=dev
APP_SECRET=abcdefhejeljdxsjshdjfrhghefjejej
DATABASE_URL="mysql://abcd:[email protected]:9999/review-stats?serverVersion=5.7"
APP_DB_HOST=127.0.0.1
APP_DB_TABLE=review-stats
APP_DB_USER=abcd
APP_DB_PASSWORD=abcd
APP_GH_TOKEN=ghp_abchdksjdkdjfhdjzdjdzdhazdazhduzdhzd
Browse /
using a webserver to see the dashboard.
If you configure a webserver, do use public
as root directory.
Example with Symfony built-in server:
symfony server:start
# To collect Maintainers review daily statistics ; run once a day
php bin/console ps:review-stats:record
# To collect "Waiting for..." daily total statistics ; run once a day
php bin/console ps:prs-waiting-stats:record
# To collect "Waiting for review" for how long snapshots ; can be run as often as needed
php bin/console ps:prs-statuses:record
# To collect pull request review comments statistics ; run once a day
php bin/console ps:pr-review-comment-stats:compute
# To delete old pull request review comments ; run once a day
php bin/console ps:pr-review-comment:delete-old
Most commands can be triggered as dry-run (does not persist data) or not. Default is dry-run enabled, so in order to
persist the data you need to add --dry-run=false
:
php bin/console ps:prs-waiting-stats:record --dry-run=false
php bin/console ps:review-stats:record --dry-run=false
Run tests using phpunit
vendor/bin/phpunit -c phpunit.xml
Some tests do load fixtures powered by a sqlite driver
Run static analysis using phpstan
vendor/bin/phpstan analyse -c phpstan.neon