psb / psb-debug
Collection of debugging tools
Package info
github.com/phantasie-schmiede/debug
Type:typo3-cms-extension
pkg:composer/psb/psb-debug
Requires
- php: ^8.3
- typo3/cms-core: ^13.4 || ^14.3
- typo3/cms-fluid: ^13.4 || ^14.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^11
- psbits/qa: @dev
- roave/security-advisories: dev-latest
- saschaegerer/phpstan-typo3: ^2.1 || ^3.0
- typo3/testing-framework: ^9.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Collection of debugging tools
Installation
composer require psbits/debug
Development
composer install composer qa
composer qa fixes everything that can be fixed automatically and afterwards runs all linters, the static
analysis and the test suites. The same checks run in the CI GitHub Actions workflow and in the pre-commit
hook that is installed by composer install.
Quality checks for contributors
composer lint:all: runs all configured lint and validation checkscomposer test:unit/composer test:functional: run the respective suite against the installed corecomposer test:local: runs the local (non-Docker) matrix. Without arguments it runs all local legs (13.4 and 14.3, each plus its lowest dependency set); with arguments it runs a single leg, e.g.composer test:local -- 13.4orcomposer test:local -- 14.3 --lowest. TheBuild/Scripts/runTests.shrunner pins the requested core in a generatedcomposer-matrix.json(tracked files are never modified) and leaves.Buildon the tested core afterwardscomposer test:docker: runs the Docker matrix (see "Testing with Docker" below)composer test:all: runs the local matrix plus the full Docker matrixcomposer qa: runs all fixes, all lint checks and the test suite
Code coverage
CI measures the line coverage of the unit and functional suites once per run (job
"Code coverage", TYPO3 13.4 / PHP 8.4 with pcov) and uploads the clover/cobertura/html
reports as the coverage artifact. Each suite's coverage must not drop below the
baseline in Build/Quality/coverage-baseline.json (tolerance: 0.5 points to absorb
small drift between PHP versions); the job fails when it does.
composer test:coverage: runs both suites with coverage and checks the baseline (requires the pcov or xdebug PHP extension; without one the suites run without coverage)composer test:coverage:update-baseline: runs both suites and rewritesBuild/Quality/coverage-baseline.jsonwith the measured values (requires a coverage driver)
Testing with Docker
To run the test matrix on PHP versions that are not installed locally, or against a real database,
use the Docker setup in Build/testing-docker/:
- Build the test images once (one per supported PHP version):
composer docker:images - Run the whole Docker matrix:
composer test:docker(8 legs: for 13.4 and 14.3 each - sqlite, sqlite-lowest, MariaDB and PostgreSQL) - Run a single leg:
composer test:docker -- <core-version> [--lowest] [--db sqlite|mysql|postgres], e.g.composer test:docker -- 13.4 --db postgres. The--dbflag selects the compose service that carries the database connection settings. - Switch the PHP version with
PHP_VERSION=8.3 composer test:docker -- 13.4(default is 8.4).
Every matrix run announces each leg and each step (matrix environment, composer update, unit tests, functional tests) with a prominent banner - colored green/red for pass/fail when run in a terminal - keeps running after a failed leg, and ends with a summary table of all legs; the exit code is non-zero if any leg failed.
Without Docker, runTests.sh also accepts --db mysql|postgres and reads the connection settings
from the typo3Database* environment variables (host, port, username, password, name) - see the
script header for the defaults.
The CI workflow also publishes the extension to TER when a semver tag is pushed. Publishing requires
the TYPO3_API_TOKEN repository secret.