8000 Merge branch '2.7' into 2.8 · symfony/symfony-docs@252af71 · GitHub
[go: up one dir, main page]

Skip to content

Commit 252af71

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: (34 commits) Update questionhelper.rst Docs re-org and removal of small sections Fix a small typo error (number.rst) Remove deprecated proxy argument Fix instance of class in express language in DI Missing use reference Unused Private param in documentation Doctrine event listener could persist a null value Minor syntax issue Changing type definition Closure by callable Minor syntax issues Fix code-block Add GroupSequence validation_groups capability doc Assume php7 Form - fix wrong submit button label added link to subscribe to a paid plan on platform.sh Use OpenSSL instead of Mcrypt in the examples [#8394] minor reword Minor reword Referencing custom encoders as named encoders ...
2 parents 923c187 + 7b7ce88 commit 252af71

Some content is hidden

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

45 files changed

+293
-255
lines changed

_build/redirection_map

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,20 @@
7676
/book/configuration /configuration
7777
/book/propel /propel/propel
7878
/book/performance /performance
79-
/cookbook/assetic/apply_to_option /assetic/apply_to_option
80-
/cookbook/assetic/asset_management /assetic/asset_management
81-
/cookbook/assetic/index /assetic
82-
/cookbook/assetic/jpeg_optimize /assetic/jpeg_optimize
83-
/cookbook/assetic/php /assetic/php
84-
/cookbook/assetic/uglifyjs /assetic/uglifyjs
85-
/cookbook/assetic/yuicompressor /assetic/yuicompressor
79+
/cookbook/assetic/apply_to_option /frontend/assetic/apply_to_option
80+
/cookbook/assetic/asset_management /frontend/assetic/asset_management
81+
/cookbook/assetic/index /frontend/assetic
82+
/cookbook/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
83+
/cookbook/assetic/php /frontend/assetic/php
84+
/cookbook/assetic/uglifyjs /frontend/assetic/uglifyjs
85+
/cookbook/assetic/yuicompressor /frontend/assetic/yuicompressor
86+
/assetic /frontend/assetic
87+
/assetic/apply_to_option /frontend/assetic/apply_to_option
88+
/assetic/asset_management /frontend/assetic/asset_management
89+
/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
90+
/assetic/php /frontend/assetic/php
91+
/assetic/uglifyjs /frontend/assetic/uglifyjs
92+
/assetic/yuicompressor /frontend/assetic/yuicompressor
8693
/cookbook/bundles/best_practices /bundles/best_practices
8794
/cookbook/bundles/configuration /bundles/configuration
8895
/cookbook/bundles/extension /bundles/extension
@@ -151,7 +158,8 @@
151158
/cookbook/event_dispatcher/event_listener /event_dispatcher
152159
/cookbook/event_dispatcher/index /event_dispatcher
153160
/cookbook/event_dispatcher/method_behavior /event_dispatcher/method_behavior
154-
/cookbook/expressions /expressions/expressions
161+
/cookbook/expressions /security/expressions
162+
/expressions /security/expressions
155163
/cookbook/form/create_custom_field_type /form/create_custom_field_type
156164
/cookbook/form/create_form_type_extension /form/create_form_type_extension
157165
/cookbook/form/data_transformers /form/data_transformers
@@ -182,10 +190,10 @@
182190
/cookbook/profiler/matchers /profiler/matchers
183191
/cookbook/profiler/profiling_data /profiler/profiling_data
184192
/cookbook/profiler/storage /profiler/storage
185-
/cookbook/psr7 /request/psr7
193+
/cookbook/psr7 /components/psr7
186194
/cookbook/request/index /request
187-
/cookbook/request/load_balancer_reverse_proxy /request/load_balancer_reverse_proxy
188-
/cookbook/request/mime_type /request/mime_type
195+
/cookbook/request/load_balancer_reverse_proxy /deployment/proxies
196+
/cookbook/request/mime_type /reference/configuration/framework#formats
189197
/cookbook/routing/conditions /routing/conditions
190198
/cookbook/routing/custom_route_loader /routing/custom_route_loader
191199
/cookbook/routing/debug /routing/debug
@@ -310,6 +318,7 @@
310318
/components/form/type_guesser /form/type_guesser
311319
/components/http_foundation/index /components/http_foundation
312320
/components/http_foundation/introduction /components/http_foundation
321+
/components/http_foundation/trusting_proxies /deployment/proxies
313322
/components/http_kernel/introduction /components/http_kernel
314323
/components/http_kernel/index /components/http_kernel
315324
/components/property_access/introduction /components/property_access
@@ -334,3 +343,4 @@
334343
/form /forms
335344
/testing/simulating_authentication /testing/http_authentication
336345
/validation/group_service_resolver /form/validation_group_service_resolver
346+
/request/load_balancer_reverse_proxy /deployment/proxies

_images/form/simple-form.png

-5.47 KB
Loading

best_practices/web-assets.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ tools like GruntJS.
5151
Use Assetic to compile, combine and minimize web assets, unless you're
5252
comfortable with frontend tools like GruntJS.
5353

54-
:doc:`Assetic </assetic/asset_management>` is an asset manager capable
54+
:doc:`Assetic </frontend/assetic/asset_management>` is an asset manager capable
5555
of compiling assets developed with a lot of different frontend technologies
5656
like LESS, Sass and CoffeeScript. Combining all your assets with Assetic is a
5757
matter of wrapping all the assets with a single Twig tag:
@@ -89,8 +89,8 @@ Learn More about Assetic
8989
------------------------
9090

9191
Assetic can also minimize CSS and JavaScript assets
92-
:doc:`using UglifyCSS/UglifyJS </assetic/uglifyjs>` to speed up your
93-
websites. You can even :doc:`compress images </assetic/jpeg_optimize>`
92+
:doc:`using UglifyCSS/UglifyJS </frontend/assetic/uglifyjs>` to speed up your
93+
websites. You can even :doc:`compress images </frontend/assetic/jpeg_optimize>`
9494
with Assetic to reduce their size before serving them to the user. Check out
9595
the `official Assetic documentation`_ to learn more about all the available
9696
features.

components/console/helpers/questionhelper.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ will be autocompleted as the user types::
173173
public function execute(InputInterface $input, OutputInterface $output)
174174
{
175175
// ...
176+
$helper = $this->getHelper('question');
177+
176178
$bundles = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
177179
$question = new Question('Please enter the name of a bundle', 'FooBundle');
178180
$question->setAutocompleterValues($bundles);
@@ -192,6 +194,8 @@ convenient for passwords::
192194
public function execute(InputInterface $input, OutputInterface $output)
193195
{
194196
// ...
197+
$helper = $this->getHelper('question');
198+
195199
$question = new Question('What is the database password?');
196200
$question->setHidden(true);
197201
$question->setHiddenFallback(false);
@@ -225,6 +229,8 @@ method::
225229
public function execute(InputInterface $input, OutputInterface $output)
226230
{
227231
// ...
232+
$helper = $this->getHelper('question');
233+
228234
$question = new Question('Please enter the name of the bundle', 'AppBundle');
229235
$question->setNormalizer(function ($value) {
230236
// $value can be null here
@@ -256,6 +262,8 @@ method::
256262
public function execute(InputInterface $input, OutputInterface $output)
257263
{
258264
// ...
265+
$helper = $this->getHelper('question');
266+
259267
$question = new Question('Please enter the name of the bundle', 'AcmeDemoBundle');
260268
$question->setValidator(function ($answer) {
261269
if (!is_string($answer) || 'Bundle' !== substr($answer, -6)) {

components/expression_language.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ Learn More
119119
:maxdepth: 1
120120
:glob:
121121

122-
/expressions
123122
/components/expression_language/*
124123
/service_container/expression_language
125124
/reference/constraints/Expression

components/filesystem.rst

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,13 @@ exists
7979
~~~~~~
8080

8181
:method:`Symfony\\Component\\Filesystem\\Filesystem::exists` checks for the
82-
presence of all files or directories and returns ``false`` if a file is missing::
82+
presence of one or more files or directories and returns ``false`` if any of
83+
them is missing::
8384

8485
// this directory exists, return true
8586
$fs->exists('/tmp/photos');
8687

87-
// rabbit.jpg exists, bottle.png does not exists, return false
88+
// rabbit.jpg exists, bottle.png does not exist, return false
8889
$fs->exists(array('rabbit.jpg', 'bottle.png'));
8990

9091
.. note::
@@ -95,10 +96,11 @@ presence of all files or directories and returns ``false`` if a file is missing:
9596
copy
9697
~~~~
9798

98-
:method:`Symfony\\Component\\Filesystem\\Filesystem::copy` is used to copy
99-
files. If the target already exists, the file is copied only if the source
100-
modification date is later than the target. This behavior can be overridden by
101-
the third boolean argument::
99+
:method:`Symfony\\Component\\Filesystem\\Filesystem::copy` makes a copy of a
100+
single file (use :method:`Symfony\\Component\\Filesystem\\Filesystem::mirror` to
101+
copy directories). If the target already exists, the file is copied only if the
102+
source modification date is later than the target. This behavior can be overridden
103+
by the third boolean argument::
102104

103105
// works only if image-ICC has been modified after image.jpg
104106
$fs->copy('image-ICC.jpg', 'image.jpg');
@@ -128,8 +130,8 @@ your own with the second argument. The third argument is the access time::
128130
chown
129131
~~~~~
130132

131-
:method:`Symfony\\Component\\Filesystem\\Filesystem::chown` is used to change
132-
the owner of a file. The third argument is a boolean recursive option::
133+
:method:`Symfony\\Component\\Filesystem\\Filesystem::chown` changes the owner of
134+
a file. The third argument is a boolean recursive option::
133135

134136
// set the owner of the lolcat video to www-data
135137
$fs->chown('lolcat.mp4', 'www-data');
@@ -144,8 +146,8 @@ the owner of a file. The third argument is a boolean recursive option::
144146
chgrp
145147
~~~~~
146148

147-
:method:`Symfony\\Component\\Filesystem\\Filesystem::chgrp` is used to change
148-
the group of a file. The third argument is a boolean recursive option::
149+
:method:`Symfony\\Component\\Filesystem\\Filesystem::chgrp` changes the group of
150+
a file. The third argument is a boolean recursive option::
149151

150152
// set the group of the lolcat video to nginx
151153
$fs->chgrp('lolcat.mp4', 'nginx');
@@ -160,8 +162,8 @@ the group of a file. The third argument is a boolean recursive option::
160162
chmod
161163
~~~~~
162164

163-
:method:`Symfony\\Component\\Filesystem\\Filesystem::chmod` is used to change
164-
the mode of a file. The fourth argument is a boolean recursive option::
165+
:method:`Symfony\\Component\\Filesystem\\Filesystem::chmod` changes the mode or
166+
permissions of a file. The fourth argument is a boolean recursive option::
165167

166168
// set the mode of the video to 0600
167169
$fs->chmod('video.ogg', 0600);
@@ -176,8 +178,8 @@ the mode of a file. The fourth argument is a boolean recursive option::
176178
remove
177179
~~~~~~
178180

179-
:method:`Symfony\\Component\\Filesystem\\Filesystem::remove` is used to remove
180-
files, symlinks, directories easily::
181+
:method:`Symfony\\Component\\Filesystem\\Filesystem::remove` deletes files,
182+
directories and symlinks::
181183

182184
$fs->remove(array('symlink', '/path/to/directory', 'activity.log'));
183185

@@ -189,8 +191,8 @@ files, symlinks, directories easily::
189191
rename
190192
~~~~~~
191193

192-
:method:`Symfony\\Component\\Filesystem\\Filesystem::rename` is used to rename
193-
files and directories::
194+
:method:`Symfony\\Component\\Filesystem\\Filesystem::rename` changes the name
195+
of a single file or directory::
194196

195197
// rename a file
196198
$fs->rename('/tmp/processed_video.ogg', '/path/to/store/video_647.ogg');
@@ -213,8 +215,8 @@ support symbolic links, a third boolean argument is available::
213215
makePathRelative
214216
~~~~~~~~~~~~~~~~
215217

216-
:method:`Symfony\\Component\\Filesystem\\Filesystem::makePathRelative` returns
217-
the relative path of a directory given another one::
218+
:method:`Symfony\\Component\\Filesystem\\Filesystem::makePathRelative` takes two
219+
absolute paths and returns the relative path from the second path to the first one::
218220

219221
// returns '../'
220222
$fs->makePathRelative(
@@ -227,8 +229,10 @@ the relative path of a directory given another one::
227229
mirror
228230
~~~~~~
229231

230-
:method:`Symfony\\Component\\Filesystem\\Filesystem::mirror` mirrors a
231-
directory::
232+
:method:`Symfony\\Component\\Filesystem\\Filesystem::mirror` copies all the
233+
contents of the source directory into the target one (use the
234+
:method:`Symfony\\Component\\Filesystem\\Filesystem::copy` method to copy single
235+
files)::
232236

233237
$fs->mirror('/path/to/source', '/path/to/target');
234238

@@ -253,8 +257,8 @@ dumpFile
253257
.. versionadded:: 2.3
254258
The ``dumpFile()`` was introduced in Symfony 2.3.
255259

256-
:method:`Symfony\\Component\\Filesystem\\Filesystem::dumpFile` allows you to
257-
dump contents to a file. It does this in an atomic manner: it writes a temporary
260+
:method:`Symfony\\Component\\Filesystem\\Filesystem::dumpFile` saves the given
261+
contents into a file. It does this in an atomic manner: it writes a temporary
258262
file first and then moves it to the new file location when it's finished.
259263
This means that the user will always see either the complete old file or
260264
complete new file (but never a partially-written file)::

components/finder.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ the Finder instance.
5555
:phpfunction:`iterator_to_array` method, or get the number of items with
5656
:phpfunction:`iterator_count`.
5757

58+
.. caution::
59+
60+
The ``Finder`` object doesn't reset its internal state automatically.
61+
This means that you need to create a new instance if you do not want
62+
get mixed results.
63+
5864
.. caution::
5965

6066
When searching through multiple locations passed to the

components/http_foundation.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ Learn More
604604
/components/http_foundation/*
605605
/controller
606606
/controller/*
607-
/request/*
608607
/session/*
609608
/http_cache/*
610609

components/http_foundation/trusting_proxies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Trusting Proxies
77
.. tip::
88

99
If you're using the Symfony Framework, start by reading
10-
:doc:`/request/load_balancer_reverse_proxy`.
10+
:doc:`/deployment/proxies`.
1111

1212
If you find yourself behind some sort of proxy - like a load balancer - then
1313
certain header information may be sent to you using special ``X-Forwarded-*``

request/psr7.rst renamed to components/psr7.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Installation
1313

1414
You can install the component in 2 different ways:
1515

16-
* :doc:`Install it via Composer </components/using_components>` (`symfony/psr-http-message-bridge on Packagist <https://packagist.org/packages/symfony/psr-http-message-bridge>`_);
16+
* :doc:`Install it via Composer </components/using_components>` (`symfony/psr-http-message-bridge on Packagist`_);
1717
* Use the official Git repository (https://github.com/symfony/psr-http-message-bridge).
1818

1919
The bridge also needs a PSR-7 implementation to allow converting HttpFoundation
@@ -87,3 +87,4 @@ to a :class:`Symfony\\Component\\HttpFoundation\\Response` instance::
8787

8888
.. _`PSR-7`: http://www.php-fig.org/psr/psr-7/
8989
.. _`Zend Diactoros`: https://github.com/zendframework/zend-diactoros
90+
.. _`symfony/psr-http-message-bridge on Packagist`: https://packagist.org/packages/symfony/psr-http-message-bridge

console/command_in_controller.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ Run this command from inside your controller via::
4343

4444
$input = new ArrayInput(array(
4545
'command' => 'swiftmailer:spool:send',
46+
// (optional) define the value of command arguments
47+
'fooArgument' => 'barValue',
48+
// (optional) pass options to the command
4649
'--message-limit' => $messages,
4750
));
51+
4852
// You can use NullOutput() if you don't need the output
4953
$output = new BufferedOutput();
5054
$application->run($input, $output);

0 commit comments

Comments
 (0)
0