Overview of Tempest Discovery
Discovery is Tempest's mechanism for automatically bootstrapping an application by scanning the codebase and detecting components to be loaded, eliminating the need for manual registration. It uses composer metadata to identify packages and application code, analyzing file names, attributes, interfaces, and return types to determine a component's purpose. For example, web routes are discovered via route attributes on controller methods.
app/HomeController.php
final readonly class HomeController
{
#[Get(uri: '/home')]
public function __invoke(): View
{
return view('home.view.php');
}
}