Skip to content

chore: allow utopia-php/cache 2.* alongside 1.*#875

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

chore: allow utopia-php/cache 2.* alongside 1.*#875
ChiragAgg5k wants to merge 1 commit into
mainfrom
chore-bump-cache-2

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented May 12, 2026

What

Widen the utopia-php/cache constraint from 1.* to 1.* || 2.*.

Why

utopia-php/cache 2.0.0 was released (release notes). It bumps the PHP floor to >=8.2, adds a CircuitBreaker adapter and a Feature\Telemetry propagation contract — all additive. The Cache class type-hint used here (src/Database/Database.php) is unchanged, so allowing 2.x is safe.

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

Test plan

  • CI passes against both cache 1.x and 2.x

Summary by CodeRabbit

  • Chores
    • Updated dependency compatibility to support additional library versions.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a0a0df8f-1fc0-47e4-b025-dd83485e6b35

📥 Commits

Reviewing files that changed from the base of the PR and between eb35e68 and 3979d69.

📒 Files selected for processing (1)
  • composer.json

📝 Walkthrough

Walkthrough

The PR updates the composer dependency constraint for utopia-php/cache from 1.* to 1.* || 2.*, allowing the database package to work with both major versions of the cache library.

Changes

Cache library version compatibility

Layer / File(s) Summary
Cache version constraint expansion
composer.json
Dependency constraint for utopia-php/cache updated from 1.* to `1.*

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • utopia-php/database#806: Modifies the same composer.json dependency entry for utopia-php/cache by loosening the constraint.
  • utopia-php/database#797: Updates the cache dependency specification and related cache pool configurations.

Suggested reviewers

  • ArnabChatterjee20k
  • abnegate

Poem

🐰 A version, once locked, now spreads its wings wide,
From 1.* alone to 2.* beside,
The cache library dances in double embrace,
Compatibility blooms in this tiny space!
Hop on, dear database, to futures anew! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: widening the utopia-php/cache dependency constraint to allow both major versions 1.* and 2.*.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-bump-cache-2

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR widens the utopia-php/cache Composer constraint from 1.* to 1.* || 2.*, allowing downstream consumers to adopt the newly released cache 2.0 without forcing existing 1.x users to upgrade.

  • The only import from this package across the codebase is Utopia\Cache\Cache, which is unchanged between the two major versions, making the widening safe.
  • The project already requires PHP >=8.4, which exceeds cache 2.x's >=8.2 floor, so there is no PHP version conflict to worry about.

Confidence Score: 5/5

Safe to merge — a single-line constraint widening with no API surface changes.

The change touches only the version constraint for one dependency. The codebase uses a single class (Utopia\Cache\Cache) from this package, which is documented as unchanged in cache 2.0. The project's PHP floor (>=8.4) already exceeds what cache 2.x requires, so no compatibility issues exist.

No files require special attention.

Important Files Changed

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

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

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR widens the utopia-php/cache Composer constraint from 1.* to 1.* || 2.* to let downstream consumers opt into the newly released 2.x line. The single-line change in composer.json is the only modification.

  • composer.lock retains 1.0.1 as the resolved version, so existing installs are unaffected; only consumers who explicitly run composer update utopia-php/cache will move to 2.x.
  • The PHP floor in this repo (>=8.4) is stricter than cache 2.x's own floor (>=8.2), so no version-conflict risk exists.
  • The CI workflow (tests.yml) builds a single Docker image from the current lock file and has no job or matrix entry that installs cache 2.x, leaving the claimed 2.x compatibility unverified by automated tests.

Confidence Score: 4/5

Safe to merge; the constraint widening is additive and PHP version compatibility is guaranteed, but cache 2.x is untested in CI.

The only change is a single-line Composer constraint relaxation. The Cache class type-hint used by Database.php is the same between 1.x and 2.x per the PR description, and the repo's >=8.4 PHP floor exceeds cache 2.x's >=8.2 requirement so no version conflict can arise. The one gap is that CI never installs cache 2.x — the lock file stays at 1.0.1 and the workflow has no matrix step for 2.x — so the claimed runtime compatibility is unverified by automated tests.

composer.json — the only changed file; confirm a CI job is added or manually verified against cache 2.x before merging if runtime compatibility matters.

Important Files Changed

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

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

Comment thread composer.json
"utopia-php/validators": "0.2.*",
"utopia-php/console": "0.1.*",
"utopia-php/cache": "1.*",
"utopia-php/cache": "1.* || 2.*",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Cache 2.x not exercised by CI

composer.lock still pins utopia-php/cache to 1.0.1, so the Docker image built in tests.yml only ever installs 1.x. The test-plan checkbox ("CI passes against both cache 1.x and 2.x") is unchecked and the workflow has no version matrix for cache. A 2.x-specific job (e.g. a step that runs composer update utopia-php/cache:"2.*" --no-interaction before the test suite) would confirm that nothing in the Cache interface changed in a way that breaks this library at runtime.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

No critical/warning findings.

@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