Skip to content

Commit 6119ac9

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: (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 0f7543b + 252af71 commit 6119ac9

Some content is hidden

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

43 files changed

+286
-254
lines changed

_build/redirection_map

+22-12
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,20 @@
7777
/book/configuration /configuration
7878
/book/propel /propel/propel
7979
/book/performance /performance
80-
/cookbook/assetic/apply_to_option /assetic/apply_to_option
81-
/cookbook/assetic/asset_management /assetic/asset_management
82-
/cookbook/assetic/index /assetic
83-
/cookbook/assetic/jpeg_optimize /assetic/jpeg_optimize
84-
/cookbook/assetic/php /assetic/php
85-
/cookbook/assetic/uglifyjs /assetic/uglifyjs
86-
/cookbook/assetic/yuicompressor /assetic/yuicompressor
80+
/cookbook/assetic/apply_to_option /frontend/assetic/apply_to_option
81+
/cookbook/assetic/asset_management /frontend/assetic/asset_management
82+
/cookbook/assetic/index /frontend/assetic
83+
/cookbook/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
84+
/cookbook/assetic/php /frontend/assetic/php
85+
/cookbook/assetic/uglifyjs /frontend/assetic/uglifyjs
86+
/cookbook/assetic/yuicompressor /frontend/assetic/yuicompressor
87+
/assetic /frontend/assetic
88+
/assetic/apply_to_option /frontend/assetic/apply_to_option
89+
/assetic/asset_management /frontend/assetic/asset_management
90+
/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
91+
/assetic/php /frontend/assetic/php
92+
/assetic/uglifyjs /frontend/assetic/uglifyjs
93+
/assetic/yuicompressor /frontend/assetic/yuicompressor
8794
/cookbook/bundles/best_practices /bundles/best_practices
8895
/cookbook/bundles/configuration /bundles/configuration
8996
/cookbook/bundles/extension /bundles/extension
@@ -152,7 +159,8 @@
152159
/cookbook/event_dispatcher/event_listener /event_dispatcher
153160
/cookbook/event_dispatcher/index /event_dispatcher
154161
/cookbook/event_dispatcher/method_behavior /event_dispatcher/method_behavior
155-
/cookbook/expressions /expressions/expressions
162+
/cookbook/expressions /security/expressions
163+
/expressions /security/expressions
156164
/cookbook/form/create_custom_field_type /form/create_custom_field_type
157165
/cookbook/form/create_form_type_extension /form/create_form_type_extension
158166
/cookbook/form/data_transformers /form/data_transformers
@@ -183,10 +191,10 @@
183191
/cookbook/profiler/matchers /profiler/matchers
184192
/cookbook/profiler/profiling_data /profiler/profiling_data
185193
/cookbook/profiler/storage /profiler/storage
186-
/cookbook/psr7 /request/psr7
194+
/cookbook/psr7 /components/psr7
187195
/cookbook/request/index /request
188-
/cookbook/request/load_balancer_reverse_proxy /request/load_balancer_reverse_proxy
189-
/cookbook/request/mime_type /request/mime_type
196+
/cookbook/request/load_balancer_reverse_proxy /deployment/proxies
197+
/cookbook/request/mime_type /reference/configuration/framework#formats
190198
/cookbook/routing/conditions /routing/conditions
191199
/cookbook/routing/custom_route_loader /routing/custom_route_loader
192200
/cookbook/routing/debug /routing/debug
@@ -312,7 +320,8 @@
312320
/components/form/type_guesser /form/type_guesser
313321
/components/http_foundation/index /components/http_foundation
314322
/components/http_foundation/introduction /components/http_foundation
315-
/components/http_foundation/trusting_proxies /request/load_balancer_reverse_proxy
323+
/request/load_balancer_reverse_proxy /deployment/proxies
324+
/components/http_foundation/trusting_proxies /deployment/proxies
316325
/components/http_kernel/introduction /components/http_kernel
317326
/components/http_kernel/index /components/http_kernel
318327
/components/property_access/introduction /components/property_access
@@ -342,3 +351,4 @@
342351
/templating/templating_service /templates
343352
/testing/simulating_authentication /testing/http_authentication
344353
/validation/group_service_resolver /form/validation_group_service_resolver
354+
/request/load_balancer_reverse_proxy /deployment/proxies

_images/form/simple-form.png

-5.47 KB
Loading

best_practices/web-assets.rst

+3-3
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

+8
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ will be autocompleted as the user types::
169169
public function execute(InputInterface $input, OutputInterface $output)
170170
{
171171
// ...
172+
$helper = $this->getHelper('question');
173+
172174
$bundles = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
173175
$question = new Question('Please enter the name of a bundle', 'FooBundle');
174176
$question->setAutocompleterValues($bundles);
@@ -188,6 +190,8 @@ convenient for passwords::
188190
public function execute(InputInterface $input, OutputInterface $output)
189191
{
190192
// ...
193+
$helper = $this->getHelper('question');
194+
191195
$question = new Question('What is the database password?');
192196
$question->setHidden(true);
193197
$question->setHiddenFallback(false);
@@ -244,6 +248,8 @@ method::
244248
public function execute(InputInterface $input, OutputInterface $output)
245249
{
246250
// ...
251+
$helper = $this->getHelper('question');
252+
247253
$question = new Question('Please enter the name of the bundle', 'AppBundle');
248254
$question->setNormalizer(function ($value) {
249255
// $value can be null here
@@ -275,6 +281,8 @@ method::
275281
public function execute(InputInterface $input, OutputInterface $output)
276282
{
277283
// ...
284+
$helper = $this->getHelper('question');
285+
278286
$question = new Question('Please enter the name of the bundle', 'AcmeDemoBundle');
279287
$question->setValidator(function ($answer) {
280288
if (!is_string($answer) || 'Bundle' !== substr($answer, -6)) {

components/expression_language.rst

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Learn More
125125
:maxdepth: 1
126126
:glob:
127127

128-
/expressions
129128
/components/expression_language/*
130129
/service_container/expression_language
131130
/reference/constraints/Expression

components/filesystem.rst

+26-22
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ exists
7575
~~~~~~
7676

7777
:method:`Symfony\\Component\\Filesystem\\Filesystem::exists` checks for the
78-
presence of all files or directories and returns ``false`` if a file is missing::
78+
presence of one or more files or directories and returns ``false`` if any of
79+
them is missing::
7980

8081
// this directory exists, return true
8182
$fs->exists('/tmp/photos');
8283

83-
// rabbit.jpg exists, bottle.png does not exists, return false
84+
// rabbit.jpg exists, bottle.png does not exist, return false
8485
$fs->exists(array('rabbit.jpg', 'bottle.png'));
8586

8687
.. note::
@@ -91,10 +92,11 @@ presence of all files or directories and returns ``false`` if a file is missing:
9192
copy
9293
~~~~
9394

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

99101
// works only if image-ICC has been modified after image.jpg
100102
$fs->copy('image-ICC.jpg', 'image.jpg');
@@ -124,8 +126,8 @@ your own with the second argument. The third argument is the access time::
124126
chown
125127
~~~~~
126128

127-
:method:`Symfony\\Component\\Filesystem\\Filesystem::chown` is used to change
128-
the owner of a file. The third argument is a boolean recursive option::
129+
:method:`Symfony\\Component\\Filesystem\\Filesystem::chown` changes the owner of
130+
a file. The third argument is a boolean recursive option::
129131

130132
// set the owner of the lolcat video to www-data
131133
$fs->chown('lolcat.mp4', 'www-data');
@@ -140,8 +142,8 @@ the owner of a file. The third argument is a boolean recursive option::
140142
chgrp
141143
~~~~~
142144

143-
:method:`Symfony\\Component\\Filesystem\\Filesystem::chgrp` is used to change
144-
the group of a file. The third argument is a boolean recursive option::
145+
:method:`Symfony\\Component\\Filesystem\\Filesystem::chgrp` changes the group of
146+
a file. The third argument is a boolean recursive option::
145147

146148
// set the group of the lolcat video to nginx
147149
$fs->chgrp('lolcat.mp4', 'nginx');
@@ -156,8 +158,8 @@ the group of a file. The third argument is a boolean recursive option::
156158
chmod
157159
~~~~~
158160

159-
:method:`Symfony\\Component\\Filesystem\\Filesystem::chmod` is used to change
160-
the mode of a file. The fourth argument is a boolean recursive option::
161+
:method:`Symfony\\Component\\Filesystem\\Filesystem::chmod` changes the mode or
162+
permissions of a file. The fourth argument is a boolean recursive option::
161163

162164
// set the mode of the video to 0600
163165
$fs->chmod('video.ogg', 0600);
@@ -172,8 +174,8 @@ the mode of a file. The fourth argument is a boolean recursive option::
172174
remove
173175
~~~~~~
174176

175-
:method:`Symfony\\Component\\Filesystem\\Filesystem::remove` is used to remove
176-
files, symlinks, directories easily::
177+
:method:`Symfony\\Component\\Filesystem\\Filesystem::remove` deletes files,
178+
directories and symlinks::
177179

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

@@ -185,8 +187,8 @@ files, symlinks, directories easily::
185187
rename
186188
~~~~~~
187189

188-
:method:`Symfony\\Component\\Filesystem\\Filesystem::rename` is used to rename
189-
files and directories::
190+
:method:`Symfony\\Component\\Filesystem\\Filesystem::rename` changes the name
191+
of a single file or directory::
190192

191193
// rename a file
192194
$fs->rename('/tmp/processed_video.ogg', '/path/to/store/video_647.ogg');
@@ -243,8 +245,8 @@ Its behavior is the following::
243245
makePathRelative
244246
~~~~~~~~~~~~~~~~
245247

246-
:method:`Symfony\\Component\\Filesystem\\Filesystem::makePathRelative` returns
247-
the relative path of a directory given another one::
248+
:method:`Symfony\\Component\\Filesystem\\Filesystem::makePathRelative` takes two
249+
absolute paths and returns the relative path from the second path to the first one::
248250

249251
// returns '../'
250252
$fs->makePathRelative(
@@ -257,8 +259,10 @@ the relative path of a directory given another one::
257259
mirror
258260
~~~~~~
259261

260-
:method:`Symfony\\Component\\Filesystem\\Filesystem::mirror` mirrors a
261-
directory::
262+
:method:`Symfony\\Component\\Filesystem\\Filesystem::mirror` copies all the
263+
contents of the source directory into the target one (use the
264+
:method:`Symfony\\Component\\Filesystem\\Filesystem::copy` method to copy single
265+
files)::
262266

263267
$fs->mirror('/path/to/source', '/path/to/target');
264268

@@ -280,8 +284,8 @@ isAbsolutePath
280284
dumpFile
281285
~~~~~~~~
282286

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

components/finder.rst

+6
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

-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ Learn More
632632
/components/http_foundation/*
633633
/controller
634634
/controller/*
635-
/request/*
636635
/session/*
637636
/http_cache/*
638637

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

+2-1
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

+4
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)