update README and CHANGELOG
This commit is contained in:
parent
17ad40b91f
commit
d48132c93d
|
|
@ -13,3 +13,12 @@ All notable changes to this project will be documented in this file.
|
|||
- Unit of Work (opt‑in): identity map; deferred updates/deletes; relation‑aware delete cascades; optimistic locking; snapshot diffing (flagged); identity map controls; coalescing.
|
||||
- Event system: DAO and UoW events; listeners/subscribers.
|
||||
- CI: GitHub Actions matrix (PHP 8.1–8.3) with MySQL + Mongo services; guarded tests.
|
||||
|
||||
#### 0.1.0 — 2025-12-11
|
||||
|
||||
- Dependencies: upgrade `mongodb/mongodb` to `^2.0` (tested at 2.1.x). Requires `ext-mongodb >= 2.1`.
|
||||
- Tests: migrate to PHPUnit 10; update `phpunit.xml.dist` and test cases accordingly.
|
||||
- MongoDB tests: marked as `@group mongo-integration` and skipped by default via `phpunit.xml.dist` group exclusion. Each test pings the server and skips when not available.
|
||||
- SQL tests: stabilized MySQL `belongsToMany` eager and join-eager tests by aligning anonymous DAO constructors with runtime patterns and adding needed projections.
|
||||
- PostgreSQL: fix identifier quoting by using double quotes in `PostgresGrammar` (no more backticks in generated DDL). `PostgresSmokeTest` passes when a Postgres instance is available.
|
||||
- SQLite: portable DDL in schema tests; minor assertion cleanups for accessors/casters.
|
||||
|
|
|
|||
32
README.md
32
README.md
|
|
@ -24,6 +24,38 @@ composer require getphred/pairity
|
|||
|
||||
After install, you can use the CLI at `vendor/bin/pairity`.
|
||||
|
||||
## Testing
|
||||
|
||||
This project uses PHPUnit 10. The default test suite excludes MongoDB integration tests by default for portability.
|
||||
|
||||
- Install dev dependencies:
|
||||
|
||||
```
|
||||
composer install
|
||||
```
|
||||
|
||||
- Run the default suite (SQLite + unit tests; Mongo tests excluded by default):
|
||||
|
||||
```
|
||||
vendor/bin/phpunit
|
||||
```
|
||||
|
||||
- Run MongoDB integration tests (requires `ext-mongodb >= 2.1` and a reachable server):
|
||||
- Provide connection via environment variables and include the group:
|
||||
|
||||
```
|
||||
MONGO_HOST=127.0.0.1 MONGO_PORT=27017 \
|
||||
vendor/bin/phpunit --group mongo-integration
|
||||
```
|
||||
|
||||
Notes:
|
||||
- When Mongo is unavailable or the extension is missing, Mongo tests will self‑skip.
|
||||
- PostgreSQL smoke test requires environment variables (skips if missing):
|
||||
- `POSTGRES_HOST` (required to enable), optional `POSTGRES_PORT`, `POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASS`.
|
||||
- PostgreSQL identifiers are generated with double quotes by the schema grammar.
|
||||
- MySQL tests require:
|
||||
- `MYSQL_HOST` (required to enable), optional `MYSQL_PORT`, `MYSQL_DB`, `MYSQL_USER`, `MYSQL_PASS`.
|
||||
|
||||
## Quick start
|
||||
|
||||
Minimal example with SQLite (file db.sqlite) and a simple `users` DAO/DTO.
|
||||
|
|
|
|||
Loading…
Reference in a new issue