Skip to content

Commit

Permalink
update notes style
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Nov 26, 2023
1 parent edc1f93 commit d837f7a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/experimental/async-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
4 changes: 2 additions & 2 deletions docs/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/middlewares.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d837f7a

Please sign in to comment.