Upgrade utopia-php/framework from 0.33.x to 0.34.x which removes the
static Http::setResource() API. Resources are now registered on a
Utopia\DI\Container instance.
- Replace 81 Http::setResource() calls in resources.php with $container->set()
- Refactor http.php to use Swoole HttpServer adapter with shared container
- Refactor realtime.php to use FPM adapter with global container
- Refactor cli.php to use direct $cli->setResource() calls
- Update Specs.php to use local container + FPM adapter
- Update Migrate.php to inject console document instead of creating Http instance
- Update GraphQL Schema.php to use instance setResource()
Document::getTenant() casts numeric tenants to (int), but
adapter->getTenant() held a string from getSequence(). The strict
!== comparison in Database::getCollection() then failed, returning
"Collection not found" for all shared-table MariaDB projects.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The $tenant attribute type in the database library is being changed from
VAR_INTEGER to VAR_ID, which handles both SQL (integer) and MongoDB
(UUID7 string) adapters natively. This removes the now-unnecessary
conditional casting pattern throughout the codebase.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce a generic event bus (Utopia\Bus) with typed events, listener
base class, Span instrumentation, and coroutine dispatch. Replace all
direct queueForExecutions and inline execution usage calls with
ExecutionCompleted event and dedicated listeners (Log, Usage).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add utopia-php/span 1.1.* direct dependency, bump utopia-php/dns to 1.6.*
- Create shared app/init/span.php for span storage and pretty exporter setup
- Instrument HTTP request lifecycle with spans (method, path, response code)
- Add database.setup and http.server.start spans
- Replace old Console error logs with Span::error() in general controller
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CLI::setResource() is no longer static in the updated utopia-php/cli
library. Moved platform/CLI initialization before resource setup and
converted all static CLI::setResource() calls to use Dependency-based
instance method via a helper closure. Also renamed $queue to
$queueForStatsResources in StatsResources task to match the injected
resource name, fixing PHP 8 named parameter resolution.
This completes the fix for utopia-php/database 4.5.2 which removed
the automatic USE database statement. All Database instances that
create or query project databases now have explicit setDatabase()
calls.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The 4.5.2 update removed the automatic USE database statement on init,
requiring explicit setDatabase() calls on all database resources.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>