Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c6ac96c

Browse filesBrowse files
committed
Merge branch '2.4'
Conflicts: components/console/introduction.rst reference/forms/types/file.rst
2 parents 6db5f23 + 5ba2227 commit c6ac96c
Copy full SHA for c6ac96c
Expand file treeCollapse file tree

39 files changed

+222
-108
lines changed

‎book/validation.rst

Copy file name to clipboardExpand all lines: book/validation.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ Now, change the ``User`` class to implement
10721072
add the
10731073
:method:`Symfony\\Component\\Validator\\GroupSequenceProviderInterface::getGroupSequence`,
10741074
which should return an array of groups to use. Also, add the
1075-
``@Assert\GroupSequenceProvider`` annotation to the class. If you imagine
1075+
``@Assert\GroupSequenceProvider`` annotation to the class (or ``group_sequence_provider: true`` to the YAML). If you imagine
10761076
that a method called ``isPremium`` returns true if the user is a premium member,
10771077
then your code might look like this::
10781078

‎components/console/introduction.rst

Copy file name to clipboardExpand all lines: components/console/introduction.rst
+15-14Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Creating a basic Command
3535
To make a console command that greets you from the command line, create ``GreetCommand.php``
3636
and add the following to it::
3737

38-
namespace Acme\DemoBundle\Command;
38+
namespace Acme\Command;
3939

4040
use Symfony\Component\Console\Command\Command;
4141
use Symfony\Component\Console\Input\InputArgument;
@@ -86,9 +86,9 @@ an ``Application`` and adds commands to it::
8686

8787
#!/usr/bin/env php
8888
<?php
89-
// app/console
89+
// application.php
9090

91-
use Acme\DemoBundle\Command\GreetCommand;
91+
use Acme\Command\GreetCommand;
9292
use Symfony\Component\Console\Application;
9393

9494
$application = new Application();
@@ -99,7 +99,7 @@ Test the new console command by running the following
9999

100100
.. code-block:: bash
101101
102-
$ app/console demo:greet Fabien
102+
$ php application.php demo:greet Fabien
103103
104104
This will print the following to the command line:
105105

@@ -111,7 +111,7 @@ You can also use the ``--yell`` option to make everything uppercase:
111111

112112
.. code-block:: bash
113113
114-
$ app/console demo:greet Fabien --yell
114+
$ php application.php demo:greet Fabien --yell
115115
116116
This prints::
117117

@@ -267,8 +267,8 @@ The command can now be used in either of the following ways:
267267

268268
.. code-block:: bash
269269
270-
$ app/console demo:greet Fabien
271-
$ app/console demo:greet Fabien Potencier
270+
$ php application.php demo:greet Fabien
271+
$ php application.php demo:greet Fabien Potencier
272272
273273
It is also possible to let an argument take a list of values (imagine you want
274274
to greet all your friends). For this it must be specified at the end of the
@@ -286,7 +286,7 @@ To use this, just specify as many names as you want:
286286

287287
.. code-block:: bash
288288
289-
$ app/console demo:greet Fabien Ryan Bernhard
289+
$ php application.php demo:greet Fabien Ryan Bernhard
290290
291291
You can access the ``names`` argument as an array::
292292

@@ -356,8 +356,8 @@ flag:
356356

357357
.. code-block:: bash
358358
359-
$ app/console demo:greet Fabien
360-
$ app/console demo:greet Fabien --iterations=5
359+
$ php application.php demo:greet Fabien
360+
$ php application.php demo:greet Fabien --iterations=5
361361
362362
The first example will only print once, since ``iterations`` is empty and
363363
defaults to ``1`` (the last argument of ``addOption``). The second example
@@ -368,8 +368,8 @@ will work:
368368

369369
.. code-block:: bash
370370
371-
$ app/console demo:greet Fabien --iterations=5 --yell
372-
$ app/console demo:greet Fabien --yell --iterations=5
371+
$ php application.php demo:greet Fabien --iterations=5 --yell
372+
$ php application.php demo:greet Fabien --yell --iterations=5
373373
374374
There are 4 option variants you can use:
375375

@@ -415,9 +415,9 @@ useful one is the :class:`Symfony\\Component\\Console\\Tester\\CommandTester`
415415
class. It uses special input and output classes to ease testing without a real
416416
console::
417417

418+
use Acme\Command\GreetCommand;
418419
use Symfony\Component\Console\Application;
419420
use Symfony\Component\Console\Tester\CommandTester;
420-
use Acme\DemoBundle\Command\GreetCommand;
421421

422422
class ListCommandTest extends \PHPUnit_Framework_TestCase
423423
{
@@ -444,9 +444,9 @@ You can test sending arguments and options to the command by passing them
444444
as an array to the :method:`Symfony\\Component\\Console\\Tester\\CommandTester::execute`
445445
method::
446446

447+
use Acme\Command\GreetCommand;
447448
use Symfony\Component\Console\Application;
448449
use Symfony\Component\Console\Tester\CommandTester;
449-
use Acme\DemoBundle\Command\GreetCommand;
450450

451451
class ListCommandTest extends \PHPUnit_Framework_TestCase
452452
{
@@ -527,6 +527,7 @@ Learn More!
527527
* :doc:`/components/console/usage`
528528
* :doc:`/components/console/single_command_tool`
529529
* :doc:`/components/console/changing_default_command`
530+
* :doc:`/components/console/events`
530531

531532
.. _Packagist: https://packagist.org/packages/symfony/console
532533
.. _ANSICON: https://github.com/adoxa/ansicon/downloads

‎components/console/single_command_tool.rst

Copy file name to clipboardExpand all lines: components/console/single_command_tool.rst
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ You can also simplify how you execute the application::
6666
#!/usr/bin/env php
6767
<?php
6868
// command.php
69+
6970
use Acme\Tool\MyApplication;
7071

7172
$application = new MyApplication();

‎components/console/usage.rst

Copy file name to clipboardExpand all lines: components/console/usage.rst
+24-24Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ built-in options as well as a couple of built-in commands for the Console compon
99

1010
.. note::
1111

12-
These examples assume you have added a file ``app/console`` to run at
12+
These examples assume you have added a file ``application.php`` to run at
1313
the cli::
1414

1515
#!/usr/bin/env php
16-
# app/console
1716
<?php
17+
// application.php
1818

1919
use Symfony\Component\Console\Application;
2020

@@ -30,26 +30,26 @@ and the registered commands:
3030

3131
.. code-block:: bash
3232
33-
$ php app/console list
33+
$ php application.php list
3434
3535
You can get the same output by not running any command as well
3636

3737
.. code-block:: bash
3838
39-
$ php app/console
39+
$ php application.php
4040
4141
The help command lists the help information for the specified command. For
4242
example, to get the help for the ``list`` command:
4343

4444
.. code-block:: bash
4545
46-
$ php app/console help list
46+
$ php application.php help list
4747
4848
Running ``help`` without specifying a command will list the global options:
4949

5050
.. code-block:: bash
5151
52-
$ php app/console help
52+
$ php application.php help
5353
5454
Global Options
5555
~~~~~~~~~~~~~~
@@ -59,33 +59,33 @@ get help for the list command:
5959

6060
.. code-block:: bash
6161
62-
$ php app/console list --help
63-
$ php app/console list -h
62+
$ php application.php list --help
63+
$ php application.php list -h
6464
6565
You can suppress output with:
6666

6767
.. code-block:: bash
6868
69-
$ php app/console list --quiet
70-
$ php app/console list -q
69+
$ php application.php list --quiet
70+
$ php application.php list -q
7171
7272
You can get more verbose messages (if this is supported for a command)
7373
with:
7474

7575
.. code-block:: bash
7676
77-
$ php app/console list --verbose
78-
$ php app/console list -v
77+
$ php application.php list --verbose
78+
$ php application.php list -v
7979
8080
The verbose flag can optionally take a value between 1 (default) and 3 to
8181
output even more verbose messages:
8282

8383
.. code-block:: bash
8484
85-
$ php app/console list --verbose=2
86-
$ php app/console list -vv
87-
$ php app/console list --verbose=3
88-
$ php app/console list -vvv
85+
$ php application.php list --verbose=2
86+
$ php application.php list -vv
87+
$ php application.php list --verbose=3
88+
$ php application.php list -vvv
8989
9090
If you set the optional arguments to give your application a name and version::
9191

@@ -95,8 +95,8 @@ then you can use:
9595

9696
.. code-block:: bash
9797
98-
$ php app/console list --version
99-
$ php app/console list -V
98+
$ php application.php list --version
99+
$ php application.php list -V
100100
101101
to get this information output:
102102

@@ -114,20 +114,20 @@ You can force turning on ANSI output coloring with:
114114

115115
.. code-block:: bash
116116
117-
$ php app/console list --ansi
117+
$ php application.php list --ansi
118118
119119
or turn it off with:
120120

121121
.. code-block:: bash
122122
123-
$ php app/console list --no-ansi
123+
$ php application.php list --no-ansi
124124
125125
You can suppress any interactive questions from the command you are running with:
126126

127127
.. code-block:: bash
128128
129-
$ php app/console list --no-interaction
130-
$ php app/console list -n
129+
$ php application.php list --no-interaction
130+
$ php application.php list -n
131131
132132
Shortcut Syntax
133133
~~~~~~~~~~~~~~~
@@ -138,7 +138,7 @@ commands, then you can run ``help`` like this:
138138

139139
.. code-block:: bash
140140
141-
$ php app/console h
141+
$ php application.php h
142142
143143
If you have commands using ``:`` to namespace commands then you just have
144144
to type the shortest unambiguous text for each part. If you have created the
@@ -147,7 +147,7 @@ can run it with:
147147

148148
.. code-block:: bash
149149
150-
$ php app/console d:g Fabien
150+
$ php application.php d:g Fabien
151151
152152
If you enter a short command that's ambiguous (i.e. there are more than one
153153
command that match), then no command will be run and some suggestions of

‎components/expression_language/syntax.rst

Copy file name to clipboardExpand all lines: components/expression_language/syntax.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Working with Objects
2828
When passing objects into an expression, you can use different syntaxes to
2929
access properties and call methods on the object.
3030

31-
Accessing Public Methods
32-
~~~~~~~~~~~~~~~~~~~~~~~~
31+
Accessing Public Properties
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
3333

3434
Public properties on objects can be accessed by using the ``.`` syntax, similar
3535
to JavaScript::

‎components/http_foundation/session_configuration.rst

Copy file name to clipboardExpand all lines: components/http_foundation/session_configuration.rst
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ PHP or provided by PHP extensions, such as PHP-Sqlite, PHP-Memcached and so on.
2828
All native save handlers are internal to PHP and as such, have no public facing API.
2929
They must be configured by ``php.ini`` directives, usually ``session.save_path`` and
3030
potentially other driver specific directives. Specific details can be found in
31-
docblock of the ``setOptions()`` method of each class.
31+
the docblock of the ``setOptions()`` method of each class. For instance, the one
32+
provided by the Memcached extension can be found on `php.net/memcached.setoption`_
3233

3334
While native save handlers can be activated by directly using
3435
``ini_set('session.save_handler', $name);``, Symfony2 provides a convenient way to
35-
activate these in the same way as custom handlers.
36+
activate these in the same way as it does for custom handlers.
3637

3738
Symfony2 provides drivers for the following native save handler as an example:
3839

@@ -61,7 +62,7 @@ Example usage::
6162
Custom Save Handlers
6263
--------------------
6364

64-
Custom handlers are those which completely replace PHP's built in session save
65+
Custom handlers are those which completely replace PHP's built-in session save
6566
handlers by providing six callback functions which PHP calls internally at
6667
various points in the session workflow.
6768

@@ -234,6 +235,11 @@ PHP 5.4 functionality if it is available.
234235
Save Handler Proxy
235236
~~~~~~~~~~~~~~~~~~
236237

238+
A Save Handler Proxy is basically a wrapper around a Save Handler that was
239+
introduced to support seamlessly the migration from PHP 5.3 to PHP 5.4+. It
240+
further creates an extension point from where custom logic can be added that
241+
works independently of which handler is being wrapped inside.
242+
237243
There are two kinds of save handler class proxies which inherit from
238244
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractProxy`:
239245
they are :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeProxy`
@@ -263,3 +269,4 @@ without knowledge of the specific save handler.
263269

264270
.. _`php.net/session.customhandler`: http://php.net/session.customhandler
265271
.. _`php.net/session.configuration`: http://php.net/session.configuration
272+
.. _`php.net/memcached.setoption`: http://php.net/memcached.setoption

‎components/translation/introduction.rst

Copy file name to clipboardExpand all lines: components/translation/introduction.rst
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ The Translation component uses Loader classes to load catalogs. You can load
6262
multiple resources for the same locale, which will then be combined into one
6363
catalog.
6464

65+
.. versionadded:: 2.4
66+
The ``JsonFileLoader`` was introduced in Symfony 2.4.
67+
6568
The component comes with some default Loaders and you can create your own
6669
Loader too. The default loaders are:
6770

@@ -85,6 +88,8 @@ Loader too. The default loaders are:
8588
catalogs form QT XML files.
8689
* :class:`Symfony\\Component\\Translation\\Loader\\XliffFileLoader` - to load
8790
catalogs from Xliff files.
91+
* :class:`Symfony\\Component\\Translation\\Loader\\JsonFileLoader` - to load
92+
catalogs from JSON files.
8893
* :class:`Symfony\\Component\\Translation\\Loader\\YamlFileLoader` - to load
8994
catalogs from Yaml files (requires the :doc:`Yaml component</components/yaml/introduction>`).
9095

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.