Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jul 23, 2015
2 parents 343b349 + 07b7c72 commit 74cd23b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
47 changes: 27 additions & 20 deletions components/console/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ output. For example::
// white text on a red background
$output->writeln('<error>foo</error>');

The closing tag can be replaced by ``</>``, which revokes all formatting options
established by the last opened tag.

It is possible to define your own styles using the class
:class:`Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle`::

Expand All @@ -148,23 +151,27 @@ It is possible to define your own styles using the class
// ...
$style = new OutputFormatterStyle('red', 'yellow', array('bold', 'blink'));
$output->getFormatter()->setStyle('fire', $style);
$output->writeln('<fire>foo</fire>');
$output->writeln('<fire>foo</>');

Available foreground and background colors are: ``black``, ``red``, ``green``,
``yellow``, ``blue``, ``magenta``, ``cyan`` and ``white``.

And available options are: ``bold``, ``underscore``, ``blink``, ``reverse`` and ``conceal``.
And available options are: ``bold``, ``underscore``, ``blink``, ``reverse``
(enables the "reverse video" mode where the background and foreground colors
are swapped) and ``conceal`` (sets the foreground color to transparent, making
the typed text invisible - although it can be selected and copied; this option is
commonly used when asking the user to type sensitive information).

You can also set these colors and options inside the tagname::

// green text
$output->writeln('<fg=green>foo</fg=green>');
$output->writeln('<fg=green>foo</>');

// black text on a cyan background
$output->writeln('<fg=black;bg=cyan>foo</fg=black;bg=cyan>');
$output->writeln('<fg=black;bg=cyan>foo</>');

// bold text on a yellow background
$output->writeln('<bg=yellow;options=bold>foo</bg=yellow;options=bold>');
$output->writeln('<bg=yellow;options=bold>foo</>');

.. _verbosity-levels:

Expand Down Expand Up @@ -296,15 +303,15 @@ You can access the ``names`` argument as an array::
$text .= ' '.implode(', ', $names);
}

There are 3 argument variants you can use:
There are three argument variants you can use:

=========================== ===============================================================================================================
=========================== ===========================================================================================================
Mode Value
=========================== ===============================================================================================================
InputArgument::REQUIRED The argument is required
InputArgument::OPTIONAL The argument is optional and therefore can be omitted
InputArgument::IS_ARRAY The argument can contain an indefinite number of arguments and must be used at the end of the argument list
=========================== ===============================================================================================================
=========================== ===========================================================================================================
``InputArgument::REQUIRED`` The argument is required
``InputArgument::OPTIONAL`` The argument is optional and therefore can be omitted
``InputArgument::IS_ARRAY`` The argument can contain an indefinite number of arguments and must be used at the end of the argument list
=========================== ===========================================================================================================

You can combine ``IS_ARRAY`` with ``REQUIRED`` and ``OPTIONAL`` like this::

Expand Down Expand Up @@ -377,14 +384,14 @@ will work:
There are 4 option variants you can use:

=========================== =====================================================================================
Option Value
=========================== =====================================================================================
InputOption::VALUE_IS_ARRAY This option accepts multiple values (e.g. ``--dir=/foo --dir=/bar``)
InputOption::VALUE_NONE Do not accept input for this option (e.g. ``--yell``)
InputOption::VALUE_REQUIRED This value is required (e.g. ``--iterations=5``), the option itself is still optional
InputOption::VALUE_OPTIONAL This option may or may not have a value (e.g. ``--yell`` or ``--yell=loud``)
=========================== =====================================================================================
=============================== =====================================================================================
Option Value
=============================== =====================================================================================
``InputOption::VALUE_IS_ARRAY`` This option accepts multiple values (e.g. ``--dir=/foo --dir=/bar``)
``InputOption::VALUE_NONE`` Do not accept input for this option (e.g. ``--yell``)
``InputOption::VALUE_REQUIRED`` This value is required (e.g. ``--iterations=5``), the option itself is still optional
``InputOption::VALUE_OPTIONAL`` This option may or may not have a value (e.g. ``--yell`` or ``--yell=loud``)
=============================== =====================================================================================

You can combine ``VALUE_IS_ARRAY`` with ``VALUE_REQUIRED`` or ``VALUE_OPTIONAL`` like this:

Expand Down
2 changes: 0 additions & 2 deletions cookbook/configuration/web_server_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,13 @@ The **minimum configuration** to get your application running under Nginx is:
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
# PROD
location ~ ^/app\.php(/|$) {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
# Prevents URIs that include the front controller. This will 404:
# http://domain.tld/app.php/some-path
# Remove the internal directive to allow URIs like this
Expand Down
4 changes: 3 additions & 1 deletion create_framework/front-controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ web root directory:
example.com
├── composer.json
│ src
├── composer.lock
├── src
│ └── pages
│ ├── hello.php
│ └── bye.php
├── vendor
│ └── autoload.php
└── web
└── front.php
Expand Down

0 comments on commit 74cd23b

Please sign in to comment.