Skip to content

Make CI green: ChangeSet fix + lowest-deps bumps for PHP 8.4+ - #20

Merged
Spamercz merged 3 commits into
v2.0from
fix/ci-green
Nov 10, 2026
Merged

Spamercz merged 3 commits into
v2.0from
fix/ci-green

Conversation

@Spamercz

Copy link
Copy Markdown
Contributor

All five red jobs on v2.0 had four independent causes. Each was reproduced and fixed locally across the full matrix (PHP 8.2/8.5 × standard/lowest) against ES 9.2.2 configured like CI.

1. ClearTest::testClearRemovesChangeSetTracking (every test job): real bug

persist() put the entity into the IdentityMap but never marked it existing in the ChangeSet. find() then returned that instance and the ChangeSet still treated it as new. The visible effect: persisting the same instance twice fired POST_CREATE twice instead of POST_UPDATE. persist() now calls markExisting() after all events have been dispatched. A regression test is added in PersistTest.

2. PHPStan (lowest deps)

PHPStan ≤ 1.11.9 crashes on PHP 8.5 (Type of …ReflectionClass::IS_READONLY must be compatible). The minimum is now ^1.11.10, and the ignore in phpstan-low.neon that no longer matched has been removed.

3. PHP 8.5 lowest (110/110 failures)

Implicitly nullable parameters are E_DEPRECATED on PHP 8.4+, and Tester fails on them. The table lists the first fixed versions:

Package Was resolved Now
tracy/tracy 2.6.7 ^2.9
symfony/console 7.0.2 ^7.0.3
nette/neon (via nette/di) 3.3.0 conflict <3.3.4 || >=3.4.0 <3.4.4 (3.4.0–3.4.3 regressed)
symfony/string (via console) 6.4.0 conflict <6.4.3 || >=7.0 <7.0.3
psr/http-factory 1.0.0 conflict <1.1

Transitive packages are constrained via conflict rather than new direct requirements.

4. PHP 8.2 lowest (mb_ord() undefined, 21 failures)

Tests run with php -n, so there is no ext-mbstring, and polyfill-mbstring 1.0.0 has no mb_ord. Fixed with conflict symfony/polyfill-mbstring <1.3.

PHP >=8.2 support is unchanged.

🤖 Generated with Claude Code

MrSpamer Bot and others added 3 commits November 10, 2026 22:31
…eSet

persist() put the entity into the IdentityMap but never into the ChangeSet,
so find() right after persist() returned an instance the ChangeSet called new,
and persisting the same instance again fired POST_CREATE a second time
instead of POST_UPDATE. Fixes ClearTest::testClearRemovesChangeSetTracking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 8.2-8.5

- tracy/tracy ^2.9, symfony/console ^7.0.3: older ones have implicitly
  nullable parameters, an E_DEPRECATED (= test failure) on PHP 8.4+
- phpstan/phpstan ^1.11.10: <=1.11.9 crashes on PHP 8.5 (IS_READONLY type)
- conflict with transitive versions that break on PHP 8.4+ (nette/neon,
  symfony/string, psr/http-factory) or lack mb_ord() (polyfill-mbstring <1.3,
  tests run with php -n, so no ext-mbstring)
- phpstan-low.neon: drop the ignore that no longer matches

PHP >=8.2 stays supported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dump reads through search, so right after the restore it could see
fewer than 11 documents and the test failed on \$exploded[10] (flaky,
hit PHP 8.2 standard on #20).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Spamercz
Spamercz merged commit 5017b69 into v2.0 Nov 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant