Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ monorepo root with the whole root mounted, e.g.
`docker run --rm -v "$PWD":/repo -w /repo/property-testing-phpunit composer:2 …`):

```bash
composer config repositories.core '{"type":"path","url":"../property-testing-core","options":{"versions":{"rasuvaeff/property-testing-core":"0.9.0"}}}'
composer config repositories.core '{"type":"path","url":"../property-testing-core","options":{"versions":{"rasuvaeff/property-testing-core":"1.0.0"}}}'
composer update
composer config --unset repositories.core
rm composer.lock
Expand Down Expand Up @@ -104,7 +104,7 @@ parity is golden rule 3.
|---|---|---|---|---|
| `PROPERTY_RUNS` | Always (`false`/`''` = unset) | `/^\d+\z/`, `>= 1` | Overrides every property's run count, including `runs()` | `InvalidArgumentException` |
| `PROPERTY_SEED` | Only when `seed()` was not called (explicit seed wins) | `/^-?\d+\z/` | Seeds every unseeded property; unset means a random seed per property | `InvalidArgumentException` |
| `PROPERTY_VERBOSE` | Always | `''` = unset; `0`, `false`, `off`, `no` (case-insensitive, trimmed) = off; anything else enables (core `EnvironmentOverrides::flag()`; core 0.9 knows only `''`/`0`) | Attaches `VerboseListener`: every run's arguments/draws and each accepted shrink step | n/a (off words disable) |
| `PROPERTY_VERBOSE` | Always | `''` = unset; `0`, `false`, `off`, `no` (case-insensitive, trimmed) = off; anything else enables (core `EnvironmentOverrides::flag()`) | Attaches `VerboseListener`: every run's arguments/draws and each accepted shrink step | n/a (off words disable) |
| `PROPERTY_DB` | Always (`false`/`''` = off, nothing written) | Directory path (created on demand) **or** `redis://host[:port][/db][?prefix=key-prefix]` (`rediss://` = TLS; core `CorpusFactory`) | Regression corpus via core's `CorpusFactory::fromDsn()` (`CorpusFromEnv` was removed in 0.6.0): a path builds a `FilesystemCorpus`, a DSN a `RedisCorpus` (ext-redis preferred, else predis). An explicit `seed()` disables replay for that property | `InvalidArgumentException` — an unusable DSN, or no Redis client installed. Never a silent fall back to the filesystem |
| `PROPERTY_PHASES` | Always (`false`/`''` = unset) | Comma-separated phase names, case-insensitive: `examples`, `corpus`, `random`, `shrink` | Stages of every run, in run order — **overrides** `phases()` | `InvalidArgumentException` naming the accepted values |
| `PROPERTY_DERANDOMIZE` | Always | Same words as `PROPERTY_VERBOSE` | Derives every unset seed from the property id — **overrides** `derandomize()` | n/a (off words disable) |
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 1.0.0 — 2026-09-20

The stability release, in step with `rasuvaeff/property-testing-core` 1.0.0.
The adapter's surface is that of 0.10.0, unchanged: the `PropertyTesting`
trait, the `forAll()` chain with its knobs, `PropertyCheck`, the listeners
and the environment table. A project on `^0.10` upgrades by widening the
constraint to `^1.0`.

- Requires `rasuvaeff/property-testing-core` `^1.0` (compatibility policy
§8: a caret on the engine's current major).
- **Docs:** the footnotes that dated a behaviour to a core 0.x release
(`since core 0.9`, `core 0.9 reads only …`) are gone from the READMEs,
`llms.txt` and `AGENTS.md`; `llms.txt` names the current requirement.

## 0.10.0 — 2026-09-20

- **Added:** the core 0.12 knobs on the chain — `exhaustive()` /
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ read — inside an ordinary PHPUnit `TestCase`.

- PHP 8.3+
- [`phpunit/phpunit`](https://packagist.org/packages/phpunit/phpunit) `^11.5 || ^12.0 || ^13.0`
- [`rasuvaeff/property-testing-core`](https://packagist.org/packages/rasuvaeff/property-testing-core) `^0.12`
- [`rasuvaeff/property-testing-core`](https://packagist.org/packages/rasuvaeff/property-testing-core) `^1.0`

PHPUnit 13 requires PHP 8.4.1 or newer. On PHP 8.3, Composer resolves a
compatible PHPUnit 11 or 12 release.
Expand Down Expand Up @@ -266,7 +266,7 @@ would otherwise falsify every run without a word of explanation.
- `markTestSkipped()` / `markTestIncomplete()` inside the body **skip that
run** (a discard); when every run skipped, the skip is rethrown and PHPUnit
reports the test as skipped or incomplete. Partly skipped runs spend a budget
of their own, separate from `maxDiscards`: since core 0.9 a skip is not a
of their own, separate from `maxDiscards`: a skip is not a
discard, and when that budget runs out the message names the environment
rather than advising narrower generators. Unlike an `Assume::that()` discard,
a skip says nothing about the input, so a recorded regression whose replay
Expand All @@ -290,7 +290,7 @@ Byte-for-byte parity with the Testo adapter — one contract across adapters:
|---|---|
| `PROPERTY_RUNS` | Positive integer that overrides every property's run count (dial runs up in CI) |
| `PROPERTY_SEED` | Integer seed for any property without an explicit `seed()` (replay a whole suite). An explicit `seed()` still wins |
| `PROPERTY_VERBOSE` | Enables the trace of every run's generated arguments and each accepted shrink step. `''` is unset; `0`, `false`, `off`, `no` (case-insensitive, trimmed) are off; anything else is on. Core 0.9 reads only `''`/`0` as off |
| `PROPERTY_VERBOSE` | Enables the trace of every run's generated arguments and each accepted shrink step. `''` is unset; `0`, `false`, `off`, `no` (case-insensitive, trimmed) are off; anything else is on. |
| `PROPERTY_DB` | Directory path enabling the regression corpus, or a `redis://host[:port][/db][?prefix=key-prefix]` DSN (`rediss://` for TLS) for a corpus shared between CI and developers. Unset means off, nothing is written |
| `PROPERTY_PHASES` | Comma-separated stage list (`examples,corpus,random,shrink`, case-insensitive) that overrides `phases()` — an unknown name throws rather than skipping a stage. `examples,corpus` is the fast pull-request gate |
| `PROPERTY_DERANDOMIZE` | Derives every unset seed from the property id, making a whole suite reproducible without editing it. Same switch words as `PROPERTY_VERBOSE`: `''` is unset, `0`/`false`/`off`/`no` are off, anything else is on |
Expand Down
6 changes: 3 additions & 3 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ shrink до минимального контрпримера, который р

- PHP 8.3+
- [`phpunit/phpunit`](https://packagist.org/packages/phpunit/phpunit) `^11.5 || ^12.0 || ^13.0`
- [`rasuvaeff/property-testing-core`](https://packagist.org/packages/rasuvaeff/property-testing-core) `^0.12`
- [`rasuvaeff/property-testing-core`](https://packagist.org/packages/rasuvaeff/property-testing-core) `^1.0`

PHPUnit 13 требует PHP 8.4.1 или новее. На PHP 8.3 Composer выбирает
совместимый релиз PHPUnit 11 или 12.
Expand Down Expand Up @@ -264,7 +264,7 @@ $this->forAll(['width' => Gen::intBetween(1, 5000), 'minWidth' => Gen::intBetwee
- `markTestSkipped()` / `markTestIncomplete()` внутри тела **пропускают этот
прогон** (discard); если пропущены все прогоны, исключение пробрасывается, и
PHPUnit помечает тест skipped/incomplete. Частично пропущенные прогоны
тратят собственный бюджет, отдельный от `maxDiscards`: с core 0.9 skip — не
тратят собственный бюджет, отдельный от `maxDiscards`: skip — не
discard, и при исчерпании этого бюджета сообщение называет окружение, а не
советует сузить генераторы. В отличие от discard'а по `Assume::that()`, skip
ничего не говорит о входе, поэтому записанная регрессия, чей реплей только
Expand All @@ -287,7 +287,7 @@ $this->forAll(['width' => Gen::intBetween(1, 5000), 'minWidth' => Gen::intBetwee
|---|---|
| `PROPERTY_RUNS` | Положительное целое, переопределяет число прогонов каждой property (поднять runs в CI) |
| `PROPERTY_SEED` | Целочисленный seed для property без явного `seed()` (реплей всего suite). Явный `seed()` важнее |
| `PROPERTY_VERBOSE` | Включает трассу: аргументы каждого прогона и каждый принятый shrink-шаг. `''` — не задано; `0`, `false`, `off`, `no` (регистр не важен, пробелы обрезаются) — выключено; всё остальное — включено. Core 0.9 считает выключением только `''`/`0` |
| `PROPERTY_VERBOSE` | Включает трассу: аргументы каждого прогона и каждый принятый shrink-шаг. `''` — не задано; `0`, `false`, `off`, `no` (регистр не важен, пробелы обрезаются) — выключено; всё остальное — включено. |
| `PROPERTY_DB` | Путь к каталогу, включающий регрессионный корпус, либо DSN `redis://host[:port][/db][?prefix=key-prefix]` (`rediss://` для TLS) для корпуса, общего между CI и разработчиками. Не задан — выключен, ничего не пишется |
| `PROPERTY_PHASES` | Список стадий через запятую (`examples,corpus,random,shrink`, регистр не важен), перекрывающий `phases()`; неизвестное имя — исключение, а не пропуск стадии. `examples,corpus` — быстрый гейт для pull request |
| `PROPERTY_DERANDOMIZE` | Выводит каждый незаданный seed из id property: весь сьют становится воспроизводимым без правки кода. Те же слова-переключатели, что у `PROPERTY_VERBOSE`: `''` — не задано, `0`/`false`/`off`/`no` — выключено, всё остальное — включено |
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"require": {
"php": "8.3 - 8.5",
"phpunit/phpunit": "^11.5 || ^12.0 || ^13.0",
"rasuvaeff/property-testing-core": "^0.12"
"rasuvaeff/property-testing-core": "^1.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.51",
Expand Down
4 changes: 2 additions & 2 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ composer require --dev rasuvaeff/property-testing-phpunit

Requires PHP 8.3–8.5, `phpunit/phpunit` `^11.5 || ^12.0 || ^13.0`
(PHPUnit 13 requires PHP 8.4.1+; PHP 8.3 resolves PHPUnit 11 or 12),
`rasuvaeff/property-testing-core` `^0.9 || ^0.10 || ^0.11`.
`rasuvaeff/property-testing-core` `^1.0`.

## Rules

Expand Down Expand Up @@ -141,7 +141,7 @@ final class SortPropertyTest extends TestCase
|---|---|---|
| `PROPERTY_RUNS` | positive integer within range (no saturation) | Overrides every property's run count; invalid value throws `InvalidArgumentException` |
| `PROPERTY_SEED` | integer within range | Seeds properties without an explicit `seed()`; `seed()` wins; invalid value throws |
| `PROPERTY_VERBOSE` | `''` = unset; `0`/`false`/`off`/`no` (case-insensitive, trimmed) = off; anything else = on (core 0.9: only `''`/`0` are off) | Trace: each run's arguments/draws, each accepted shrink step |
| `PROPERTY_VERBOSE` | `''` = unset; `0`/`false`/`off`/`no` (case-insensitive, trimmed) = off; anything else = on | Trace: each run's arguments/draws, each accepted shrink step |
| `PROPERTY_DB` | directory path OR `redis://host[:port][/db][?prefix=key-prefix]` (`rediss://` = TLS; parsed by core `CorpusFactory`) | Regression corpus: record on falsification, replay first on the next run, prune on green. A DSN builds a RedisCorpus (ext-redis preferred, else predis; neither installed THROWS) — same document as the directory form, shared between CI and developers |
| `PROPERTY_PHASES` | `examples,corpus,random,shrink` (comma-separated, case-insensitive) | Stages to run; OVERRIDES `phases()`; unknown name throws |
| `PROPERTY_DERANDOMIZE` | same switch words as `PROPERTY_VERBOSE` | Unset seeds derived from the property id; `seed()`/`PROPERTY_SEED` still win |
Expand Down
Loading