Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
db-matrix
freepeace13/laraversine
claude-code
database-testing
docker-compose
phpunit
mysql
postgres
test-matrix

Run the PHPUnit suite locally against SQLite, MySQL, MariaDB and PostgreSQL using the benchmark docker containers. Use before pushing a change that touches SQL.

Install
php artisan boost:add-skill freepeace13/laraversine

Save this content to: .claude/skills/db-matrix/SKILL.md

# DB matrix

Run the suite against every supported database before CI does. `tests/TestCase.php` reads `DB_DRIVER` plus optional `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`. `benchmarks/docker-compose.yml` provides matching containers (database `laraversine_test`, password `root`).

Arguments: optional list of drivers to run (default: all).

## Steps

1. `vendor/bin/phpunit` for SQLite.
2. `docker compose -f benchmarks/docker-compose.yml up -d mysql mariadb postgres`, then wait until each accepts connections.
3. Run, one at a time:
   - `DB_DRIVER=mysql DB_HOST=127.0.0.1 DB_PORT=3306 vendor/bin/phpunit`
   - `DB_DRIVER=mariadb DB_HOST=127.0.0.1 DB_PORT=3307 vendor/bin/phpunit`
   - `DB_DRIVER=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_USERNAME=postgres vendor/bin/phpunit`
4. Report a table of driver, tests, assertions, failures. For each failure quote the test name and message, and say whether it is driver-specific (passes on SQLite).
5. Stop the containers with `docker compose -f benchmarks/docker-compose.yml down` only if this run started them.

## Rules

- If Docker is not running, say so and run only SQLite; never report a database as passing that did not run.
- Do not edit code to make a driver pass; report the failure.

DB matrix

Run the suite against every supported database before CI does. tests/TestCase.php reads DB_DRIVER plus optional DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD. benchmarks/docker-compose.yml provides matching containers (database laraversine_test, password root).

Arguments: optional list of drivers to run (default: all).

Steps

  1. vendor/bin/phpunit for SQLite.
  2. docker compose -f benchmarks/docker-compose.yml up -d mysql mariadb postgres, then wait until each accepts connections.
  3. Run, one at a time:
    • DB_DRIVER=mysql DB_HOST=127.0.0.1 DB_PORT=3306 vendor/bin/phpunit
    • DB_DRIVER=mariadb DB_HOST=127.0.0.1 DB_PORT=3307 vendor/bin/phpunit
    • DB_DRIVER=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_USERNAME=postgres vendor/bin/phpunit
  4. Report a table of driver, tests, assertions, failures. For each failure quote the test name and message, and say whether it is driver-specific (passes on SQLite).
  5. Stop the containers with docker compose -f benchmarks/docker-compose.yml down only if this run started them.

Rules

  • If Docker is not running, say so and run only SQLite; never report a database as passing that did not run.
  • Do not edit code to make a driver pass; report the failure.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus