Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit4d644d1

Browse files
committed
[ConfigBuilder] Replace all framework config
1 parent62c3584 commit4d644d1

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

‎bundles/configuration.rst‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ as integration of other related components:
4040
4141
..code-block::php
4242
43-
$container->loadFromExtension('framework', [
44-
'form' => true,
45-
]);
43+
use Symfony\Config\FrameworkConfig;
44+
45+
return static function (FrameworkConfig $framework) {
46+
$framework->form()->enabled(true);
47+
};
4648
4749
Using the Bundle Extension
4850
--------------------------
@@ -81,12 +83,13 @@ can add some configuration that looks like this:
8183
..code-block::php
8284
8385
// config/packages/acme_social.php
84-
$container->loadFromExtension('acme_social', [
85-
'twitter' => [
86-
'client_id' => 123,
87-
'client_secret' => 'your_secret',
88-
],
89-
]);
86+
use Symfony\Config\AcmeSocialConfig;
87+
88+
return static function (AcmeSocialConfig $acmeSocial) {
89+
$acmeSocial->twitter()
90+
->clientId(123)
91+
->clientSecret('your_secret');
92+
};
9093
9194
The basic idea is that instead of having the user override individual
9295
parameters, you let the user configure just a few, specifically created,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp