Skip to content

Commit

Permalink
Merge branch '6.4' into 7.1
Browse files Browse the repository at this point in the history
* 6.4:
  Move the new contents
  [Setup] feat: add section about `composer extra.symfony.require …`
  • Loading branch information
javiereguiluz committed Jan 16, 2025
2 parents 5cedb59 + 644ac22 commit ccd2b5d
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions setup/upgrade_major.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,40 @@ starting with ``symfony/`` to the new major version:
"...": "...",
}
At the bottom of your ``composer.json`` file, in the ``extra`` block you can
find a data setting for the Symfony version. Make sure to also upgrade
this one. For instance, update it to ``7.0.*`` to upgrade to Symfony 7.0:
A more efficient way to handle Symfony dependency updates is by setting the
``extra.symfony.require`` configuration option in your ``composer.json`` file.
In Symfony applications using :doc:`Symfony Flex </setup/flex>`, this setting
restricts Symfony packages to a single specific version, improving both
dependency management and Composer update performance:

.. code-block:: diff
"extra": {
"symfony": {
"allow-contrib": false,
- "require": "6.4.*"
+ "require": "7.0.*"
}
{
"...": "...",
"require": {
- "symfony/cache": "7.0.*",
+ "symfony/cache": "*",
- "symfony/config": "7.0.*",
+ "symfony/config": "*",
- "symfony/console": "7.0.*",
+ "symfony/console": "*",
"...": "...",
},
"...": "...",
+ "extra": {
+ "symfony": {
+ "require": "7.0.*"
+ }
+ }
}
.. warning::

Tools like `dependabot`_ may ignore this setting and upgrade Symfony
dependencies. For more details, see this `GitHub issue about dependabot`_.

.. tip::

If a more recent minor version is available (e.g. ``6.4``) you can use that
Expand Down Expand Up @@ -336,3 +356,5 @@ Classes in the ``vendor/`` directory are always ignored.
.. _`PHP CS Fixer`: https://github.com/friendsofphp/php-cs-fixer
.. _`Rector`: https://github.com/rectorphp/rector
.. _`maintained Symfony versions`: https://symfony.com/releases
.. _`dependabot`: https://docs.github.com/en/code-security/dependabot
.. _`GitHub issue about dependabot`: https://github.com/dependabot/dependabot-core/issues/4631

0 comments on commit ccd2b5d

Please sign in to comment.