Skip to content

Commit 796c2c7

Browse files
committed
Merge branch '5.1' into master
* 5.1: typo do not document adding attachments through URLs Migrate Yaml config for DI calls to new syntax [#14076] fix typos
2 parents 070450b + 9557c17 commit 796c2c7

File tree

9 files changed

+14
-18
lines changed

9 files changed

+14
-18
lines changed

components/dependency_injection.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ config files:
259259
newsletter_manager:
260260
class: NewsletterManager
261261
calls:
262-
- [setMailer, ['@mailer']]
262+
- setMailer: ['@mailer']
263263
264264
.. code-block:: xml
265265

form/create_custom_field_type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ the logic and rendering of that field type.
6868
The PHP class extension mechanism and the Symfony form field extension
6969
mechanism are not the same. The parent type returned in ``getParent()`` is
7070
what Symfony uses to build and manage the field type. Making the PHP class
71-
extend from ``AbstractType`` is only a convenience way of implementing the
71+
extend from ``AbstractType`` is only a convenient way of implementing the
7272
required ``FormTypeInterface``.
7373

7474
Now you can add this form type when :doc:`creating Symfony forms </forms>`::

frontend/encore/postcss.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ support. The best-practice is to configure this directly in your ``package.json`
7171
+ ]
7272
}
7373
74-
The ``defaults`` option is reccommended for most users and would be equivilant to the following browserslist.
74+
The ``defaults`` option is recommended for most users and would be equivalent
75+
to the following browserslist:
7576

7677
.. code-block:: diff
7778

mailer.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,6 @@ Use the ``attachFromPath()`` method to attach files that exist on your file syst
338338
->attachFromPath('/path/to/documents/privacy.pdf', 'Privacy Policy')
339339
// optionally you can provide an explicit MIME type (otherwise it's guessed)
340340
->attachFromPath('/path/to/documents/contract.doc', 'Contract', 'application/msword')
341-
// you can also use an absolute URL if your PHP config allows getting URLs using fopen()
342-
// (this is not recommended because your application may or may not work depending on PHP config)
343-
->attachFromPath('http://example.com/path/to/documents/contract.doc', 'Contract', 'application/msword')
344341
;
345342

346343
Alternatively you can use the ``attach()`` method to attach contents from a stream::

service_container/calls.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To configure the container to call the ``setLogger`` method, use the ``calls`` k
4040
App\Service\MessageGenerator:
4141
# ...
4242
calls:
43-
- [setLogger, ['@logger']]
43+
- setLogger: ['@logger']
4444
4545
.. code-block:: xml
4646

service_container/injection_types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ In order to use this type of injection, don't forget to configure it:
146146
app.newsletter_manager:
147147
class: App\Mail\NewsletterManager
148148
calls:
149-
- [withMailer, ['@mailer'], true]
149+
- withMailer: !returns_clone ['@mailer']
150150
151151
.. code-block:: xml
152152
@@ -240,7 +240,7 @@ that accepts the dependency::
240240
app.newsletter_manager:
241241
class: App\Mail\NewsletterManager
242242
calls:
243-
- [setMailer, ['@mailer']]
243+
- setMailer: ['@mailer']
244244
245245
.. code-block:: xml
246246

service_container/optional_dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ call if the service exists and remove the method call if it does not:
6868
services:
6969
App\Newsletter\NewsletterManager:
7070
calls:
71-
- [setLogger, ['@?logger']]
71+
- setLogger: ['@?logger']
7272
7373
.. code-block:: xml
7474

service_container/parent_services.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ duplicated service definitions:
7272
abstract: true
7373
arguments: ['@doctrine.orm.entity_manager']
7474
calls:
75-
- [setLogger, ['@logger']]
75+
- setLogger: ['@logger']
7676
7777
App\Repository\DoctrineUserRepository:
7878
# extend the App\Repository\BaseDoctrineRepository service

session/database.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ First, define a Symfony service for the connection to the Redis server:
3030
# you can also use \RedisArray, \RedisCluster or \Predis\Client classes
3131
class: Redis
3232
calls:
33-
- method: connect
34-
arguments:
35-
- '%env(REDIS_HOST)%'
36-
- '%env(int:REDIS_PORT)%'
33+
- connect:
34+
- '%env(REDIS_HOST)%'
35+
- '%env(int:REDIS_PORT)%'
3736
3837
# uncomment the following if your Redis server requires a password
39-
# - method: auth
40-
# arguments:
41-
# - '%env(REDIS_PASSWORD)%'
38+
# - auth:
39+
# - '%env(REDIS_PASSWORD)%'
4240
4341
.. code-block:: xml
4442

0 commit comments

Comments
 (0)