212 Commits

Author SHA1 Message Date
Chirag Aggarwal b756a38252 Consolidate shared DI resources 2026-05-18 16:16:23 +05:30
Chirag Aggarwal ad88b827e6 Refactor database queue publisher 2026-05-15 13:22:35 +05:30
Chirag Aggarwal 65d1e58e34 refactor: migrate delete queue publisher 2026-05-14 14:40:11 +05:30
Chirag Aggarwal 85e2cf7d8b (refactor): Migrate queueForFunctions to FunctionPublisher and FunctionMessage 2026-05-13 18:28:05 +05:30
fogelito c0bba74eee set setGlobalCollections logs 2026-04-30 10:36:12 +03:00
fogelito 7a9a2899ff setGlobalCollections 2026-04-29 15:41:56 +03:00
Chirag Aggarwal 5ecd15a5f5 fix: register certificate publisher in cli 2026-04-11 09:07:51 +05:30
Chirag Aggarwal dc0a5c88b7 refactor: migrate audits certificates screenshots to publishers 2026-04-10 16:44:00 +05:30
Chirag Aggarwal 6bf6142667 refactor: migrate selected queues to publishers 2026-04-10 13:02:00 +05:30
Chirag Aggarwal dffcfe8ee4 Merge branch '1.9.x' into feat/migrate-di-container 2026-04-05 21:16:30 +05:30
Chirag Aggarwal 452440f3c0 fix: use released cli container support 2026-04-05 21:03:17 +05:30
Chirag Aggarwal 66e68aea14 fix: fail specs when docs are missing 2026-04-05 19:37:29 +05:30
Chirag Aggarwal cba7e53898 chore: fix composer 2026-04-01 15:37:34 +05:30
Chirag Aggarwal 2dc24dabfd Merge branch '1.8.x' into feat/migrate-di-container 2026-03-16 23:10:09 +05:30
Chirag Aggarwal aaa2a0525f feat: migrate from static Http::setResource() to DI Container
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()
2026-03-16 23:00:36 +05:30
Jake Barnby 01a9340eaf Merge branch '1.8.x' into feat-installer 2026-03-14 10:30:29 +13:00
Jake Barnby 6fee0cb73e Revert "fix: cast tenant to int for SQL adapters to fix strict type comparison"
This reverts commit 840b1fbef3.
2026-03-14 01:16:14 +13:00
Jake Barnby 840b1fbef3 fix: cast tenant to int for SQL adapters to fix strict type comparison
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>
2026-03-14 01:06:43 +13:00
Jake Barnby 871795efa9 fix: remove conditional tenant int cast, use string tenant directly
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>
2026-03-13 19:53:42 +13:00
Jake Barnby d91e3543c8 (fix): use adapter ID type to determine tenant value for MongoDB compatibility 2026-03-13 19:13:07 +13:00
loks0n a804cba999 Refactor usage metrics to stateless publisher pattern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:36:16 +00:00
loks0n b45ff6b646 refactor: replace queueForExecutions with Bus event bus
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>
2026-03-03 19:36:48 +00:00
loks0n a44a22ce04 Update utopia-php/span to 1.1.* with pretty exporter and instrument HTTP lifecycle
- 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>
2026-02-13 13:56:59 +00:00
Chirag Aggarwal 73b19b9028 ordering 2026-02-10 12:19:47 +05:30
Chirag Aggarwal c551fda8d8 Fix CLI setResource() static calls and named parameter mismatch
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.
2026-02-10 10:33:14 +05:30
Chirag Aggarwal 6c4394947f Fix Safe PHP deprecation warnings 2026-02-03 10:11:12 +05:30
Hemachandar 630d3376a6 Use Swoole timers in Interval task (#11205)
* Use Swoole timers in `Interval` task

* refactor

* block coroutine from exiting

* nit

* Add span

* cleanup unused var

* camelCase
2026-02-02 18:47:54 +05:30
Jake Barnby b1171c661e Add setDatabase() to all project database instances
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>
2026-01-15 19:08:25 +13:00
Jake Barnby 728ed57df0 Fix database initialization after utopia-php/database 4.5.2 update
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>
2026-01-15 18:43:28 +13:00
Jake Barnby 2cfb5ecfd9 Reapply "Merge pull request #11130 from appwrite/feat-auth-instance"
This reverts commit 38687bc24e.
2026-01-15 04:08:00 +13:00
Jake Barnby 38687bc24e Revert "Merge pull request #11130 from appwrite/feat-auth-instance"
This reverts commit c12cad80bb, reversing
changes made to 2a17429226.

# Conflicts:
#	composer.lock
2026-01-15 03:48:42 +13:00
Jake Barnby 5c915ef92f Reapply "Merge pull request #11099 from appwrite/feat-auth-instance"
This reverts commit 321fc8ee70.
2026-01-14 19:07:49 +13:00
Jake Barnby 321fc8ee70 Revert "Merge pull request #11099 from appwrite/feat-auth-instance"
This reverts commit a4734a5de7, reversing
changes made to 15922fb88c.

# Conflicts:
#	composer.lock
2026-01-14 02:37:17 +13:00
Jake Barnby 7573ee75a2 Use authorization instance 2026-01-07 20:04:28 +13:00
fogelito 0209d40a38 Cli previous errors 2026-01-01 12:17:20 +02:00
Jake Barnby dc85d44647 Revert "Refactor auth single instance" 2025-12-20 02:54:50 +13:00
shimon f216ea5d65 Merge branch '1.8.x' of github.com:appwrite/appwrite into refactor-auth-single-instance
# Conflicts:
#	app/controllers/api/account.php
#	app/controllers/api/graphql.php
#	app/controllers/api/storage.php
#	app/controllers/api/teams.php
#	app/controllers/general.php
#	app/controllers/shared/api.php
#	app/controllers/shared/api/auth.php
#	app/init/resources.php
#	app/realtime.php
#	app/worker.php
#	composer.lock
#	src/Appwrite/Auth/Auth.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Operations/Create.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php
#	src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php
#	src/Appwrite/Platform/Modules/Functions/Http/Executions/Get.php
#	src/Appwrite/Platform/Modules/Functions/Http/Executions/XList.php
#	src/Appwrite/Platform/Modules/Tokens/Http/Tokens/Buckets/Files/Action.php
#	src/Appwrite/Utopia/Request.php
#	src/Appwrite/Utopia/Response.php
#	tests/unit/Auth/AuthTest.php
#	tests/unit/Messaging/MessagingChannelsTest.php
2025-11-27 15:50:37 +02:00
shimon 4ad249f918 Revert "Revert "Merge pull request #10682 from appwrite/refactor-auth-single-instance""
This reverts commit 8765d5650a.
2025-11-26 12:05:12 +02:00
Jake Barnby 8765d5650a Revert "Merge pull request #10682 from appwrite/refactor-auth-single-instance"
This reverts commit 919b01a1b1, reversing
changes made to deb5039352.
2025-11-19 16:21:06 +13:00
Damodar Lohani 9130a7102e Fix use correct user type 2025-11-05 01:41:15 +00:00
shimon 68b0fe8c70 linter 2025-10-29 20:33:36 +02:00
shimon 7c2a1ade1f Merge branch 'refactor-auth-single-instance' of github.com:appwrite/appwrite into refactor-auth-single-instance 2025-10-29 20:22:00 +02:00
shimon 5c2828bc78 Refactor authorization handling across multiple modules to use a single instance of the Authorization class. 2025-10-29 20:21:41 +02:00
Shimon Newman 111b2abeeb Update app/cli.php
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
2025-10-29 20:19:49 +02:00
shimon d7cc3895cb Update composer.lock to reflect version changes for utopia-php/detector, remove unused registers.php file, and clean up whitespace in cli.php and worker.php. Refactor database resource initialization in resources.php for consistency. 2025-10-27 19:23:55 +02:00
shimon 6ed2000478 Update composer.lock and refactor authorization handling in CLI and worker modules. Adjust Docker configuration to include database source path. Modify error handling in general controller and enhance permission setting in document creation. Fix privileged user role retrieval in function execution. Ensure consistent authorization usage across various resources. 2025-10-27 12:09:23 +02:00
shimon 33f88fa5e0 Refactor authorization handling across multiple modules to use the new getAuthorization() method. Update CHANGES.md to reflect the change in usage worker authorization. Adjust composer.json to specify the correct version for utopia-php/database. Update plugin-api-version in composer.lock. 2025-10-22 16:35:48 +03:00
loks0n 3544649903 fix: block schedules 2025-10-13 12:29:32 +01:00
loks0n 52e148761c chore: allow publisherMessaging override 2025-08-25 18:25:19 +01:00
Matej Bačo 3efd9a778e Reapply "Feat: Make functions worker customizable"
This reverts commit 7e110bf292.
2025-08-11 15:07:05 +02:00