Skip to content

Conversation

@premtsd-code
Copy link

@premtsd-code premtsd-code commented Jan 30, 2026

Summary

  • Upgrade utopia-php/database from 4.* to 5.*

This upgrade is required for compatibility with appwrite/appwrite which is upgrading to utopia-php/cache 1.0.* (which depends on database 5.*).

Related PRs

Summary by CodeRabbit

  • Chores
    • Updated core dependencies to ensure compatibility and improve system stability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Walkthrough

The pull request updates the utopia-php/database dependency version constraint in composer.json from 4.* to 5.*. This is a single-line modification that changes the major version requirement for this dependency. No other files are affected, and no functional code changes are present in this diff.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Upgrade utopia-php/database to 5.' directly and clearly describes the main change in the changeset, which is updating the composer.json dependency from version 4. to 5.*.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore-upgrade-database-5

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@composer.json`:
- Line 25: The composer.json change upgrades "utopia-php/database" to "5.*" but
the package still declares "php": ">=8.0", causing an incompatibility because
Database v5 requires PHP >=8.4; either update the "php" requirement in
composer.json to ">=8.4" (and ensure all consumers can upgrade) or revert the
"utopia-php/database" version back to "4.*" to preserve PHP 8.0–8.3
support—locate the "utopia-php/database" entry and the top-level "php"
constraint in composer.json and make the corresponding change consistently.

"ext-curl": "*",
"ext-redis": "*",
"utopia-php/database": "4.*",
"utopia-php/database": "5.*",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find usage of utopia-php/database classes in the source code

echo "=== Searching for Database namespace imports ==="
rg -n "use Utopia\\Database" src/ 2>/dev/null || echo "No Database imports found in src/"

echo ""
echo "=== Searching for Database-related class instantiations ==="
rg -n "new\s+Database" src/ 2>/dev/null || echo "No Database instantiations found"

echo ""
echo "=== Searching for any Utopia namespace usage ==="
rg -n "use Utopia" src/ 2>/dev/null | head -20

echo ""
echo "=== Checking composer.json for other database-related dependencies ==="
cat composer.json | grep -i database

Repository: utopia-php/abuse

Length of output: 1673


🌐 Web query:

utopia-php/database version 5 release breaking changes migration guide

💡 Result:

utopia-php/database v5.0.0 (released Jan 30, 2026) — breaking changes & migration notes

Breaking changes

  • Minimum PHP is now >= 8.4 (was >= 8.1 in v4). (github.com)
  • Dependency major bumps:
    • utopia-php/cache 0.13.*1.0.*
    • utopia-php/pools 0.8.*1.0.* (github.com)
  • Pools v1 constructor change impacts users of the pool helper used by this library/tests: pool initialization now requires an adapter parameter. (github.com)

Migration guide (practical steps)

  1. Update your platform requirement

  2. Update composer constraints

    • Bump to v5:
      • utopia-php/database: ^5.0
    • If you pin related packages, ensure:
  3. Fix pool instantiation (if you use pools directly / via helpers)

    • Update code that constructs pools to pass an adapter first (example shown in the v5 upgrade PR notes/tests). (github.com)

Release notes reference

  • The upstream v5.0.0 GitHub release notes list the change as upgrading the cache dependency (for reconnection support). (github.com)

Citations:


🏁 Script executed:

#!/bin/bash
# Check PHP version requirement
echo "=== PHP version requirement in composer.json ==="
rg -A 2 '"php"' composer.json

echo ""
echo "=== TimeLimit/Database.php file size ==="
wc -l src/Abuse/Adapters/TimeLimit/Database.php

echo ""
echo "=== TimeLimit/Database.php - first 60 lines ==="
head -60 src/Abuse/Adapters/TimeLimit/Database.php

Repository: utopia-php/abuse

Length of output: 2100


🏁 Script executed:

#!/bin/bash
# Check rest of Database.php to see actual usage patterns
echo "=== TimeLimit/Database.php - lines 60-150 ==="
sed -n '60,150p' src/Abuse/Adapters/TimeLimit/Database.php

echo ""
echo "=== Check if pools is in dependencies ==="
rg -i "pool" composer.json

echo ""
echo "=== Check for any pool usage in codebase ==="
rg -n "pool" src/ tests/ 2>/dev/null | head -20

Repository: utopia-php/abuse

Length of output: 2479


🏁 Script executed:

#!/bin/bash
# Check the rest of Database.php for more API usage
echo "=== TimeLimit/Database.php - lines 150-250 ==="
sed -n '150,250p' src/Abuse/Adapters/TimeLimit/Database.php

echo ""
echo "=== Check full composer.json ==="
cat composer.json

Repository: utopia-php/abuse

Length of output: 4945


PHP version requirement incompatibility blocks this upgrade.

Upgrading utopia-php/database to 5.* requires PHP >= 8.4, but this library declares "php": ">=8.0" in composer.json. Database v5 cannot run on PHP 8.0–8.3.

Before proceeding with this upgrade:

  • Update the PHP version requirement in composer.json to ">=8.4", or
  • Revert to database 4.* and find another path to satisfy the appwrite/appwrite dependency constraint.

If updating PHP requirement, also verify that all consumers of this library can upgrade to PHP 8.4+.

🤖 Prompt for AI Agents
In `@composer.json` at line 25, The composer.json change upgrades
"utopia-php/database" to "5.*" but the package still declares "php": ">=8.0",
causing an incompatibility because Database v5 requires PHP >=8.4; either update
the "php" requirement in composer.json to ">=8.4" (and ensure all consumers can
upgrade) or revert the "utopia-php/database" version back to "4.*" to preserve
PHP 8.0–8.3 support—locate the "utopia-php/database" entry and the top-level
"php" constraint in composer.json and make the corresponding change
consistently.

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