8000 Merge branch '3.1' into 3.2 · symfony/symfony-docs@10060b7 · GitHub
[go: up one dir, main page]

Skip to content

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 10060b7

Browse files
committed
Merge branch '3.1' into 3.2
* 3.1: Update routing.rst Minor reword Update voters.rst fix build command for Linux Changing field type in MySQL example Fixed wrong inheritance information Mention schema validation command [Console] Reword a subheading of console/logging.rst Fix spelling error in Travis CI code PHP sample had mistake
2 parents 9b1e819 + aebdbbb commit 10060b7

File tree

9 files changed

+34
-19
lines changed

9 files changed

+34
-19
lines changed

components/routing.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ your autoloader to load the Routing component::
3535
use Symfony\Component\Routing\RouteCollection;
3636
use Symfony\Component\Routing\Route;
3737

38-
$route = new Route('/foo', array('controller' => 'MyController'));
38+
$route = new Route('/foo', array('_controller' => 'MyController'));
3939
$routes = new RouteCollection();
4040
$routes->add('route_name', $route);
4141

@@ -44,7 +44,7 @@ your autoloader to load the Routing component::
4444
$matcher = new UrlMatcher($routes, $context);
4545

4646
$parameters = $matcher->match('/foo');
47-
// array('controller' => 'MyController', '_route' => 'route_name')
47+
// array('_controller' => 'MyController', '_route' => 'route_name')
4848

4949
.. note::
5050

@@ -102,7 +102,7 @@ Take the following route, which combines several of these ideas::
102102

103103
$route = new Route(
104104
'/archive/{month}', // path
105-
array('controller' => 'showArchive'), // default values
105+
array('_controller' => 'showArchive'), // default values
106106
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
107107
array(), // options
108108
'{subdomain}.example.com', // host
@@ -114,7 +114,7 @@ Take the following route, which combines several of these ideas::
114114

115115
$parameters = $matcher->match('/archive/2012-01');
116116
// array(
117-
// 'controller' => 'showArchive',
117+
// '_controller' => 'showArchive',
118118
// 'month' => '2012-01',
119119
// 'subdomain' => 'www',
120120
// '_route' => ...
@@ -279,7 +279,7 @@ have to provide the name of a PHP file which returns a :class:`Symfony\\Componen
279279
$collection = new RouteCollection();
280280
$collection->add(
281281
'route_name',
282-
new Route('/foo', array('controller' => 'ExampleController'))
282+
new Route('/foo', array('_controller' => 'ExampleController'))
283283
);
284284
// ...
285285

console/logging.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,15 @@ service configuration. Your method receives a
164164
:class:`Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent` object,
165165
which has methods to get information about the event and the exception.
166166

167-
Logging non-0 Exit Statuses
167+
.. _logging-non-0-exit-statuses:
168+
169+
Logging Error Exit Statuses
168170
---------------------------
169171

170172
The logging capabilities of the console can be further extended by logging
171-
non-0 exit statuses. This way you will know if a command had any errors, even
172-
if no exceptions were thrown.
173+
commands that return error exit statuses, which are any number different than
174+
zero. This way you will know if a command had any errors, even if no exceptions
175+
were thrown.
173176

174177
First configure a listener for console terminate events in the service container:
175178

contributing/documentation/overview.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ purposes following these steps:
280280
.. code-block:: terminal
281281
282282
# Linux and macOS
283-
$ ./_build/make html
283+
$ cd _build/
284+
$ make html
284285
285286
# Windows
286287
$ _build\make html

doctrine.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,15 @@ see the :ref:`doctrine-field-types` section.
427427
class Product
428428
// ...
429429

430+
.. tip::
431+
432+
After creating your entities you should validate the mappings with the
433+
following command::
434+
435+
.. code-block:: terminal
436+
437+
$ php bin/console doctrine:schema:validate
438+
430439
.. _doctrine-generating-getters-and-setters:
431440

432441
Generating Getters and Setters

doctrine/pdo_session_storage.rst

Lines changed: 1 addition & 1 deletion
< F438 /colgroup>
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ MySQL
190190
.. code-block:: sql
191191
192192
CREATE TABLE `sessions` (
193-
`sess_id` VARBINARY(128) NOT NULL PRIMARY KEY,
193+
`sess_id` VARCHAR(128) NOT NULL PRIMARY KEY,
194194
`sess_data` BLOB NOT NULL,
195195
`sess_time` INTEGER UNSIGNED NOT NULL,
196196
`sess_lifetime` MEDIUMINT NOT NULL

reference/constraints/NotEqualTo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ the following:
9999
{
100100
public static function loadValidatorMetadata(ClassMetadata $metadata)
101101
{
102-
$metadata->addPropertyConstraint('age', new Assert\NotEqualTo('Mary'));
102+
$metadata->addPropertyConstraint('firstName', new Assert\NotEqualTo('Mary'));
103103
104104
$metadata->addPropertyConstraint('age', new Assert\NotEqualTo(array(
105105
'value' => 15,

security/voters.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ decides this using whatever logic you want.
9898

9999
The ``denyAccessUnlessGranted()`` and ``isGranted()`` functions are both
100100
just shortcuts of the ``Controller`` class to call ``isGranted()`` on
101-
the ``security.authorization_checker`` service.
102-
101+
  the ``security.authorization_checker`` service. The main difference is that
102+
when access is not granted, ``denyAccessUnlessGranted()`` throws an
103+
   ``AccessDeniedException``, whereas ``isGranted()`` returns ``false``.
104+
103105
Creating the custom Voter
104106
-------------------------
105107

setup/bundles.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ following recommended configuration as the starting point of your own configurat
151151
- php: 5.6
152152
env: SYMFONY_VERSION='3.1.*'
153153
- php: 5.6
154-
env: DEPENDENCES='dev' SYMFONY_VERSION='3.2.*@dev'
154+
env: DEPENDENCIES='dev' SYMFONY_VERSION='3.2.*@dev'
155155
156156
before_install:
157157
- composer self-update

validation/groups.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ the class name or the string ``Default``.
166166
object that's actually the one being validated.
167167

168168
If you have inheritance (e.g. ``User extends BaseUser``) and you validate
169-
with the class name of the subclass (i.e. ``User``), then all constraints
170-
in the ``User`` and ``BaseUser`` will be validated. However, if you
171-
validate using the base class (i.e. ``BaseUser``), then only the default
172-
constraints in the ``BaseUser`` class will be validated.
173-
169+
with the class name of the subclass (i.e. ``User``), then only constraints
170+
in the ``User`` will be validated. To validate the parent constraints as
171+
  well you need to provide multiple groups (i.e ``User`` and ``BaseUser``) or
172+
   ``Default``.
173+
174174
To tell the validator to use a specific group, pass one or more group names
175175
as the third argument to the ``validate()`` method::
176176

0 commit comments

Comments
 (0)
0