Skip to content

Commit c013641

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 3a9358f + fefc2f2 commit c013641

File tree

133 files changed

+1883
-739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+1883
-739
lines changed

_build/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@
112112
lexers['terminal'] = TerminalLexer()
113113

114114
config_block = {
115+
'apache': 'Apache',
115116
'markdown': 'Markdown',
117+
'nginx': 'Nginx',
116118
'rst': 'reStructuredText',
119+
'terminal': 'Terminal',
117120
'varnish3': 'Varnish 3',
118121
'varnish4': 'Varnish 4'
119122
}

_includes/service_container/_my_mailer.rst.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
.. code-block:: php
2828

2929
// app/config/services.php
30+
use AppBundle\Mailer;
3031
use Symfony\Component\DependencyInjection\Definition;
3132

3233
$container->setDefinition('app.mailer', new Definition(
33-
'AppBundle\Mailer',
34+
Mailer::class,
3435
array('sendmail')
3536
));

best_practices/configuration.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,20 @@ Moving Sensitive Options Outside of Symfony Entirely
175175

176176
When dealing with sensitive options, like database credentials, we also recommend
177177
that you store them outside the Symfony project and make them available
178-
through environment variables. Learn how to do it in the following article:
179-
:doc:`/configuration/external_parameters`.
178+
through environment variables:
179+
180+
.. code-block:: yaml
181+
182+
# app/config/config.yml
183+
doctrine:
184+
dbal:
185+
# ...
186+
password: "%env(DB_PASSWORD)%"
187+
188+
.. versionadded:: 3.2
189+
Support for runtime environment variables via the ``%env(...)%`` syntax
190+
was added in Symfony 3.2. Prior to version 3.2, you needed to use the
191+
:doc:`special SYMFONY__ variables </configuration/external_parameters>`.
180192

181193
.. _`feature toggles`: https://en.wikipedia.org/wiki/Feature_toggle
182194
.. _`constant() function`: http://twig.sensiolabs.org/doc/functions/constant.html

best_practices/forms.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ form in its own PHP class::
1919

2020
namespace AppBundle\Form;
2121

22+
use AppBundle\Entity\Post;
2223
use Symfony\Component\Form\AbstractType;
2324
use Symfony\Component\Form\FormBuilderInterface;
2425
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -42,7 +43,7 @@ form in its own PHP class::
4243
public function configureOptions(OptionsResolver $resolver)
4344
{
4445
$resolver->setDefaults(array(
45-
'data_class' => 'AppBundle\Entity\Post'
46+
'data_class' => Post::class,
4647
));
4748
}
4849
}

best_practices/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Checking Permissions without @Security
216216

217217
The above example with ``@Security`` only works because we're using the
218218
:ref:`ParamConverter <best-practices-paramconverter>`, which gives the expression
219-
access to the a ``post`` variable. If you don't use this, or have some other
219+
access to the ``post`` variable. If you don't use this, or have some other
220220
more advanced use-case, you can always do the same security check in PHP:
221221

222222
.. code-block:: php

bundles/extension.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,17 @@ Your bundles can also add their own classes into this file thanks to the
137137
``addClassesToCompile()`` method. Define the classes to compile as an array of
138138
their fully qualified class names::
139139

140+
use AppBundle\Manager\UserManager;
141+
use AppBundle\Utils\Slugger;
142+
140143
// ...
141144
public function load(array $configs, ContainerBuilder $container)
142145
{
143146
// ...
144147

145148
$this->addClassesToCompile(array(
146-
'AppBundle\\Manager\\UserManager',
147-
'AppBundle\\Utils\\Slugger',
149+
UserManager::class,
150+
Slugger::class,
148151
// ...
149152
));
150153
}

bundles/override.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ example, the implementing class for the ``original-service-id`` is changed to
4545
// src/Acme/DemoBundle/DependencyInjection/Compiler/OverrideServiceCompilerPass.php
4646
namespace Acme\DemoBundle\DependencyInjection\Compiler;
4747

48+
use Acme\DemoBundle\YourService;
4849
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
4950
use Symfony\Component\DependencyInjection\ContainerBuilder;
5051

@@ -53,7 +54,7 @@ example, the implementing class for the ``original-service-id`` is changed to
5354
public function process(ContainerBuilder $container)
5455
{
5556
$definition = $container->getDefinition('original-service-id');
56-
$definition->setClass('Acme\DemoBundle\YourService');
57+
$definition->setClass(YourService::class);
5758
}
5859
}
5960

bundles/prepend_extension.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ The following example illustrates how to prepend
5656
a configuration setting in multiple bundles as well as disable a flag in multiple bundles
5757
in case a specific other bundle is not registered::
5858

59+
// src/Acme/HelloBundle/DependencyInjection/AcmeHelloExtension.php
5960
public function prepend(ContainerBuilder $container)
6061
{
6162
// get all bundles
@@ -69,8 +70,10 @@ in case a specific other bundle is not registered::
6970
case 'acme_something':
7071
case 'acme_other':
7172
// set use_acme_goodbye to false in the config of
72-
// acme_something and acme_other note that if the user manually
73-
// configured use_acme_goodbye to true in the app/config/config.yml
73+
// acme_something and acme_other
74+
//
75+
// note that if the user manually configured
76+
// use_acme_goodbye to true in app/config/config.yml
7477
// then the setting would in the end be true and not false
7578
$container->prependExtensionConfig($name, $config);
7679
break;

components/browser_kit.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ retrieve any cookie while making requests with the client::
138138
$expires = $cookie->getExpiresTime();
139139
$path = $cookie->getPath();
140140
$domain = $cookie->getDomain();
141+
$sameSite = $cookie->getSameSite();
141142

142143
.. note::
143144

components/class_loader.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ Learn More
5252
:maxdepth: 1
5353

5454
class_loader/class_loader
55-
class_loader/*
55+
class_loader/class_map_generator.rst
56+
class_loader/debug_class_loader.rst
57+
class_loader/map_class_loader.rst
58+
class_loader/psr4_class_loader.rst
59+
60+
.. toctree::
61+
:hidden:
62+
63+
class_loader/cache_class_loader
5664

5765
.. _PSR-0: http://www.php-fig.org/psr/psr-0/
5866
.. _PSR-4: http://www.php-fig.org/psr/psr-4/

0 commit comments

Comments
 (0)