Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
70153e1
Link Host capability examples from the usage guide
megyptm Nov 27, 2026
2551376
Document checkout lifecycle and transaction failure contracts
megyptm Nov 27, 2026
9c67376
Reconcile decision references and document original licensing evidence
megyptm Nov 27, 2026
ef75504
Align package outcomes, Ordering inputs, and internal records
megyptm Nov 27, 2026
8993593
Assert the Ordering validation exception in integration
megyptm Nov 27, 2026
9c15309
Keep the consumer savepoint failure fixture after validation
megyptm Nov 27, 2026
a8e911c
Surface failed raw Ordering settlement before normal results
megyptm Nov 27, 2026
196b5c3
Assert Ordering reuses the shared internal transaction executor
megyptm Nov 27, 2026
da3bc58
Propagate Composer lint failures and link the security policy
megyptm Nov 27, 2026
9807007
Document the RC.2 constructor compatibility change
megyptm Nov 27, 2026
48601c3
Document PHP checkout, settlement, and fixture contracts
megyptm Nov 28, 2026
3b07292
Clarify continuity checks before reusing verified transactions
megyptm Nov 28, 2026
2df813f
Load repository-owned fixture and tooling classes through PSR-4
megyptm Nov 28, 2026
c0867eb
Verify enum case names, class declarations, and split pipe chains
megyptm Nov 28, 2026
23dda2d
Adopt PascalCase enums and preserve settlement JSON codes
codex Nov 28, 2026
404f8e5
Verify packed array values and split ternary layout
megyptm Nov 28, 2026
7572169
Normalize packed array entries and split ternary layout
megyptm Nov 28, 2026
bf4caa9
Separate pipe chains at lower-precedence operators
megyptm Nov 28, 2026
258fd3f
Complete multiline formatting checks and include documentation PHP
megyptm Nov 28, 2026
db5793c
Verify split binary operator layout against PER Coding Style 3.1
megyptm Nov 28, 2026
fa4565e
Recognize dynamic variable operands in split operators
megyptm Nov 28, 2026
63edd4d
Require ternary operators to begin their source lines
megyptm Nov 28, 2026
c1a7dae
Check split pipeline placement from the expression start
megyptm Nov 28, 2026
e27c5b4
Preserve split layout for pipelines spanning operator lines
megyptm Nov 28, 2026
cf07db5
[Batch 6] Verify testing conformance (#110)
megyptm Nov 28, 2026
5565625
[Batch 7] Share the fail-closed Composer dependency audit (#111)
megyptm Nov 28, 2026
fa951f2
[Batch 8] Reconcile Stable release presentation and Host B example (#…
megyptm Nov 28, 2026
e5ec3e1
Scope residue proof to owned locks and reconcile checkout docs
megyptm Nov 28, 2026
ec03459
Clarify syntax scope and link PHP patch verification
megyptm Nov 28, 2026
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
17 changes: 2 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,8 @@ jobs:
run: composer check-platform-reqs
- name: PHP syntax on this PHP minor
run: composer syntax
- name: Dependency policy is configured fail-closed
run: |
set -euo pipefail
for variable in COMPOSER_POLICY COMPOSER_NO_BLOCKING COMPOSER_NO_AUDIT COMPOSER_AUDIT_ABANDONED COMPOSER_POLICY_ADVISORIES_BLOCK COMPOSER_POLICY_MALWARE_BLOCK; do
if [ -n "${!variable:-}" ]; then
echo "$variable weakens the dependency policy" >&2
exit 1
fi
done
composer config policy | jq -e '
.advisories.block == true and .advisories.audit == "fail"
and .malware.block == true and .malware["block-scope"] == "all" and .malware.audit == "fail"
and .abandoned.audit == "fail"'
- name: Composer audit (advisories, malware, abandoned)
run: composer audit --no-interaction --abandoned=fail
- name: Composer dependency policy audit
run: php scripts/dependency-audit.php
- name: Static analysis (PHPStan max)
run: composer analyse
# PHP CS Fixer 3.95.32 refuses PHP 8.6 (it supports syntax up to 8.5), so the formatter runs in its
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

$finder = (new Finder())
->in(__DIR__)
->exclude(['vendor', 'docs'])
->exclude('vendor')
->name('*.php')
->ignoreDotFiles(false);

Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
- Static composite and dynamic Offset sorting through separate entry points. Static plans define fixed trailing terms. Dynamic sorting accepts up to three allowlisted request sort keys with independent directions.
- Protected Host write checkouts with registered commands and guarded Ordering. The Host directs transaction completion and uses the settlement to choose handoff or discard.
- Verified Apply/Discard (C2) for package-owned and Host-owned transactions. It returns the decision payload after confirming the required control and reports the database outcome and connection disposition separately.
- JSON projections for C1, B, Protected and Verified settlement DTOs. Enum fields use stable uppercase codes and absent fields remain null. B's live PDO handoff uses `HostSnapshotRetirement`, and Verified callbacks return `VerifiedTransactionDecisionCommand`.
- Protected UNIQUE-safe Ordering (B1) for eligible dense InnoDB lists. Hosts can allocate an append position, move rows, or run a registered delete with compaction under one scope anchor.

### Changed

- Raised the Composer PHP patch floors from RC.2's `^8.4`. PHP 8.4.0–8.4.26 and 8.5.0–8.5.11 can no longer resolve this version. The admitted ranges start at 8.4.27 for PHP 8.4 and 8.5.12 for PHP 8.5, with forward eligibility within PHP 8.
- Raw Ordering allocation through `ScopedOrderingManager::getNextPositionForUpdate()` stops after 64 locking tail reads by default. The optional `maxTailReads` argument accepts 2–512. A tail that would have stabilized later under RC.2 can now raise the existing `OrderingExecutionException` with `TAIL_READ_LIMIT_EXCEEDED` metadata. Existing positional and named calls remain valid. The Host retains control of transaction completion and acquired locks.
- Raw and protected `moveWithinScope()` validate `updatedAtValue` before issuing SQL. When `updatedAtColumn` is configured, provide a valid `YYYY-MM-DD HH:MM:SS` value with an optional 1–6 digit fraction. This narrows RC.2's driver-dependent acceptance. Convert other formats in the Host before calling the manager.
- Raw `moveWithinScope()` now throws when settlement of an otherwise ordinary `false` result fails. This changes RC.2 behavior for an unconfirmed package-owned rollback or failed local savepoint release. Handle the existing `TransactionExecutionException` or the original driver throwable and resolve connection state before reuse. Normal results and Host transaction ownership continue to follow the [Ordering contract](PHP_PERSISTENCE_PACKAGE_REFERENCE.md#54-scopedorderingmanager).
- **Breaking from RC.2:** Constructors reject a trailing LF in direct `PageResultDTO` sort keys, `SortWhitelist` keys and SQL identifier paths, pagination binding keys, and `ScopedOrderingConfig` table and column names. RC.2 could accept these inputs under its published patterns. Supply canonical names at the call site and match binding keys to the SQL placeholders. See the [migration guidance](PHP_PERSISTENCE_PACKAGE_REFERENCE.md#15-rc2-constructor-input-migration).
- **Breaking from RC.2:** `SortDirectionEnum` declares `Asc` and `Desc`. The `ASC` and `DESC` aliases still resolve to the same direction values. Enum name reads, `cases()`, Reflection and native PHP serialized payloads now use PascalCase. Decode older persisted payloads with RC.2 before upgrading, or rebuild caches. Backing strings, SQL and pagination JSON retain `ASC` and `DESC`. See the [migration guidance](PHP_PERSISTENCE_PACKAGE_REFERENCE.md#16-rc2-sort-direction-migration).

### Fixed

- Preserve the original transaction or savepoint failure when the cleanup state check also fails.
- Attempt to release count and data cursors after pagination read, validation, or mapper failures while preserving the original error.
- Reject terminal newlines in trusted SQL identifiers, named binding keys, decimal COUNT values and direct result sort keys.
- Reject trailing LF in COUNT strings so they contain only decimal digits, as required by the RC.2 contract.

## [1.0.0-rc.2] - 2026-11-18

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Code of Conduct — maatify/php-persistence

[![Maatify PHP Persistence](https://img.shields.io/badge/Maatify-PHP_Persistence-blue?style=for-the-badge)](https://github.com/Maatify-ltd/php-persistence)
[![Maatify Ecosystem](https://img.shields.io/badge/Maatify-Ecosystem-9C27B0?style=for-the-badge)](https://github.com/Maatify)
[![Maatify Ecosystem](https://img.shields.io/badge/Maatify-Ecosystem-9C27B0?style=for-the-badge)](https://github.com/Maatify-ltd)

## Our Standard

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ composer validate --strict
composer verify:php-constraint # Composer solver checks for the declared PHP boundaries
composer check-platform-reqs
composer dump-autoload --optimize --strict-psr
composer audit --no-interaction --abandoned=fail
php scripts/dependency-audit.php # Composer 2.10+ and a freshly resolved composer.lock
composer analyse # PHPStan, level max, zero errors, no baseline
composer format:check # full code-style check on PHP 8.4 or 8.5, non-mutating
composer syntax # php -l over src, tests, scripts, examples
composer syntax # lints PHP in src/, tests/, scripts/, examples/, harness/, docs/, and root .php-cs-fixer.php
composer whitespace # git diff --check
composer test:unit # no Docker needed
composer test:regression # no Docker needed
composer test:integration # needs Docker; starts a disposable MySQL/MariaDB service
composer examples:smoke # needs Docker; smoke-executes examples/ against a real engine
composer examples:smoke # needs Docker; runs standalone examples against a real engine
composer test:consumer # needs Docker; two fresh external Composer verification runs
actionlint .github/workflows/*.yml
```
Expand Down
Loading