Skip to content

chore: allow utopia-php/cache 2.0.* alongside 1.0.*#64

Closed
ChiragAgg5k wants to merge 1 commit into
masterfrom
chore-bump-cache-2
Closed

chore: allow utopia-php/cache 2.0.* alongside 1.0.*#64
ChiragAgg5k wants to merge 1 commit into
masterfrom
chore-bump-cache-2

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

What

Widen the utopia-php/cache constraint from 1.0.* to 1.0.* || 2.0.*.

Why

utopia-php/cache 2.0.0 was released (release notes). It bumps the PHP floor to >=8.2 (matches this package), adds a CircuitBreaker adapter and a Feature\Telemetry propagation contract — all additive. The Utopia\Cache\Cache type used in src/Domains/Cache.php is unchanged.

Allowing both 1.0.x and 2.0.x lets downstream consumers (e.g. appwrite/appwrite) pick up cache 2.0 without forcing existing users off 1.0.x.

Test plan

  • CI passes against both cache 1.0.x and 2.0.x

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR widens the utopia-php/cache version constraint from 1.0.* to 1.0.* || 2.0.*, allowing downstream consumers to adopt cache 2.0 without forcing existing users off 1.0.x. The change is a single-line edit to composer.json; the only cache APIs used in src/Domains/Cache.php (load, save, purge) are reported as unchanged in 2.0.

  • Widened utopia-php/cache constraint to 1.0.* || 2.0.* in composer.json.
  • The existing CI workflow tests across PHP versions but does not matrix-test against both cache 1.x and 2.x, so only the highest-resolving version (2.0.x) is exercised post-merge.

Confidence Score: 4/5

Safe to merge; the change is a one-line constraint widening with no logic modifications and the consumed Cache API surface is reported unchanged in 2.0.

The constraint widening is minimal and the Cache wrapper only calls load, save, and purge — all stable across both versions. The only gap is that CI resolves to 2.0.x by default, so 1.0.x is never explicitly installed and tested after this change lands.

composer.json is the only changed file; no source logic was touched.

Important Files Changed

Filename Overview
composer.json Widens utopia-php/cache constraint from 1.0.* to `1.0.*

Reviews (1): Last reviewed commit: "chore: allow utopia-php/cache 2.0.* alon..." | Re-trigger Greptile

Comment thread composer.json
"php": ">=8.2",
"utopia-php/validators": "0.*",
"utopia-php/cache": "1.0.*"
"utopia-php/cache": "1.0.* || 2.0.*"
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 CI does not validate both cache versions

The test plan checkbox ("CI passes against both cache 1.0.x and 2.0.x") is unchecked, and the existing test.yml workflow has no matrix axis for cache version. composer install will resolve to the highest matching version (2.0.*), so 1.0.x is never installed and exercised post-merge. Adding a cache-versions: ['1.0.*', '2.0.*'] matrix dimension and running composer require utopia-php/cache:${{ matrix.cache-versions }} --no-update before composer install would verify both constraints are actually satisfied.

@ChiragAgg5k ChiragAgg5k deleted the chore-bump-cache-2 branch May 12, 2026 12:11
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