You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Chore: Upgrade PHPUnit to 12, modernize tests, refresh Rector sets
- Bump phpunit/phpunit ^9.5 -> ^12.0, phpstan/phpstan ^2.0 -> ^2.1, rector/rector ^2.0 -> ^2.4.
- Migrate phpunit.xml to the PHPUnit 12 schema; exclude the BaseTest trait and
the misnamed UtopiaFPMRequestTest mock helper from the unit suite.
- Add PHPUnit 10/11/12, code-quality, and annotations-to-attributes sets to
rector.php; drop three skip entries rector reported as unregistered; skip
AssertEmptyNullableObjectToAssertInstanceofRector since it weakens assertNull.
- Apply rector: declare(strict_types=1) in tests, final test classes, generator
data provider, and assertEquals -> assertSame where types are inferable.
- Manual cleanup: assertEquals(null|true|false, x) -> specific methods; fix
RequestTest::testCanRemoveHeaders which relied on null == '' loose equality
(getHeader returns string); replace closure-vs-closure assertEquals in
RouteTest::testCanSetAndGetAction with assertInstanceOf(Closure::class, ...).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Chore: Bump swoole test image to appwrite/base:1.2.0 (PHP 8.5)
The CI e2e-swoole job failed because appwrite/base:0.5.0 ships PHP 8.2.6,
but PHPUnit 12 requires PHP >= 8.3. Bumping to 1.2.0 (PHP 8.5.4, swoole
included) matches the library's >=8.3 floor and the host test runtime.
Drop the now-redundant curl_close() call in tests/e2e/Client.php — PHP 8.5
deprecates it (the handle is released on last reference since 8.0 anyway).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Chore: Declare coverage source in phpunit.xml
PHPUnit 12 requires a <source> section for coverage to run; without it the
runner emits "No filter is configured, code coverage will not be processed"
and CI's --coverage-* flags exit non-zero. Point coverage at ./src.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Chore: Add PHPUnit schema reference, tighten Route/Response assertions
- phpunit.xml: add xmlns:xsi and xsi:noNamespaceSchemaLocation pointing at
vendor/phpunit/phpunit/phpunit.xsd so PHPUnit 12 (and IDE tooling) get
XML schema validation.
- HttpTest: swap reversed assertEquals(actual, expected) pairs in
testCanSetRoute, testCanMatchRoute, and testCanMatchFreshRoute to the
expected-first convention, and promote them to assertSame — setRoute
and match return the exact Route instance, so identity is the precise
check and the diff on failure reads correctly.
- ResponseTest: promote fluent-interface assertions on addHeader /
addCookie to assertSame for the same reason.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments