Skip to content

Conversation

@giuscris
Copy link
Member

This pull request introduces comprehensive support for PHPUnit-based testing in the project. It adds PHPUnit as a development dependency, provides configuration and sample tests, and updates tooling and CI/CD scripts to properly handle the new test suite. Additionally, it refines the handling of test files across code quality, backup, and packaging processes.

Testing infrastructure:

  • Added phpunit/phpunit as a development dependency in composer.json, and introduced scripts for running tests and generating coverage reports.
  • Added a phpunit.xml.dist configuration file and a bootstrap file for PHPUnit.
  • Added a set of unit tests and fixtures under the tests/ directory, covering core data classes and traits. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Tooling and configuration updates:

  • Updated .vscode/settings.json to exclude test helper files from PHP Intelephense and fixed ESLint config usage.
  • Updated formwork/.php-cs-fixer.php and formwork/.rector.php to exclude or include the tests/ directory as appropriate for code quality tools. [1] [2] [3]
  • Updated formwork/phpstan.neon to exclude the tests/ directory from static analysis.

Backup and packaging adjustments:

  • Excluded tests/ from backup in formwork/config/system.yaml and from release asset packaging in .github/workflows/release.yaml. [1] [2]
@giuscris giuscris self-assigned this Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants