Prefer the Nix development shell from the repository root:
nix developThe shell provides PHP 8.5, Xdebug coverage support, Composer, Node.js 22, npm,
zip/unzip, and the Linux runtime libraries needed by Cypress. It also keeps
Composer, npm, and Cypress caches under .cache/.
If flakes are not enabled globally, run commands with:
nix --extra-experimental-features "nix-command flakes" developThe .envrc file uses use flake; run direnv allow once if you use direnv.
git clone https://github.com/formapro/JsFormValidatorBundle.git
cd JsFormValidatorBundle
nix develop
composer update
npm installIf Cypress reports that its binary is missing, install it into the local cache:
npx cypress installWithout Nix, install PHP 8.4 or newer, Composer, Node.js 22, npm, and the Cypress system dependencies locally before running the same commands.
The Docker development image is kept as an alternative way to install project vendors without using host PHP or Composer:
docker compose build php-fpm
docker compose run --rm --no-deps -u "$(id -u):$(id -g)" php-fpm composer update
docker compose run --rm --no-deps -u "$(id -u):$(id -g)" php-fpm npm installThe image uses PHP 8.5, Composer 2, Node.js 22, and the PHP extensions needed by
the Symfony 8 test fixture. It also stores Composer, npm, and Cypress caches
under .cache/.
Run the same checks that GitHub Actions runs on pushes and pull requests:
composer validate --strict
composer test
composer phpstan
composer coverage
npm test
npm run test:coverage
git diff --checkFor one-off commands without entering the shell:
nix develop -c composer test
nix develop -c npm test- PHP unit and controller tests live under
Tests/UnitandTests/Controller. - JavaScript unit tests live beside the source files under
src/Resources/public/jsand use the.test.jssuffix. - Browser smoke tests live under
cypress/and run againstTests/app. Tests/appis a Symfony fixture application used by the e2e tests.
Do not commit generated dependencies or build output such as vendor/,
node_modules/, Tests/app/node_modules/, build/, coverage reports, Cypress
videos, or local cache directories.
The Docker stack is maintained for dependency installation and ad hoc local commands. Nix remains the preferred environment for exact local parity with the documented checks.