The App

    In PHP, there is no default router. Thus, the class is provided. It uses Nikic’s FastRoute under the hood. However, you are free to use any router or framework that you’d like. Just check out the add_dapr_routes() method in the class to see how actors and subscriptions are implemented.

    From there, you should define your routes and then call $app->start() to execute the route on the current request.

    Using the app as a client

    When you just want to use Dapr as a client, such as in existing code, you can call . In these cases, there’s usually no need for a custom configuration, however, you may want to use a compiled DI container, especially in production: