Skip to content

Commit

Permalink
fixup! feat(dev-manual): Document UseSession attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Jan 27, 2023
1 parent c0c4099 commit 669094f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Back-end changes
Migration from PHPDoc annotations to native PHP attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Nextcloud 26 supports PHP8.0 and later. This allows the migration form PHPDoc annotations to native attributes.
Nextcloud 26 supports PHP8.0 and later. This allows the migration from PHPDoc annotations to native attributes.

* ``@UseSession`` should be replaced with ``#[UseSession]``. ``@UseSession`` will be removed in a future release. See :ref:`controller-use-session`.

Expand Down
2 changes: 1 addition & 1 deletion developer_manual/basics/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Alternatively, you can use the ``#[UseSession]`` attribute to automatically open
In case the session may be read and written by concurrent requests of your application, keeping the session open during your controller method execution may be required to ensure that the session is locked and no other request can write to the session at the same time. When reopening the session, the session data will also get updated with the latest changes from other requests. Using the annotation will keep the session lock for the whole duration of the controller method execution.

For additional information on how session locking works in PHP see the artile about `PHP Session Locking: How To Prevent Sessions Blocking in PHP requests <https://ma.ttias.be/php-session-locking-prevent-sessions-blocking-in-requests/>`_.
For additional information on how session locking works in PHP see the article about `PHP Session Locking: How To Prevent Sessions Blocking in PHP requests <https://ma.ttias.be/php-session-locking-prevent-sessions-blocking-in-requests/>`_.

Then session variables can be accessed like this:

Expand Down

0 comments on commit 669094f

Please sign in to comment.