Skip to content

Commit 6d680ea

Browse files
committed
Merge remote-tracking branch 'upstream/2.7' into 2.7
2 parents e5bf840 + da6afe8 commit 6d680ea

File tree

6 files changed

+20
-7
lines changed

6 files changed

+20
-7
lines changed

components/dom_crawler.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,19 @@ given text. This method is especially useful because you can use it to return
338338
a :class:`Symfony\\Component\\DomCrawler\\Form` object that represents the
339339
form that the button lives in::
340340

341-
$form = $crawler->selectButton('validate')->form();
341+
// button example: <button id="my-super-button" type="submit">My super button</button>
342+
343+
// you can get button by its label
344+
$form = $crawler->selectButton('My super button')->form();
345+
346+
// or by button id (#my-super-button) if the button doesn't have a label
347+
$form = $crawler->selectButton('my-super-button')->form();
348+
349+
// or you can filter the whole form, for example a form has a class attribute: <form class="form-vertical" method="POST">
350+
$crawler->filter('.form-vertical')->form();
342351

343352
// or "fill" the form fields with data
344-
$form = $crawler->selectButton('validate')->form(array(
353+
$form = $crawler->selectButton('my-super-button')->form(array(
345354
'name' => 'Ryan',
346355
));
347356

controller.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ Managing the Session
352352
--------------------
353353

354354
Symfony provides a nice session object that you can use to store information
355-
about the user between requests. By default, Symfony stores the attributes in a
356-
cookie by using native PHP sessions.
355+
about the user between requests. By default, Symfony stores the token in a
356+
cookie and writes the attributes to a file by using native PHP sessions.
357357

358358
To retrieve the session, call
359359
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::getSession`

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ logic to a separate service::
243243
{
244244
$fileName = md5(uniqid()).'.'.$file->guessExtension();
245245

246-
$file->move($this->targetDir, $fileName);
246+
$file->move($this->getTargetDir(), $fileName);
247247

248248
return $fileName;
249249
}

form/form_customization.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,8 @@ and customize the ``form_errors`` fragment.
866866

867867
.. code-block:: html+twig
868868

869+
{% form_theme form _self %}
870+
869871
{# form_errors.html.twig #}
870872
{% block form_errors %}
871873
{% spaceless %}
@@ -926,6 +928,8 @@ fields (e.g. a whole form), and not just an individual field.
926928

927929
.. code-block:: html+twig
928930

931+
{% form_theme form _self %}
932+
929933
{# form_errors.html.twig #}
930934
{% block form_errors %}
931935
{% spaceless %}

security/acl_advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ this request to an implementation of
190190
This allows you to replace the way access decisions are reached without actually
191191
modifying the ACL class itself.
192192

193-
The ``PermissionGrantingStrategy`` first checks all your object-scope ACEs. If none
193+
The ``PermissionGrantingStrategy`` first checks all your object-scope ACEs. If one
194194
is applicable, the class-scope ACEs will be checked. If none is applicable,
195195
then the process will be repeated with the ACEs of the parent ACL. If no
196196
parent ACL exists, an exception will be thrown.

validation/custom_constraint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ includes some simple default logic::
4545
// in the base Symfony\Component\Validator\Constraint class
4646
public function validatedBy()
4747
{
48-
return get_class($this).'Validator';
48+
return ContainsAlphanumericValidator::class;
4949
}
5050

5151
In other words, if you create a custom ``Constraint`` (e.g. ``MyConstraint``),

0 commit comments

Comments
 (0)