Reference

Provider Lifecycle

Registration order and lightweight provider bootstrap.

Registration order

The runtime registers core providers first, then HTTP- or CLI-specific providers, followed by common framework providers, and finally application providers from Providers.yaml.

Rules for register()

Keep bindings and lightweight setup in register(). Do not eagerly perform filesystem, network, or database connection work there.

Common mistakes

  • Binding an interface without an implementation.
  • Filesystem or network work inside register().
  • Hiding application composition outside the app provider.
  • Assuming HTTP and CLI register exactly the same feature set.