@@ -39,9 +39,9 @@ as integration of other related components:
3939
4040 .. code-block :: php
4141
42- $container->loadFromExtension('framework', array(
42+ $container->loadFromExtension('framework', [
4343 'form' => true,
44- ) );
44+ ] );
4545
4646 .. sidebar :: Using Parameters to Configure your Bundle
4747
@@ -91,10 +91,10 @@ allow users to configure it with some configuration that looks like this:
9191 .. code-block :: php
9292
9393 // app/config/config.php
94- $container->loadFromExtension('acme_social', array(
94+ $container->loadFromExtension('acme_social', [
9595 'client_id' => 123,
9696 'client_secret' => 'your_secret',
97- ) );
97+ ] );
9898
9999 The basic idea is that instead of having the user override individual
100100parameters, you let the user configure just a few, specifically created,
@@ -139,36 +139,36 @@ automatically converts XML and YAML to an array).
139139For the configuration example in the previous section, the array passed to your
140140``load() `` method will look like this::
141141
142- array(
143- array(
144- 'twitter' => array(
142+ [
143+ [
144+ 'twitter' => [
145145 'client_id' => 123,
146146 'client_secret' => 'your_secret',
147- ) ,
148- ) ,
149- )
147+ ] ,
148+ ] ,
149+ ]
150150
151151Notice that this is an *array of arrays *, not just a single flat array of the
152152configuration values. This is intentional, as it allows Symfony to parse
153153several configuration resources. For example, if ``acme_social `` appears in
154154another configuration file - say ``config_dev.yml `` - with different values
155155beneath it, the incoming array might look like this::
156156
157- array(
157+ [
158158 // values from config.yml
159- array(
160- 'twitter' => array(
159+ [
160+ 'twitter' => [
161161 'client_id' => 123,
162162 'client_secret' => 'your_secret',
163- ) ,
164- ) ,
163+ ] ,
164+ ] ,
165165 // values from config_dev.yml
166- array(
167- 'twitter' => array(
166+ [
167+ 'twitter' => [
168168 'client_id' => 456,
169- ) ,
170- ) ,
171- )
169+ ] ,
170+ ] ,
171+ ]
172172
173173The order of the two arrays depends on which one is set first.
174174
@@ -315,7 +315,7 @@ In your extension, you can load this and dynamically set its arguments::
315315
316316 public function load(array $configs, ContainerBuilder $container)
317317 {
318- $config = array() ;
318+ $config = [] ;
319319 // let resources override the previous set value
320320 foreach ($configs as $subConfig) {
321321 $config = array_merge($config, $subConfig);
0 commit comments