Skip to content

Commit 350ca93

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: Use the real image URL for the filesystem tests [Finder] Update PHPdoc append() [DI] Fix phpdoc Fix code examples in PHPDoc [HttpKernel] Fix inheritdocs bumped Symfony version to 3.4.16 updated VERSION for 3.4.15 updated CHANGELOG for 3.4.15
2 parents f9b2156 + 129e1e3 commit 350ca93

File tree

5 files changed

+52
-78
lines changed

5 files changed

+52
-78
lines changed

ChoiceList/Factory/PropertyAccessDecorator.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@
2424
*
2525
* Pass the decorated factory to the constructor:
2626
*
27-
* ```php
28-
* $decorator = new PropertyAccessDecorator($factory);
29-
* ```
27+
* $decorator = new PropertyAccessDecorator($factory);
3028
*
3129
* You can now pass property paths for generating choice values, labels, view
3230
* indices, HTML attributes and for determining the preferred choices and the
3331
* choice groups:
3432
*
35-
* ```php
36-
* // extract values from the $value property
37-
* $list = $createListFromChoices($objects, 'value');
38-
* ```
33+
* // extract values from the $value property
34+
* $list = $createListFromChoices($objects, 'value');
3935
*
4036
* @author Bernhard Schussek <[email protected]>
4137
*/

Extension/Validator/ViolationMapper/ViolationPath.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,7 @@ public function isIndex($index)
198198
*
199199
* Consider the following violation path:
200200
*
201-
* <code>
202-
* children[address].children[office].data.street
203-
* </code>
201+
* children[address].children[office].data.street
204202
*
205203
* In this example, "address" and "office" map to forms, while
206204
* "street does not.

FormRendererEngineInterface.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ public function getResourceForBlockName(FormView $view, $blockName);
5555
* and continues with the child of that root, the child of that child etc.
5656
* The following is an example for a block hierarchy:
5757
*
58-
* <code>
59-
* form_widget
60-
* text_widget
61-
* url_widget
62-
* </code>
58+
* form_widget
59+
* text_widget
60+
* url_widget
6361
*
6462
* In this example, "url_widget" is the most specific block, while the other
6563
* blocks are its ancestors in the hierarchy.
@@ -93,11 +91,9 @@ public function getResourceForBlockNameHierarchy(FormView $view, array $blockNam
9391
* and continues with the child of that root, the child of that child etc.
9492
* The following is an example for a block hierarchy:
9593
*
96-
* <code>
97-
* form_widget
98-
* text_widget
99-
* url_widget
100-
* </code>
94+
* form_widget
95+
* text_widget
96+
* url_widget
10197
*
10298
* The second parameter $hierarchyLevel determines the level of the hierarchy
10399
* that should be rendered.

FormRendererInterface.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,14 @@ public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $va
7171
* Use this helper for CSRF protection without the overhead of creating a
7272
* form.
7373
*
74-
* <code>
75-
* <input type="hidden" name="token" value="<?php $renderer->renderCsrfToken('rm_user_'.$user->getId()) ?>">
76-
* </code>
74+
* <input type="hidden" name="token" value="<?php $renderer->renderCsrfToken('rm_user_'.$user->getId()) ?>">
7775
*
7876
* Check the token in your action using the same token ID.
7977
*
80-
* <code>
81-
* // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface
82-
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
83-
* throw new \RuntimeException('CSRF attack detected.');
84-
* }
85-
* </code>
78+
* // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface
79+
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
80+
* throw new \RuntimeException('CSRF attack detected.');
81+
* }
8682
*
8783
* @param string $tokenId The ID of the CSRF token
8884
*

Forms.php

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -18,83 +18,71 @@
1818
*
1919
* Use this class to conveniently create new form factories:
2020
*
21-
* <code>
22-
* use Symfony\Component\Form\Forms;
21+
* use Symfony\Component\Form\Forms;
2322
*
24-
* $formFactory = Forms::createFormFactory();
23+
* $formFactory = Forms::createFormFactory();
2524
*
26-
* $form = $formFactory->createBuilder()
27-
* ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType')
28-
* ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType')
29-
* ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType')
30-
* ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array(
31-
* 'choices' => array('Male' => 'm', 'Female' => 'f'),
32-
* ))
33-
* ->getForm();
34-
* </code>
25+
* $form = $formFactory->createBuilder()
26+
* ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType')
27+
* ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType')
28+
* ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType')
29+
* ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array(
30+
* 'choices' => array('Male' => 'm', 'Female' => 'f'),
31+
* ))
32+
* ->getForm();
3533
*
3634
* You can also add custom extensions to the form factory:
3735
*
38-
* <code>
39-
* $formFactory = Forms::createFormFactoryBuilder()
40-
* ->addExtension(new AcmeExtension())
41-
* ->getFormFactory();
42-
* </code>
36+
* $formFactory = Forms::createFormFactoryBuilder()
37+
* ->addExtension(new AcmeExtension())
38+
* ->getFormFactory();
4339
*
4440
* If you create custom form types or type extensions, it is
4541
* generally recommended to create your own extensions that lazily
4642
* load these types and type extensions. In projects where performance
4743
* does not matter that much, you can also pass them directly to the
4844
* form factory:
4945
*
50-
* <code>
51-
* $formFactory = Forms::createFormFactoryBuilder()
52-
* ->addType(new PersonType())
53-
* ->addType(new PhoneNumberType())
54-
* ->addTypeExtension(new FormTypeHelpTextExtension())
55-
* ->getFormFactory();
56-
* </code>
46+
* $formFactory = Forms::createFormFactoryBuilder()
47+
* ->addType(new PersonType())
48+
* ->addType(new PhoneNumberType())
49+
* ->addTypeExtension(new FormTypeHelpTextExtension())
50+
* ->getFormFactory();
5751
*
5852
* Support for the Validator component is provided by ValidatorExtension.
5953
* This extension needs a validator object to function properly:
6054
*
61-
* <code>
62-
* use Symfony\Component\Validator\Validation;
63-
* use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
55+
* use Symfony\Component\Validator\Validation;
56+
* use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
6457
*
65-
* $validator = Validation::createValidator();
66-
* $formFactory = Forms::createFormFactoryBuilder()
67-
* ->addExtension(new ValidatorExtension($validator))
68-
* ->getFormFactory();
69-
* </code>
58+
* $validator = Validation::createValidator();
59+
* $formFactory = Forms::createFormFactoryBuilder()
60+
* ->addExtension(new ValidatorExtension($validator))
61+
* ->getFormFactory();
7062
*
7163
* Support for the Templating component is provided by TemplatingExtension.
7264
* This extension needs a PhpEngine object for rendering forms. As second
7365
* argument you should pass the names of the default themes. Here is an
7466
* example for using the default layout with "<div>" tags:
7567
*
76-
* <code>
77-
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
68+
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
7869
*
79-
* $formFactory = Forms::createFormFactoryBuilder()
80-
* ->addExtension(new TemplatingExtension($engine, null, array(
81-
* 'FrameworkBundle:Form',
82-
* )))
83-
* ->getFormFactory();
84-
* </code>
70+
* $formFactory = Forms::createFormFactoryBuilder()
71+
* ->addExtension(new TemplatingExtension($engine, null, array(
72+
* 'FrameworkBundle:Form',
73+
* )))
74+
* ->getFormFactory();
8575
*
8676
* The next example shows how to include the "<table>" layout:
8777
*
88-
* <code>
89-
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
78+
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
9079
*
91-
* $formFactory = Forms::createFormFactoryBuilder()
92-
* ->addExtension(new TemplatingExtension($engine, null, array(
93-
* 'FrameworkBundle:Form',
94-
* 'FrameworkBundle:FormTable',
95-
* )))
96-
* ->getFormFactory();
97-
* </code>
80+
* $formFactory = Forms::createFormFactoryBuilder()
81+
* ->addExtension(new TemplatingExtension($engine, null, array(
82+
* 'FrameworkBundle:Form',
83+
* 'FrameworkBundle:FormTable',
84+
* )))
85+
* ->getFormFactory();
9886
*
9987
* @author Bernhard Schussek <[email protected]>
10088
*/

0 commit comments

Comments
 (0)