Skip to content

Commit 8c38a35

Browse files
committed
minor #15250 Fixing syntax error in PHP, XML and Yaml examples (Nyholm)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Fixing syntax error in PHP, XML and Yaml examples I used my new and shiny feature to the docs-parser =) https://github.com/weaverryan/docs-builder/pull/97 Commits ------- baf9154 Fixing syntax error in PHP, XML and Yaml examples
2 parents 3329614 + baf9154 commit 8c38a35

23 files changed

+56
-45
lines changed

cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ with either :class:`Symfony\\Contracts\\Cache\\CacheInterface` or
373373
374374
$services->set('app.cace.adapter.redis')
375375
->parent('cache.adapter.redis')
376-
->tag('cache.pool', ['namespace' => 'my_custom_namespace'])
376+
->tag('cache.pool', ['namespace' => 'my_custom_namespace']);
377377
};
378378
379379
Custom Provider Options

components/console/helpers/table.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ This results in:
305305
$table->setHeaders([
306306
[new TableCell('Main table title', ['colspan' => 3])],
307307
['ISBN', 'Title', 'Author'],
308-
])
308+
]);
309309
// ...
310310

311311
This generates:

configuration/using_parameters_in_dic.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Now, examine the results to see this closely:
7777
$container->loadFromExtension('my_bundle', [
7878
'logging' => true,
7979
// true, as expected
80-
)
81-
];
80+
]
81+
);
8282
8383
$container->loadFromExtension('my_bundle', [
8484
'logging' => "%kernel.debug%",

form/inherit_data_option.rst

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,20 @@ Finally, make this work by adding the location form to your two original forms::
129129
namespace App\Form\Type;
130130

131131
use App\Entity\Company;
132+
use Symfony\Component\Form\AbstractType;
133+
132134
// ...
133135

134-
public function buildForm(FormBuilderInterface $builder, array $options): void
136+
class CompanyType extends AbstractType
135137
{
136-
// ...
138+
public function buildForm(FormBuilderInterface $builder, array $options): void
139+
{
140+
// ...
137141

138-
$builder->add('foo', LocationType::class, [
139-
'data_class' => Company::class,
140-
]);
142+
$builder->add('foo', LocationType::class, [
143+
'data_class' => Company::class,
144+
]);
145+
}
141146
}
142147

143148
.. code-block:: php
@@ -146,15 +151,18 @@ Finally, make this work by adding the location form to your two original forms::
146151
namespace App\Form\Type;
147152
148153
use App\Entity\Customer;
149-
// ...
154+
use Symfony\Component\Form\AbstractType;
150155
151-
public function buildForm(FormBuilderInterface $builder, array $options): void
156+
class CustomerType extends AbstractType
152157
{
153-
// ...
158+
public function buildForm(FormBuilderInterface $builder, array $options): void
159+
{
160+
// ...
154161
155-
$builder->add('bar', LocationType::class, [
156-
'data_class' => Customer::class,
157-
]);
162+
$builder->add('bar', LocationType::class, [
163+
'data_class' => Customer::class,
164+
]);
165+
}
158166
}
159167
160168
That's it! You have extracted duplicated field definitions to a separate

http_client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ each request (which overrides any global authentication):
428428
auth-bearer="the-bearer-token"
429429
auth-ntlm="the-username:the-password"
430430
/>
431-
</framework-http-client>
431+
</framework:http-client>
432432
</framework:config>
433433
</container>
434434

messenger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ this globally (or for each transport) to a service that implements
12191219
],
12201220
'transports' => [
12211221
'async_priority_normal' => [
1222-
'dsn' => // ...
1222+
'dsn' => ...,
12231223
'serializer' => 'messenger.transport.symfony_serializer',
12241224
],
12251225
],

messenger/multiple_buses.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ an **event bus**. The event bus could have zero or more subscribers.
5656
<framework:bus name="command.bus">
5757
<framework:middleware id="validation"/>
5858
<framework:middleware id="doctrine_transaction"/>
59-
<framework:bus>
59+
</framework:bus>
6060
<framework:bus name="query.bus">
6161
<framework:middleware id="validation"/>
62-
<framework:bus>
62+
</framework:bus>
6363
<framework:bus name="event.bus" default-middleware="allow_no_handlers">
6464
<framework:middleware id="validation"/>
65-
<framework:bus>
65+
</framework:bus>
6666
</framework:messenger>
6767
</framework:config>
6868
</container>

reference/configuration/doctrine.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ directory instead:
327327
328328
.. code-block:: xml
329329
330-
<?xml version="1.0" charset="UTF-8" ?>
330+
<?xml version="1.0" encoding="UTF-8" ?>
331331
<container xmlns="http://symfony.com/schema/dic/services"
332332
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
333333
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"
@@ -378,7 +378,7 @@ namespace in the ``src/Entity`` directory and gives them an ``App`` alias
378378
379379
.. code-block:: xml
380380
381-
<?xml version="1.0" charset="UTF-8" ?>
381+
<?xml version="1.0" encoding="UTF-8" ?>
382382
<container xmlns="http://symfony.com/schema/dic/services"
383383
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
384384
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,7 @@ To configure a Redis cache pool with a default lifetime of 1 hour, do the follow
27512751
<framework:pool
27522752
name="cache.mycache"
27532753
adapter="cache.adapter.redis"
2754-
default-lifetime=3600
2754+
default-lifetime="3600"
27552755
/>
27562756
</framework:cache>
27572757
<!-- ... -->

reference/configuration/security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ encoding algorithm. Also, each algorithm defines different config options:
167167
.. code-block:: xml
168168
169169
<!-- config/packages/security.xml -->
170-
<?xml version="1.0" charset="UTF-8" ?>
170+
<?xml version="1.0" encoding="UTF-8" ?>
171171
<srv:container xmlns="http://symfony.com/schema/dic/security"
172172
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
173173
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -716,7 +716,7 @@ multiple firewalls, the "context" could actually be shared:
716716
.. code-block:: xml
717717
718718
<!-- config/packages/security.xml -->
719-
<?xml version="1.0" charset="UTF-8" ?>
719+
<?xml version="1.0" encoding="UTF-8" ?>
720720
<srv:container xmlns="http://symfony.com/schema/dic/security"
721721
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
722722
xmlns:srv="http://symfony.com/schema/dic/services"

0 commit comments

Comments
 (0)