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

Skip to content

Commit 9302866

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Update routing.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 2f005f1 + 630da14 commit 9302866

File tree

8 files changed

+30
-17
lines changed

8 files changed

+30
-17
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
@@ -167,12 +167,15 @@ service configuration. Your method receives a
167167
:class:`Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent` object,
168168
which has methods to get information about the event and the exception.
169169

170-
Logging non-0 Exit Statuses
170+
.. _logging-non-0-exit-statuses:
171+
172+
Logging Error Exit Statuses
171173
---------------------------
172174

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

177180
First configure a listener for console terminate events in the service container:
178181

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
@@ -382,6 +382,15 @@ see the :ref:`doctrine-field-types` section.
382382
class Product
383383
// ...
384384

385+
.. tip::
386+
387+
After creating your entities you should validate the mappings with the
388+
following command::
389+
390+
.. code-block:: terminal
391+
392+
$ php bin/console doctrine:schema:validate
393+
385394
.. _doctrine-generating-getters-and-setters:
386395

387396
Generating Getters and Setters

doctrine/pdo_session_storage.rst

Lines changed: 1 addition & 1 deletion
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
@@ -102,7 +102,7 @@ the following:
102102
{
103103
public static function loadValidatorMetadata(ClassMetadata $metadata)
104104
{
105-
$metadata->addPropertyConstraint('age', new Assert\NotEqualTo('Mary'));
105+
$metadata->addPropertyConstraint('firstName', new Assert\NotEqualTo('Mary'));
106106
107107
$metadata->addPropertyConstraint('age', new Assert\NotEqualTo(array(
108108
'value' => 15,

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