Skip to content
Open
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ext-pdo": "*",
"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.

"appwrite/appwrite": "19.*"
},
"require-dev": {
Expand Down
Loading