Replace deprecated route method access - #12867
Conversation
Greptile SummaryThis PR removes all PHP 8.5 deprecation warnings caused by
Confidence Score: 5/5Safe to merge — all changes are mechanical replacements of the deprecated single-method API, and no multi-method routes currently exist in Appwrite, so the one latent issue in Schema.php has no runtime impact today. All eight changed files correctly replace src/Appwrite/GraphQL/Schema.php — the outer-loop Important Files Changed
Reviews (2): Last reviewed commit: "fix: handle multi-method route outputs" | Re-trigger Greptile |
🔄 PHP-Retry SummaryFlaky tests detected across commits: Commit
|
| Test | Retries | Total Time | Details |
|---|---|---|---|
FunctionsCustomServerTest::testGetDeployment |
1 | 22ms | Logs |
Commit 10d2465 - 4 flaky tests
| Test | Retries | Total Time | Details |
|---|---|---|---|
RealtimeConsoleClientTest::testIndexesTablesAPI |
1 | 497ms | Logs |
RealtimeConsoleClientTest::testDeleteAttributeCollectionsAPI |
1 | 245ms | Logs |
RealtimeConsoleClientTest::testDeleteAttributeTablesAPI |
1 | 238ms | Logs |
RealtimeConsoleClientTest::testPing |
1 | 23ms | Logs |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
What does this PR do?
Replaces deprecated
Utopia\Http\Route::getMethod()calls with the multi-methodgetMethods()API.Route methods are preserved rather than defaulting to the first entry: logs and mock output use comma-separated methods, GraphQL resolvers receive the concrete registered method, and OpenAPI emits an operation for every method. This removes PHP 8.5 deprecation warnings and keeps multi-method routes accurate.
Test Plan
composer linton all changed PHP files.docker compose exec appwrite test tests/unit/SDK/Specification/FormatTest.php.docker compose exec appwrite test tests/unit/GraphQL.docker compose exec appwrite test tests/e2e/Services/GraphQL/PresenceTest.php.Related PRs and Issues
Checklist