xml-navigator

Test Environment for Standard PHP 8.4

This repository expects a standard PHP 8.4 CLI environment with the dependencies required for XML processing, PHPUnit, static analysis, and coverage.

Required dependencies

At minimum, make sure the system provides:

Typical package names on Linux distributions look like:

Exact package names can differ by platform or package manager, but the runtime expectation stays the same: php must be a PHP 8.4 CLI binary with xmlreader and xdebug available.

How coverage works in this repository

The repository does not require a global coverage mode in ini files. Coverage is enabled only for the dedicated command:

composer test-coverage

That command uses:

php -d xdebug.mode=coverage ...

So the environment must satisfy two conditions:

  1. Xdebug is already loaded by the normal CLI PHP configuration.
  2. Coverage is enabled only at launch time through -d xdebug.mode=coverage.

Platform-specific preparation

Any platform-specific work to make CLI PHP load Xdebug should be done outside the repository commands.

Linux

macOS

Windows

The repository assumes that by the time you run tests, these steps are already complete.

Quick verification

Check the loaded extensions:

php -m
php --ri xdebug

Then run:

composer test
composer test-coverage
composer phpstan-check

If composer test-coverage fails because Xdebug is missing, fix the platform configuration first instead of changing the test command.