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 @@ -28,7 +28,7 @@
},
"require": {
"php": ">=8.0",
"utopia-php/database": "4.*",
"utopia-php/database": "5.*",
Copy link
Contributor

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
# Check how utopia-php/database is used in this library

echo "=== Files using Database namespace ==="
rg -l "Utopia.*Database" --type php

echo ""
echo "=== Database use statements ==="
rg -n "use Utopia\\\\Database" --type php

echo ""
echo "=== Database method/property calls ==="
rg -n '\$database->' --type php -C 1 | head -50

echo ""
echo "=== Database parameter type hints ==="
rg -n "Database\s*\$" --type php

echo ""
echo "=== Document class usage ==="
rg -n "\\bDocument\\b" --type php | head -20

Repository: utopia-php/audit

Length of output: 2835


🌐 Web query:

utopia-php/database 5.0 release notes breaking changes migration

💡 Result:

utopia-php/database v5.0.0 (released 2026-01-30) — what’s known + migration pointers

Release notes / changelog

  • I couldn’t find GitHub “Release notes” published for v5.0.0 (the GitHub Releases/Tags pages currently show 4.6.x as the latest visible entries). (github.com)
  • Packagist does list utopia-php/database 5.0.0 with a new dependency set (see below). (packagist.org)

Breaking changes (confirmed from 5.0.0 requirements)

From the Packagist metadata for 5.0.0: (packagist.org)

  • PHP minimum is now >= 8.4 (was lower in 4.x).
  • Major dependency jumps that are very likely to cause BC breaks in your app:
    • utopia-php/cache: 1.0.*
    • utopia-php/pools: 1.0.*
  • Other listed requirements remain (extensions + utopia-php/framework: 0.33.*, utopia-php/mongo: 0.11.*). (packagist.org)

Migration checklist (practical)

  1. Upgrade runtime to PHP 8.4+ (CI + production first). (packagist.org)
  2. In composer.json, bump:
    • utopia-php/database to ^5.0
    • ensure compatible constraints for utopia-php/cache 1.0 and utopia-php/pools 1.0 (or let Composer resolve them via the database package). (packagist.org)
  3. Run:
    • composer update utopia-php/database --with-all-dependencies
  4. Fix compilation/runtime issues coming from cache/pools 1.0 changes (since those are major-version upgrades). (packagist.org)

If you paste your current composer.json (or composer.lock) and what you’re upgrading from (e.g., 4.6.2 → 5.0.0), I can give a concrete, step-by-step diff-focused migration plan.

Citations:


🏁 Script executed:

cat composer.json

Repository: utopia-php/audit

Length of output: 1156


Update PHP version requirement to 8.4+ and verify cache/pools compatibility.

The upgrade to utopia-php/database 5.* introduces breaking changes that must be addressed:

  1. PHP version requirement must be updated: utopia-php/database 5.0.0 requires PHP >= 8.4, but composer.json still specifies "php": ">=8.0". Update this to ">=8.4" before releasing.

  2. Major dependency upgrades: utopia-php/database 5.0.0 now requires cache 1.0.* and pools 1.0.* (both major version bumps). Verify that the existing code works with these new versions, particularly the database adapter initialization and any cache operations.

  3. Database API compatibility: The specific API changes in database 5.0.0 are not yet publicly documented. Confirm that the Document, Query, and Database client usage throughout the codebase remains compatible.

🤖 Prompt for AI Agents
In `@composer.json` at line 31, Update composer.json PHP platform requirement from
">=8.0" to ">=8.4" and ensure the dependency "utopia-php/database": "5.*" is
intended; then audit and update any code that initializes database adapters and
cache/pool usage to be compatible with the new cache 1.0.* and pools 1.0.* major
bumps—focus on constructors/factory calls used in your database adapter
initialization code (search for Database client, Query, Document instantiations
and adapter initialization functions) and review all cache operations
(get/set/pool creation) for API changes; run composer update and
unit/integration tests to catch breakages and adjust call signatures where
Document, Query, or Database client usage no longer match the new 5.x API.

"utopia-php/fetch": "0.5.*",
"utopia-php/validators": "0.2.*"
},
Expand Down
Loading