Skip to content

Commit f6ed519

Browse files
committed
minor #11416 small improvements (OskarStark)
This PR was merged into the master branch. Discussion ---------- small improvements Follow up of #11414 & #11415 against `master` Commits ------- 112184b small improvements
2 parents 733c1f2 + 112184b commit f6ed519

File tree

7 files changed

+58
-56
lines changed

7 files changed

+58
-56
lines changed

components/mime.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ images inside the HTML contents::
156156
->embed(fopen('/path/to/images/logo.png', 'r'), 'logo')
157157
->embedFromPath('/path/to/images/signature.gif', 'footer-signature')
158158
// reference images using the syntax 'cid:' + "image embed name"
159-
->html('<img src="cid:logo" /> ... <img src="cid:footer-signature" /> ...')
159+
->html('<img src="cid:logo"/> ... <img src="cid:footer-signature"/> ...')
160160
;
161161

162162
File Attachments
@@ -251,7 +251,7 @@ email multiparts::
251251

252252
$textContent = new TextPart('Lorem ipsum...');
253253
$htmlContent = new TextPart(sprintf(
254-
'<img src="cid:%s" /> <h1>Lorem ipsum</h1> <p>...</p>', $imageCid
254+
'<img src="cid:%s"/> <h1>Lorem ipsum</h1> <p>...</p>', $imageCid
255255
), 'html');
256256
$bodyContent = new AlternativePart($textContent, $htmlContent);
257257
$body = new RelatedPart($bodyContent, $embeddedImage);
@@ -390,7 +390,7 @@ the ``TemplatedEmail`` class::
390390
Embedding Images in Emails with Twig
391391
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
392392

393-
Instead of dealing with the ``<img src="cid: ..." />`` syntax explained in the
393+
Instead of dealing with the ``<img src="cid: ..."/>`` syntax explained in the
394394
previous sections, when using Twig to render email contents you can refer to
395395
image files as usual. First, define a Twig namespace called ``images`` to
396396
simplify things later::
@@ -407,7 +407,7 @@ the email contents:
407407
.. code-block:: html+twig
408408

409409
{# '@images/' refers to the Twig namespace defined earlier #}
410-
<img src="{{ email.image('@images/logo.png') }}" />
410+
<img src="{{ email.image('@images/logo.png') }}"/>
411411

412412
<h1>Welcome {{ username }}!</h1>
413413
{# ... #}
@@ -495,7 +495,7 @@ Now, enable the extension (this is done automatically in Symfony applications)::
495495
Finally, use the ``markdown`` filter to convert parts or the entire email
496496
contents from Markdown to HTML:
497497

498-
.. code-block:: html+twig
498+
.. code-block:: twig
499499
500500
{% filter markdown %}
501501
Welcome {{ username }}!
@@ -560,7 +560,7 @@ contents from Inky to HTML:
560560

561561
You can combine all filters to create complex email messages:
562562

563-
.. code-block:: html+twig
563+
.. code-block:: twig
564564
565565
{% filter inky|inline_css(source('@zurb/stylesheets/main.css')) %}
566566
{# ... #}

components/property_access.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Accessing a non Existing Property Path
176176

177177
By default a :class:`Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException`
178178
is thrown if the property path passed to :method:`PropertyAccessor::getValue<Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue>`
179-
does not exist. You can change this behaviour using the
179+
does not exist. You can change this behavior using the
180180
:method:`Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder::disableExceptionOnInvalidPropertyPath`
181181
method::
182182

components/routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ routes with UTF-8 characters:
482482
<routes xmlns="http://symfony.com/schema/routing"
483483
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
484484
xsi:schemaLocation="http://symfony.com/schema/routing
485-
http://symfony.com/schema/routing/routing-1.0.xsd">
485+
https://symfony.com/schema/routing/routing-1.0.xsd">
486486
487487
<route id="route1"
488488
path="/category/{name}"

configuration/environment_variables.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ Symfony provides the following env var processors:
626626
<container xmlns="http://symfony.com/schema/dic/services"
627627
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
628628
xsi:schemaLocation="http://symfony.com/schema/dic/services
629-
http://symfony.com/schema/dic/services/services-1.0.xsd">
629+
https://symfony.com/schema/dic/services/services-1.0.xsd">
630630
631631
<mongodb:config>
632632
<mongodb:client name="default" username="%env(key:user:url:MONGODB_URL)%" password="%env(key:pass:url:MONGODB_URL)%">
@@ -695,7 +695,7 @@ Symfony provides the following env var processors:
695695
<container xmlns="http://symfony.com/schema/dic/services"
696696
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
697697
xsi:schemaLocation="http://symfony.com/schema/dic/services
698-
http://symfony.com/schema/dic/services/services-1.0.xsd">
698+
https://symfony.com/schema/dic/services/services-1.0.xsd">
699699
700700
<mongodb:config>
701701
<mongodb:client name="default" connectTimeoutMS="%env(int:key:timeout:query_string:MONGODB_URL)%"/>

routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ You can also use special attributes to configure them (except ``_fragment``):
805805
<routes xmlns="http://symfony.com/schema/routing"
806806
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
807807
xsi:schemaLocation="http://symfony.com/schema/routing
808-
http://symfony.com/schema/routing/routing-1.0.xsd">
808+
https://symfony.com/schema/routing/routing-1.0.xsd">
809809
810810
<route id="article_search"
811811
path="/articles/{_locale}/search.{_format}"

service_container/configurators.rst

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -205,66 +205,68 @@ Services can be configured via invokable configurators (replacing the
205205
``configure()`` method with ``__invoke()``) by omitting the method name, just as
206206
routes can reference :ref:`invokable controllers <controller-service-invoke>`.
207207

208-
.. code-block:: yaml
208+
.. configuration-block::
209209

210-
# config/services.yaml
211-
services:
212-
# ...
210+
.. code-block:: yaml
213211
214-
# registers all classes as services, including App\Mail\EmailConfigurator
215-
App\:
216-
resource: '../src/*'
212+
# config/services.yaml
213+
services:
217214
# ...
218215
219-
# override the services to set the configurator
220-
App\Mail\NewsletterManager:
221-
configurator: '@App\Mail\EmailConfigurator'
216+
# registers all classes as services, including App\Mail\EmailConfigurator
217+
App\:
218+
resource: '../src/*'
219+
# ...
222220
223-
App\Mail\GreetingCardManager:
224-
configurator: '@App\Mail\EmailConfigurator'
221+
# override the services to set the configurator
222+
App\Mail\NewsletterManager:
223+
configurator: '@App\Mail\EmailConfigurator'
225224
226-
.. code-block:: xml
225+
App\Mail\GreetingCardManager:
226+
configurator: '@App\Mail\EmailConfigurator'
227227
228-
<!-- config/services.xml -->
229-
<?xml version="1.0" encoding="UTF-8" ?>
230-
<container xmlns="http://symfony.com/schema/dic/services"
231-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
232-
xsi:schemaLocation="http://symfony.com/schema/dic/services
233-
http://symfony.com/schema/dic/services/services-1.0.xsd">
228+
.. code-block:: xml
234229
235-
<services>
236-
<prototype namespace="App\" resource="../src/*" />
230+
<!-- config/services.xml -->
231+
<?xml version="1.0" encoding="UTF-8" ?>
232+
<container xmlns="http://symfony.com/schema/dic/services"
233+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
234+
xsi:schemaLocation="http://symfony.com/schema/dic/services
235+
https://symfony.com/schema/dic/services/services-1.0.xsd">
237236
238-
<service id="App\Mail\NewsletterManager">
239-
<configurator service="App\Mail\EmailConfigurator" />
240-
</service>
237+
<services>
238+
<prototype namespace="App\" resource="../src/*"/>
241239
242-
<service id="App\Mail\GreetingCardManager">
243-
<configurator service="App\Mail\EmailConfigurator" />
244-
</service>
245-
</services>
246-
</container>
240+
<service id="App\Mail\NewsletterManager">
241+
<configurator service="App\Mail\EmailConfigurator"/>
242+
</service>
247243
248-
.. code-block:: php
244+
<service id="App\Mail\GreetingCardManager">
245+
<configurator service="App\Mail\EmailConfigurator"/>
246+
</service>
247+
</services>
248+
</container>
249249
250-
// config/services.php
251-
use App\Mail\GreetingCardManager;
252-
use App\Mail\NewsletterManager;
253-
use Symfony\Component\DependencyInjection\Definition;
254-
use Symfony\Component\DependencyInjection\Reference;
250+
.. code-block:: php
255251
256-
// Same as before
257-
$definition = new Definition();
252+
// config/services.php
253+
use App\Mail\GreetingCardManager;
254+
use App\Mail\NewsletterManager;
255+
use Symfony\Component\DependencyInjection\Definition;
256+
use Symfony\Component\DependencyInjection\Reference;
258257
259-
$definition->setAutowired(true);
258+
// Same as before
259+
$definition = new Definition();
260260
261-
$this->registerClasses($definition, 'App\\', '../src/*');
261+
$definition->setAutowired(true);
262262
263-
$container->getDefinition(NewsletterManager::class)
264-
->setConfigurator(new Reference(EmailConfigurator::class));
263+
$this->registerClasses($definition, 'App\\', '../src/*');
264+
265+
$container->getDefinition(NewsletterManager::class)
266+
->setConfigurator(new Reference(EmailConfigurator::class));
265267
266-
$container->getDefinition(GreetingCardManager::class)
267-
->setConfigurator(new Reference(EmailConfigurator::class));
268+
$container->getDefinition(GreetingCardManager::class)
269+
->setConfigurator(new Reference(EmailConfigurator::class));
268270
269271
That's it! When requesting the ``App\Mail\NewsletterManager`` or
270272
``App\Mail\GreetingCardManager`` service, the created instance will first be

service_container/factories.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ method name, just as routes can reference
202202
<container xmlns="http://symfony.com/schema/dic/services"
203203
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
204204
xsi:schemaLocation="http://symfony.com/schema/dic/services
205-
http://symfony.com/schema/dic/services/services-1.0.xsd">
205+
https://symfony.com/schema/dic/services/services-1.0.xsd">
206206
207207
<services>
208208
<!-- ... -->
209209
210210
<service id="App\Email\NewsletterManager"
211211
class="App\Email\NewsletterManager">
212-
<factory service="App\Email\NewsletterManagerFactory" />
212+
<factory service="App\Email\NewsletterManagerFactory"/>
213213
</service>
214214
</services>
215215
</container>

0 commit comments

Comments
 (0)