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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

### Add

* The `igbinary` extension, so Appwrite can store cache entries as binary payloads through the `Igbinary` codec in `utopia-php/cache` instead of JSON.
* Weekly dependency automation (`.github/workflows/dependencies.yml`). A scheduled job resolves the newest upstream release for every pinned Dockerfile source, rewrites the pins, opens a pull request, waits for the exact CI runs for that head, approves and merges it, then tags, builds, and publishes the release. A `recover` step resumes a run that died between merge and publish, so a half-finished release is completed rather than duplicated.
* PHP automation domain under `.github/scripts` — `Dependency` (catalog, resolvers, Dockerfile pin rewriting, reporting), `Automation` (release orchestration, version selection, merge and target validation, recovery), `Command`, and `Parity`. Entry points are `bin/dependencies.php`, `bin/orchestrator.php`, and `bin/parity.php`.
* Composer tooling for the automation: `lint` (Pint), `check` (PHPStan), `test` (PHPUnit), `parity` (asserts every source class has covering tests), and `verify` to run all four. CI runs `composer verify` before touching any dependency.
Expand Down
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,23 @@ RUN \
cp $(php-config --extension-dir)/brotli.so /artifacts/ && \
strip /artifacts/brotli.so

# igbinary 3.2.17RC1 is the first tag that builds on PHP 8.5, and no final
# 3.2.17 exists yet. The dependency updater only understands x.y.z pins, so the
# commit is inlined here rather than declared as PHP_IGBINARY_VERSION/COMMIT;
# move it into the catalog (.github/scripts/src/Dependency/Catalog.php) once
# igbinary tags a final release.
FROM compile AS igbinary
RUN \
git init igbinary && \
cd igbinary && \
git fetch --depth 1 https://github.com/igbinary/igbinary.git edda7101adf583df047d028a154abf3bf04ced61 && \
git checkout FETCH_HEAD && \
phpize && \
./configure && \
make -j"$(nproc)" && make install && \
cp $(php-config --extension-dir)/igbinary.so /artifacts/ && \
strip /artifacts/igbinary.so

FROM compile AS lz4
RUN \
git init lz4 && \
Expand Down Expand Up @@ -303,6 +320,7 @@ WORKDIR /usr/src/code

COPY --from=core-extensions /artifacts/ /tmp/exts/
COPY --from=brotli /artifacts/ /tmp/exts/
COPY --from=igbinary /artifacts/ /tmp/exts/
COPY --from=imagick /artifacts/ /tmp/exts/
COPY --from=lz4 /artifacts/ /tmp/exts/
COPY --from=maxmind /artifacts/ /tmp/exts/
Expand All @@ -320,6 +338,7 @@ RUN cp /tmp/exts/*.so $(php-config --extension-dir)/ && \
docker-php-ext-enable \
brotli \
gd \
igbinary \
imagick \
intl \
lz4 \
Expand Down
1 change: 1 addition & 0 deletions tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ commandTests:
- gd
- hash
- iconv
- igbinary

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Module Test Mirrors Configuration

Adding igbinary to the php -m output list only confirms that the Dockerfile enabled the module; it does not exercise serialization or deserialization. This violates the repository directive to test observable behavior instead of mirroring source configuration and could allow a loaded but nonfunctional extension to pass. This requirement must be satisfied before merging, for example with a command test that round-trips a representative value through igbinary_serialize() and igbinary_unserialize().

Context Used: Call out and harshly judge implementation-coupled tests. We don't mirror source code, configuration, or version pins in assertions. We test observable behavior; use linters for syntax and schema checks. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests.yaml
Line: 47

Comment:
**Module Test Mirrors Configuration**

Adding `igbinary` to the `php -m` output list only confirms that the Dockerfile enabled the module; it does not exercise serialization or deserialization. This violates the repository directive to test observable behavior instead of mirroring source configuration and could allow a loaded but nonfunctional extension to pass. This requirement must be satisfied before merging, for example with a command test that round-trips a representative value through `igbinary_serialize()` and `igbinary_unserialize()`.

**Context Used:** Call out and harshly judge implementation-coupled tests. We don't mirror source code, configuration, or version pins in assertions. We test observable behavior; use linters for syntax and schema checks. ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

- imagick
- intl
- json
Expand Down
Loading