Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ccd2b5d

Browse filesBrowse files
committed
Merge branch '6.4' into 7.1
* 6.4: Move the new contents [Setup] feat: add section about `composer extra.symfony.require …`
2 parents 5cedb59 + 644ac22 commit ccd2b5d
Copy full SHA for ccd2b5d

File tree

Expand file treeCollapse file tree

1 file changed

+31
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+31
-9
lines changed

‎setup/upgrade_major.rst

Copy file name to clipboardExpand all lines: setup/upgrade_major.rst
+31-9Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,40 @@ starting with ``symfony/`` to the new major version:
160160
"...": "...",
161161
}
162162
163-
At the bottom of your ``composer.json`` file, in the ``extra`` block you can
164-
find a data setting for the Symfony version. Make sure to also upgrade
165-
this one. For instance, update it to ``7.0.*`` to upgrade to Symfony 7.0:
163+
A more efficient way to handle Symfony dependency updates is by setting the
164+
``extra.symfony.require`` configuration option in your ``composer.json`` file.
165+
In Symfony applications using :doc:`Symfony Flex </setup/flex>`, this setting
166+
restricts Symfony packages to a single specific version, improving both
167+
dependency management and Composer update performance:
166168

167169
.. code-block:: diff
168170
169-
"extra": {
170-
"symfony": {
171-
"allow-contrib": false,
172-
- "require": "6.4.*"
173-
+ "require": "7.0.*"
174-
}
171+
{
172+
"...": "...",
173+
174+
"require": {
175+
- "symfony/cache": "7.0.*",
176+
+ "symfony/cache": "*",
177+
- "symfony/config": "7.0.*",
178+
+ "symfony/config": "*",
179+
- "symfony/console": "7.0.*",
180+
+ "symfony/console": "*",
181+
"...": "...",
182+
},
183+
"...": "...",
184+
185+
+ "extra": {
186+
+ "symfony": {
187+
+ "require": "7.0.*"
188+
+ }
189+
+ }
175190
}
176191
192+
.. warning::
193+
194+
Tools like `dependabot`_ may ignore this setting and upgrade Symfony
195+
dependencies. For more details, see this `GitHub issue about dependabot`_.
196+
177197
.. tip::
178198

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.