diff --git a/bundles.rst b/bundles.rst index fc0b7fac784..fe353b306f8 100644 --- a/bundles.rst +++ b/bundles.rst @@ -87,6 +87,7 @@ of the bundle. Now that you've created the bundle, enable it:: And while it doesn't do anything yet, AcmeBlogBundle is now ready to be used. +.. _bundles-legacy-directory-structure: .. _bundles-directory-structure: Bundle Directory Structure @@ -121,26 +122,6 @@ to be adjusted if needed: ``translations/`` Holds translations organized by domain and locale (e.g. ``AcmeBlogBundle.en.xlf``). -.. _bundles-legacy-directory-structure: - -.. warning:: - - The recommended bundle structure was changed in Symfony 5, read the - `Symfony 4.4 bundle documentation`_ for information about the old - structure. - - When using the new ``AbstractBundle`` class, the bundle defaults to the - new structure. Override the ``Bundle::getPath()`` method to change to - the old structure:: - - class AcmeBlogBundle extends AbstractBundle - { - public function getPath(): string - { - return __DIR__; - } - } - .. tip:: It's recommended to use the `PSR-4`_ autoload standard on your bundle's @@ -247,5 +228,4 @@ Learn more * :doc:`/bundles/prepend_extension` .. _`third-party bundles`: https://github.com/search?q=topic%3Asymfony-bundle&type=Repositories -.. _`Symfony 4.4 bundle documentation`: https://symfony.com/doc/4.4/bundles.html#bundle-directory-structure .. _`PSR-4`: https://www.php-fig.org/psr/psr-4/ diff --git a/setup/flex.rst b/setup/flex.rst index 7c12e389c67..346ea156a40 100644 --- a/setup/flex.rst +++ b/setup/flex.rst @@ -1,12 +1,11 @@ Upgrading Existing Applications to Symfony Flex =============================================== -Using Symfony Flex is optional, even in Symfony 4, where Flex is used by -default. However, Flex is so convenient and improves your productivity so much -that it's strongly recommended to upgrade your existing applications to it. +Symfony Flex is optional, but it's so convenient and improves your productivity +so much that it's strongly recommended to use it in all your applications. Symfony Flex recommends that applications use the following directory structure, -which is the same used by default in Symfony 4, but you can +which is the same used by default in Symfony, but you can :ref:`customize some directories `: .. code-block:: text @@ -42,9 +41,9 @@ manual steps: $ composer require symfony/flex -#. If the project's ``composer.json`` file contains ``symfony/symfony`` dependency, - it still depends on the Symfony Standard Edition, which is no longer available - in Symfony 4. First, remove this dependency: +#. If the project's ``composer.json`` file contains the ``symfony/symfony`` dependency, + it still depends on the legacy Symfony Standard Edition, which is no longer available. + First, remove this dependency: .. code-block:: terminal