Skip to content

Commit

Permalink
Merge pull request #715 from driehle/feature/middleware-docs
Browse files Browse the repository at this point in the history
Added documentation for DBAL 3 middlewares
  • Loading branch information
driehle authored Feb 14, 2022
2 parents 2edb480 + 80a43dc commit fe29853
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/en/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,38 @@ Next, you will need to register your custom type with the underlying database pl
],
];
Using DBAL Middlewares
----------------------

.. note::

This feature is only available when using DBAL 3.x and has no effect on DBAL 2.x!

`Official documentation <https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/architecture.html#middlewares>`__

Laminas configuration

.. code:: php
return [
'service_manager' => [
'invokables' => [
\My\Middlewares\CustomMiddleware::class => \My\Middlewares\CustomMiddleware::class,
\My\Middlewares\AnotherCustomMiddleware::class => \My\Middlewares\AnotherCustomMiddleware::class,
],
],
'doctrine' => [
'configuration' => [
'test_default' => [
'middlewares' => [
\My\Middlewares\CustomMiddleware::class,
\My\Middlewares\AnotherCustomMiddleware::class,
],
],
],
],
];
Built-in Resolver
-----------------

Expand Down

0 comments on commit fe29853

Please sign in to comment.