Skip to content

Commit 9eca70c

Browse files
committed
Merge branch '2.8' into 3.2
* 2.8: minor #7613 Twig Extensions Reference minor brush-up (mpdude) Update Title in controller.rst Update scheme.rst Update requirements.rst [#7845] minor tweaks Update translation_domain.rst.inc Update page_creation.rst to correct hidden colon Update forms.rst Fixed the form types of the buttons in the Form reference Minor reword Update deployment.rst KernelTestCase::createKernel() is static, $this->createKernel() -> static::createKernel() Better explain how to enable the validation component and its annotations Fix the link to ConEmu (it is now hosted on GitHub) Add annotation examples to match a route based on the host Minor reword to improve readability Minor reword and reformatting Add security stateless tip typo
2 parents b2a0e50 + 62af2ca commit 9eca70c

19 files changed

+278
-53
lines changed

console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ you can extend your test from
273273
{
274274
public function testExecute()
275275
{
276-
$kernel = $this->createKernel();
276+
$kernel = static::createKernel();
277277
$kernel->boot();
278278

279279
$application = new Application($kernel);

contributing/code/tests.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ what's going on and if the tests are broken because of the new code.
5555
to see colored test results.
5656

5757
.. _Cmder: http://cmder.net/
58-
.. _ConEmu: https://code.google.com/p/conemu-maximus5/
58+
.. _ConEmu: https://conemu.github.io/
5959
.. _ANSICON: https://github.com/adoxa/ansicon/releases
6060
.. _Mintty: https://mintty.github.io/

controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ The Symfony templating system and Twig are explained more in the
233233

234234
.. _controller-accessing-services:
235235

236-
Accessing other Services
236+
Accessing Other Services
237237
~~~~~~~~~~~~~~~~~~~~~~~~
238238

239239
Symfony comes packed with a lot of useful objects, called *services*. These

deployment.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ specifically tailored to the requirements of Symfony.
8080
`Capistrano`_ with `Symfony plugin`_
8181
`Capistrano`_ is a remote server automation and deployment tool written in Ruby.
8282
`Symfony plugin`_ is a plugin to ease Symfony related tasks, inspired by `Capifony`_
83-
(which works only with Capistrano 2 )
83+
(which works only with Capistrano 2).
8484

8585
`sf2debpkg`_
8686
Helps you build a native Debian package for your Symfony project.
@@ -181,12 +181,12 @@ setup:
181181
* Pushing assets to a CDN
182182
* ...
183183

184-
Application Lifecycle: Continuous Integration, QA, etc
185-
------------------------------------------------------
184+
Application Lifecycle: Continuous Integration, QA, etc.
185+
-------------------------------------------------------
186186

187187
While this entry covers the technical details of deploying, the full lifecycle
188-
of taking code from development up to production may have a lot more steps
189-
(think deploying to staging, QA (Quality Assurance), running tests, etc).
188+
of taking code from development up to production may have more steps:
189+
deploying to staging, QA (Quality Assurance), running tests, etc.
190190

191191
The use of staging, testing, QA, continuous integration, database migrations
192192
and the capability to roll back in case of failure are all strongly advised. There

forms.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ to do with Symfony or any other library. It's quite simply a normal PHP object
6161
that directly solves a problem inside *your* application (i.e. the need to
6262
represent a task in your application). Of course, by the end of this article,
6363
you'll be able to submit data to a ``Task`` instance (via an HTML form), validate
64-
its data, and persist it to the database.
64+
its data and persist it to the database.
6565

6666
.. index::
6767
single: Forms; Create a form in a controller
@@ -114,7 +114,7 @@ from inside a controller::
114114

115115
Creating a form requires relatively little code because Symfony form objects
116116
are built with a "form builder". The form builder's purpose is to allow you
117-
to write simple form "recipes", and have it do all the heavy-lifting of actually
117+
to write simple form "recipes" and have it do all the heavy-lifting of actually
118118
building the form.
119119

120120
In this example, you've added two fields to your form - ``task`` and ``dueDate`` -
@@ -259,7 +259,7 @@ your controller::
259259
is called. Otherwise, changes done in the ``*_SUBMIT`` events aren't applied to the
260260
view (like validation errors).
261261

262-
This controller follows a common pattern for handling forms, and has three
262+
This controller follows a common pattern for handling forms and has three
263263
possible paths:
264264

265265
#. When initially loading the page in a browser, the form is created and

introduction/from_flat_php_to_symfony2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ on the requested URI::
370370
echo '<html><body><h1>Page Not Found</h1></body></html>';
371371
}
372372

373-
For organization, both controllers (formerly ``index.php`` and ``show.php``)
373+
For organization, both controllers (formerly ``/index.php`` and ``/index.php/show``)
374374
are now PHP functions and each has been moved into a separate file named ``controllers.php``::
375375

376376
// controllers.php

page_creation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ to creating a page?
8484
in its own section, including how to make *variable* URLs;
8585

8686
#. *Create a controller*: The method below the route - ``numberAction()`` - is called
87-
the *controller*: this is a function where *you* build the page and ultimately
87+
the *controller*. This is a function where *you* build the page and ultimately
8888
return a ``Response`` object. You'll learn more about :doc:`controllers </controller>`
8989
in their own section, including how to return JSON responses.
9090

reference/configuration/security.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,13 @@ multiple firewalls, the "context" could actually be shared:
644644
),
645645
));
646646
647+
.. note::
648+
649+
The firewall context key is stored in session, so every firewall using it
650+
must set its ``stateless`` option to ``false``. Otherwise, the context is
651+
ignored and you won't be able to authenticate on multiple firewalls at the
652+
same time.
653+
647654
HTTP-Digest Authentication
648655
--------------------------
649656

reference/forms/types/button.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,21 @@ The ``BaseType`` class is the parent class for both the ``button`` type
2828
and the :doc:`FormType </reference/forms/types/form>`, but it is not part
2929
of the form type tree (i.e. it cannot be used as a form type on its own).
3030

31-
.. include:: /reference/forms/types/options/button_attr.rst.inc
31+
attr
32+
~~~~
33+
34+
**type**: ``array`` **default**: ``array()``
35+
36+
If you want to add extra attributes to the HTML representation of the button,
37+
you can use ``attr`` option. It's an associative array with HTML attribute
38+
as a key. This can be useful when you need to set a custom class for the button::
39+
40+
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
41+
// ...
42+
43+
$builder->add('save', ButtonType::class, array(
44+
'attr' => array('class' => 'save'),
45+
));
3246

3347
.. include:: /reference/forms/types/options/button_disabled.rst.inc
3448

reference/forms/types/options/button_attr.rst.inc

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)