Commit 90b7249
committed
feat: migrate resource management to utopia-php/di container
This backports the DI container integration from the 0.34.x branch to 0.33.x:
- Replace internal array-based resource management with Utopia\DI\Container
- Update constructor to accept optional Container parameter
- Add getContainer() and getRequestContainer() methods
- Change setResource() from static to instance method
- Update getResource() and getResources() to use Container scope
- Create request-scoped containers for each request lifecycle
- Update all internal calls to use new container-based API
- Remove static resource callbacks array
- Update adapters to remove static Http::setResource() calls
- Update tests to use container-based approach
BREAKING CHANGE: Http::setResource() is now an instance method instead of static.
Users should now call $http->setResource() instead of Http::setResource().1 parent 0f3bf23 commit 90b7249
File tree
6 files changed
+329
-260
lines changed- src/Http
- Adapter
- FPM
- Swoole
- tests
6 files changed
+329
-260
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments