Skip to content

Latest commit

 

History

History
91 lines (61 loc) · 2.5 KB

internals.md

File metadata and controls

91 lines (61 loc) · 2.5 KB

Internals

Github actions

All our packages have github actions by default, so you can test your contribution in the cloud.

Note: We recommend pull requesting in draft mode until all tests pass.

Unit testing

This package can be tested globally or individually for each DBMS.

Docker images

For greater ease it is recommended to use Docker containers for each DBMS, for this you can use the docker-compose.yml file that in the root directory of each package.

For running the Docker containers you can use the following command:

docker compose up -d

Global testing

The following steps are required to run the tests.

  1. Run all Docker containers for each DBMS.
  2. Install the dependencies of the project with composer.
  3. Run the tests.
./vendor/bin/phpunit

Individual testing

The following steps are required to run the tests.

  1. Run the Docker container for the dbms you want to test.
  2. Install the dependencies of the project with composer.
  3. Run the tests.
./vendor/bin/phpunit --testsuite=Pgsql

Suites available:

  • Mssql
  • Mysql
  • Oracle
  • Pgsql
  • Sqlite

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

./vendor/bin/psalm

Code style

Use Rector to make codebase follow some specific rules or use either newest or any specific version of PHP:

./vendor/bin/rector

Dependencies

This package uses composer-require-checker to check if all dependencies are correctly defined in composer.json. To run the checker, execute the following command:

./vendor/bin/composer-require-checker