Skip to content

Fixed the default value of framework.form.enabled #8468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,15 @@ form
enabled
.......

**type**: ``boolean`` **default**: ``false``
**type**: ``boolean`` **default**: (see explanation below)

Whether to enable the form services or not in the service container. If
you don't use forms, setting this to ``false`` may increase your application's
performance because less services will be loaded into the container.

The default value is ``true`` when the project uses ``symfony/symfony`` as a
dependency. Otherwise, it defaults to ``false``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. The default is still disabled. The only case where it is automatically enabled is when you're using symfony/flex and symfony/form is required as well.

This also applies to assets, validation, translation, serialization and csrf. Can we add the note there as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, issue updated accordingly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. So I think explaining the logic behind the default value is too complex and doesn't add much value. A more useful thing is to run debug:config framework. I think we should mention this command at the top of each reference, and remove the default value in cases where there is not a simple answer.


This option will automatically be set to ``true`` when one of the child
settings is configured.

Expand Down