Skip to main content
Contributions are welcome. Before opening a pull request, run make qa (code style check + tests) and make release-check to verify everything passes.

Setting up the environment

Running tests

Tests live in tests/ and are PHPUnit-based.
make test
make test-coverage
Coverage is printed to the terminal. The bundle does not ship frontend tests; all tests are PHP-only.

Code quality

The bundle uses PHP CS Fixer (PSR-12 + Symfony canonical), PHPStan, and Rector.

Check and fix code style

# Check (no changes)
make cs-check

# Apply fixes
make cs-fix

PHPStan static analysis

make phpstan

Rector

make rector-dry

Run all QA checks at once

make qa (or composer qa) runs cs-check and test in sequence.
make qa

Composer scripts reference

ScriptWhat it does
testRun PHPUnit tests
test-coverageRun tests with code coverage
cs-checkCheck code style (PHP CS Fixer, no changes)
cs-fixApply PHP CS Fixer fixes
rectorApply Rector refactoring
phpstanRun PHPStan static analysis
qaRun cs-check + test

Building dashboard assets

Dashboard TypeScript sources are compiled to JavaScript with Vite. Source files (src/Resources/assets/src/):
  • dashboard.ts — main dashboard IIFE bundle
  • stimulus-live.ts — Stimulus + LiveComponent ESM bundle
  • logger.ts — shared logger utility
Output (src/Resources/public/js/):
  • dashboard.js — IIFE, loaded globally in the dashboard layout
  • stimulus-live.js — ESM, imported by Symfony UX
1

Install Node dependencies

pnpm install
2

Build assets

pnpm run build
3

Install assets into the app

After building, run the following in your Symfony application so public/bundles/nowodashboardmenu/js/ is updated:
php bin/console assets:install
You can also run make assets from the bundle root. It checks for node_modules first and calls pnpm install if needed, then runs pnpm run build.

Release checks

Before tagging a release, run:
make release-check
This runs composer-sync, cs-fix, cs-check, rector-dry, phpstan, test-coverage, and release-check-demos (each demo is started, verified with an HTTP health check, then stopped).

CI/CD

GitHub Actions (.github/workflows/ci.yml) run on every push and pull request:
  • Tests across the supported PHP and Symfony matrix
  • Code style check
  • Optional demo verification

Pull request guidelines

  • Run make qa before opening a PR to confirm code style and tests pass.
  • Run make release-check for a full pre-release check including demo verification.
  • Keep commits focused; one logical change per commit is preferred.
  • Update CHANGELOG.md under [Unreleased] with a summary of your change.
  • If your change adds or modifies a config option, update the relevant docs pages.