Skip to content

Commit 87c170b

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: [Best Practices] Update directory structure Document session cookie in response
2 parents b17a176 + 13e9f31 commit 87c170b

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

bundles.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ to be adjusted if needed:
9494

9595
``src/``
9696
Contains all PHP classes related to the bundle logic (e.g. ``Controller/RandomController.php``).
97-
97+
9898
``config/``
9999
Houses configuration, including routing configuration (e.g. ``routing.yaml``).
100100

@@ -105,13 +105,14 @@ to be adjusted if needed:
105105
Holds translations organized by domain and locale (e.g. ``AcmeTestBundle.en.xlf``).
106106

107107
``public/``
108-
Contains web assets (images, stylesheets, etc) and is copied or symbolically
109-
linked into the project ``public/`` directory via the ``assets:install`` console
110-
command.
108+
Contains web assets (images, compiled CSS and JavaScript files, etc.) and is
109+
copied or symbolically linked into the project ``public/`` directory via the
110+
``assets:install`` console command.
111111

112112
``assets/``
113-
Contains JavaScript, CSS, images and other assets related to the bundle that
114-
are not in ``public/`` (e.g. stimulus controllers)
113+
Contains the web asset sources (JavaScript and TypeScript files, CSS and Sass
114+
files, etc.), images and other assets related to the bundle that are not in
115+
``public/`` (e.g. Stimulus controllers)
115116

116117
``tests/``
117118
Holds all tests for the bundle.

bundles/best_practices.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ The following is the recommended directory structure of an AcmeBlogBundle:
6363
.. code-block:: text
6464
6565
<your-bundle>/
66+
├── assets/
6667
├── config/
6768
├── docs/
6869
│ └─ index.md
@@ -121,7 +122,8 @@ Doctrine ORM entities ``src/Entity/``
121122
Doctrine ODM documents ``src/Document/``
122123
Event Listeners ``src/EventListener/``
123124
Configuration (routes, services, etc.) ``config/``
124-
Web Assets (CSS, JS, images) ``public/``
125+
Web Assets (compiled CSS and JS, images) ``public/``
126+
Web Asset sources (``.scss``, ``.ts``, Stimulus) ``assets/``
125127
Translation files ``translations/``
126128
Validation (when not using annotations) ``config/validation/``
127129
Serialization (when not using annotations) ``config/serialization/``

session.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,15 @@ Check out the Symfony config reference to learn more about the other available
400400
``session.auto_start = 1`` This directive should be turned off in
401401
``php.ini``, in the web server directives or in ``.htaccess``.
402402

403+
The session cookie is also available in :ref:`the Response object <component-http-foundation-response>`.
404+
This is useful to get that cookie in the CLI context or when using PHP runners
405+
like Roadrunner or Swoole.
406+
407+
.. versionadded:: 5.4
408+
409+
Accessing to the session cookie in the ``Response`` object was introduced
410+
in Symfony 5.4.
411+
403412
Session Idle Time/Keep Alive
404413
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405414

0 commit comments

Comments
 (0)