diff --git a/README.md b/README.md index 9e8116c..0105c58 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Take a look at the [documentation](docs/) for a more in-depth understanding of t The first step is to create the index file that will be exposed via a webserver (for example `public/index.php`). Then you need to specify the routes you want to handle. -> **Note** +> [!NOTE] > if you don't configure any route it will respond with `404 Not Found` with an empty body. ```php @@ -71,7 +71,7 @@ You can run this script via `cd public && php -S localhost:8080`. If you open yo The entrypoint of your cli tools will look something like this. -> **Note** +> [!NOTE] > by default if you don't configure any command it will always display `Hello world`. ```php diff --git a/docs/experimental/async-server.md b/docs/experimental/async-server.md index fd3da37..65e690b 100644 --- a/docs/experimental/async-server.md +++ b/docs/experimental/async-server.md @@ -2,7 +2,7 @@ The framework comes with an HTTP server entirely built in PHP allowing you to serve your app without extra dependencies in ther earlist stages of your project. -> **Note** +> [!NOTE] > This feature is optional, to use it you must before run `composer require innmind/async-http-server`. To use it is similar to the standard [http](../http.md) handler, the first difference is the namespace of the main entrypoint: @@ -30,8 +30,8 @@ Note the namespace is `Main\Async\Http` instead of `Main\Http`. The other differ All the configuration of the `Application` object is identical to the other contexts. -> **Note** +> [!NOTE] >The server currently does have limitations, streamed requests (via `Transfer-Encoding`) are not supported and multipart requests are not parsed. -> **Warning** +> [!WARNING] > This server was built to showcase in a conference talk the ability to switch between synchronous code and asynchronous code without changing the app code. Do **NOT** use this server in production. diff --git a/docs/http.md b/docs/http.md index ddaf0a0..e65878a 100644 --- a/docs/http.md +++ b/docs/http.md @@ -246,7 +246,7 @@ new class extends Http { Here the services are invokable anonymous classes to conform to the callable expected for a `Route` but you can create dedicated classes for each one. -> **Note** +> [!NOTE] > Head to the [services topic](services.md) for a more in-depth look of what's possible. ## Executing code on any route @@ -303,7 +303,7 @@ This example will refuse any request that doesn't have an `Authorization` header You can have multiple calls to `mapRequestHandler` to compose behaviours like an onion. -> **Note** +> [!NOTE] > the default request handler is the inner router of the framework, this means that you can completely change the default behaviour of the framework by returning a new request handler that never uses the default one. ## Handling unknown routes diff --git a/docs/middlewares.md b/docs/middlewares.md index 814c293..3f3ed92 100644 --- a/docs/middlewares.md +++ b/docs/middlewares.md @@ -2,7 +2,7 @@ Middlewares are a way to regroup all the configuration you've seen in other topics under a name. This means that you can either group part of your own application undeer a middleware or expose a package for other to use via Packagist. -> **Note** +> [!NOTE] > you can search for [`innmind/framework-middlewares` on Packagist](https://packagist.org/providers/innmind/framework-middlewares) for middlewares published by others. Let's say you have an application that sends emails you could have a middleware that looks like this: diff --git a/docs/services.md b/docs/services.md index bd2c378..6da826c 100644 --- a/docs/services.md +++ b/docs/services.md @@ -2,7 +2,7 @@ For both [HTTP](http.md) and [CLI](cli.md) applications a service is an object referenced by a name in a [`Container`](https://github.com/Innmind/DI). -> **Note** +> [!NOTE] > since a container only deals with objects Psalm will complain of type mismatches, so you'll have to suppress those errors (for now). ## Defining a service @@ -36,7 +36,7 @@ new class extends Http|Cli { This example defines a single service named `amqp-client` that relies on the `OperatingSystem` in order to work. -> **Note** +> [!NOTE] > this example uses [`innmind/amqp`](https://github.com/innmind/amqp) ## Configure via environment variables