Fiscal printer driver implementation
composer install# Build the image (once, or after composer.json changes)
docker build -t fp-moldova-test .
# Run tests — always uses current source code
docker run --rm -v "${PWD}:/app" fp-moldova-testphp vendor/bin/phpunit tests/ --testdoxsrc/
FpMoldovaDriver.php # Main driver implementation
SerialConnectionInterface.php # Serial port abstraction
tests/
FpMoldovaDriverTest.php # 30 unit tests
MockSerialConnection.php # In-memory serial mock
Dockerfile # Test environment (PHP 8.2, Composer)
docker-entrypoint.sh # Auto-runs composer install if vendor/ is missing
docker-entrypoint.sh is called by the container on startup. It checks whether vendor/autoload.php exists in the mounted directory — if not, it runs composer install before executing the test suite. This means the image never bakes in source code or dependencies; a fresh clone works without any manual setup step.
- PHP: 8.2+