Skip to content

Commit

Permalink
Merge pull request #9367 from nextcloud/backport/9358/stable25
Browse files Browse the repository at this point in the history
[stable25] Document versions of the PSR packages
  • Loading branch information
st3iny authored Nov 15, 2022
2 parents 461ef85 + 713b811 commit b856eb2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions developer_manual/digging_deeper/psr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ This standard has been deprecated and will be removed from Nextcloud. Please see
PSR-3: Logger Interface
-----------------------

As of Nextcloud 19, the dependency injection container can inject an instance of a ``\Psr\Log\LoggerInterface``. This is merely a wrapper of the existing (and strongly typed) ``\OCP\ILogger``. Apps may still use the Nextcloud logger, but the `PSR-3`_ implementation shall easy the integration of 3rd party libraries that require the `PSR-3`_ logger.
.. versionadded:: 19

The dependency injection container can inject an instance of a ``\Psr\Log\LoggerInterface``. This is merely a wrapper of the existing (and strongly typed) ``\OCP\ILogger``. Apps may still use the Nextcloud logger, but the `PSR-3`_ implementation shall easy the integration of 3rd party libraries that require the `PSR-3`_ logger.

.. versionchanged:: 21
Nextcloud ships version 1.1.3
.. versionchanged:: 23
Nextcloud ships version 1.1.4

.. _psr4:

Expand All @@ -34,7 +41,9 @@ The `PSR-4` standard describes how class files should be named, so Nextcloud can
PSR-11: Container Interface
---------------------------

As of Nextcloud 20, the dependency injection container follows the `PSR-11`_ container interface, so you may start type-hinting ``\Psr\Container\ContainerInterface`` whenever you want an instance of a container and use ``has($id)`` to check for existance and ``get($id)`` to retrieve an instance of a service. See the :ref:`dependency injection docs <dependency-injection>` for details.
.. versionadded:: 20

The dependency injection container follows the `PSR-11`_ container interface, so you may type-hint ``\Psr\Container\ContainerInterface`` whenever you want an instance of a container and use ``has($id)`` to check for existence and ``get($id)`` to retrieve an instance of a service. See the :ref:`dependency injection docs <dependency-injection>` for details.

.. _`PSR-0`: https://www.php-fig.org/psr/psr-0/
.. _`PSR-3`: https://www.php-fig.org/psr/psr-3/
Expand Down

0 comments on commit b856eb2

Please sign in to comment.