Skip to content

chore: bump base image to php 8.5 and update dev tool versions#229

Merged
loks0n merged 10 commits into
mainfrom
chore/bump-versions-2
May 14, 2026
Merged

chore: bump base image to php 8.5 and update dev tool versions#229
loks0n merged 10 commits into
mainfrom
chore/bump-versions-2

Conversation

@loks0n
Copy link
Copy Markdown
Member

@loks0n loks0n commented May 14, 2026

Summary

  • Bump base image to appwrite/utopia-base:php-8.5-2.0.0 and PHP requirement to 8.5
  • Update rector to 2.4.3 with PHP 8.5 sets, phpstan to 2.1.54, phpunit to 13.1.9
  • Update swoole/ide-helper to 6.0.2 and CI swoole image to phpswoole/swoole:6.2.0-php8.5-alpine
  • Apply rector refactors and fix new phpstan findings

Test plan

  • Format check passes
  • PHPStan analysis passes
  • Rector dry-run is clean
  • Unit tests pass
  • E2E tests pass

🤖 Generated with Claude Code

- Update base image to appwrite/utopia-base:php-8.5-2.0.0
- Bump PHP requirement to 8.5
- Update rector to 2.4.3 with PHP 8.5 sets
- Update phpstan to 2.1.54
- Update phpunit to 13.1.9
- Update swoole/ide-helper to 6.0.2
- Update CI swoole image to phpswoole/swoole:6.2.0-php8.5-alpine
- Apply rector refactors and fix new phpstan findings

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 14, 2026

Greptile Summary

This PR upgrades the executor to PHP 8.5, Swoole 6.x, PHPUnit 13, Rector 2.4, and PHPStan 2.1.54, switching the base image to appwrite/utopia-base:php-8.5-2.0.0. Rector-applied refactors are included across the source tree along with PHPUnit 13 compatibility fixes in the test suite.

  • PHP 8.5 features adopted: array_any() replaces the manual foreach in controllers.php; DateInterval::createFromDateString null-guard removed (PHP 8.3+ throws instead of returning false); declare(strict_types=1) added to several files.
  • Swoole 6.x compatibility: Runtime::enableCoroutine(SWOOLE_HOOK_ALL) drops the now-removed first bool parameter; docker-cli is explicitly installed in the Dockerfile since the new base image no longer includes it.
  • PHPUnit 13 test updates: Data-provider methods made static, @dataProvider annotations converted to #[DataProvider] attributes, and assertion-callback signatures updated to accept the test instance as the first argument.

Confidence Score: 4/5

Safe to merge for most scenarios, but the silent removal of OPEN_RUNTIMES_BUILD_COMPRESSION=none support warrants confirmation that no callers depend on it.

The tooling, dependency, and PHP version changes are all well-executed and internally consistent. The one unresolved question is whether existing callers pass OPEN_RUNTIMES_BUILD_COMPRESSION=none to opt into uncompressed tarballs — Docker.php now ignores that variable and always produces code.tar.gz, while testBuildUncompressed still passes the variable but was updated to expect the compressed filename.

src/Executor/Runner/Docker.php — verify that removal of the OPEN_RUNTIMES_BUILD_COMPRESSION=none code path is intentional and no existing callers rely on it.

Important Files Changed

Filename Overview
Dockerfile Base image switched from openruntimes/base:0.1.0 to appwrite/utopia-base:php-8.5-2.0.0; docker-cli added explicitly via apk; WORKDIR set to /usr/local, consistent with COPY destinations.
app/controllers.php Inline loop replaced with PHP 8.5's array_any(); null-safe array_key_last check made more explicit; both changes are correct for PHP 8.5.
app/http.php Runtime::enableCoroutine() first bool argument dropped to match Swoole 6.x API which only accepts flags.
phpunit.xml Removed several deprecated PHPUnit 10 attributes; processIsolation and stopOnFailure remain—their acceptance by PHPUnit 13 was noted in a prior review thread.
src/Executor/Runner/Docker.php buildFile hardcoded to code.tar.gz; OPEN_RUNTIMES_BUILD_COMPRESSION=none support silently dropped (flagged in prior review).
tests/e2e/ExecutorTest.php Data providers made static, @dataProvider annotations replaced with #[DataProvider] attributes, assertion callbacks updated to accept $test as first arg, and Console::execute calls updated to pass $stderr. testBuildUncompressed still passes OPEN_RUNTIMES_BUILD_COMPRESSION=none but now expects code.tar.gz (consistent with the executor-side change).
composer.json PHP requirement bumped to 8.5, dev tool versions updated (phpunit 13.1.9, rector 2.4, phpstan 2.1.54, swoole/ide-helper 6.0.2, utopia-php/fetch 1.1.2).

Reviews (10): Last reviewed commit: "test: use named keys for null body in sc..." | Re-trigger Greptile

loks0n and others added 6 commits May 14, 2026 10:59
…raints

- Make data providers static for PHPUnit 10+ compatibility
- Bind closures with $this for assertions invoked from static providers
- Switch dev tool versions to ^ caret constraints

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drop phpstan ignore by passing \$this as a parameter to scenario closures
instead of relying on Closure::bindTo. Also set WORKDIR to /usr/local in
Dockerfile since the new utopia-base image defaults to /usr/src/code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The new utopia-base image does not include docker-cli, which is required
for the executor to inspect and manage runtime containers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adapt to new Console::execute signature which now requires $stderr.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Runtime images (after-build.sh) always write build output to code.tar.gz
regardless of OPEN_RUNTIMES_BUILD_COMPRESSION. Drop the executor's
mismatched code.tar expectation and update testBuildUncompressed to copy
code.tar.gz on start.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Picks up the curl_close removal that fixes PHP 8.5 deprecation noise
during e2e test runs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Comment thread phpunit.xml
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 processIsolation dropped in PHPUnit 10+

The processIsolation attribute was removed from the root <phpunit> element in PHPUnit 10. The PR already cleaned up four other attributes that were removed at the same time (backupStaticAttributes, convertErrorsToExceptions, convertNoticesToExceptions, convertWarningsToExceptions), but processIsolation was left in. With PHPUnit 13.1.9 enforcing the XML schema strictly, this attribute may generate an unrecognised-attribute error that prevents the test suite from running at all. The stopOnFailure attribute (line 6) was also moved in PHPUnit 10 — it may be worth verifying both are still accepted by PHPUnit 13.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hallucination

loks0n and others added 3 commits May 14, 2026 12:08
PHPUnit 13's --debug verbose event log returns exit code 2 even on green
test runs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PHPUnit 10+ removed support for @dataProvider docblock annotations.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PHP errors when unpacking arrays with positional args after named keys.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@loks0n loks0n merged commit 48c99cd into main May 14, 2026
7 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.

2 participants