8000 Merge branch '2.8' into 3.4 · symfony/symfony@aa13bfd · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit aa13bfd

Browse files
Merge branch '2.8' into 3.4
* 2.8: Use the real image URL for the filesystem tests [Finder] Update PHPdoc append() [DI] Fix phpdoc Fix code examples in PHPDoc [HttpKernel] Fix inheritdocs
2 parents b61480f + 53c1a5f commit aa13bfd

File tree

33 files changed

+216
-252
lines changed

33 files changed

+216
-252
lines changed

src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@
2727
* and to do the conversion of the datetime column.
2828
*
2929
* In order to use this class, you need the following table in your database:
30-
* CREATE TABLE `rememberme_token` (
31-
* `series` char(88) UNIQUE PRIMARY KEY NOT NULL,
32-
* `value` char(88) NOT NULL,
33-
* `lastUsed` datetime NOT NULL,
34-
* `class` varchar(100) NOT NULL,
35-
* `username` varchar(200) NOT NULL
36-
* );
30+
*
31+
* CREATE TABLE `rememberme_token` (
32+
* `series` char(88) UNIQUE PRIMARY KEY NOT NULL,
33+
* `value` char(88) NOT NULL,
34+
* `lastUsed` datetime NOT NULL,
35+
* `class` varchar(100) NOT NULL,
36+
* `username` varchar(200) NOT NULL
37+
* );
3738
*/
3839
class DoctrineTokenProvider implements TokenProviderInterface
3940
{

src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
* Token Parser for the 'dump' tag.
2020
*
2121
* Dump variables with:
22-
* <pre>
23-
* {% dump %}
24-
* {% dump foo %}
25-
* {% dump foo, bar %}
26-
* </pre>
22+
*
23+
* {% dump %}
24+
* {% dump foo %}
25+
* {% dump foo, bar %}
2726
*
2827
* @author Julien Galenski <julien.galenski@gmail.com>
2928
*/

src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ abstract protected function configureRoutes(RouteCollectionBuilder $routes);
3939
*
4040
* You can register extensions:
4141
*
42-
* $c->loadFromExtension('framework', array(
43-
* 'secret' => '%secret%'
44-
* ));
42+
* $c->loadFromExtension('framework', array(
43+
* 'secret' => '%secret%'
44+
* ));
4545
*
4646
* Or services:
4747
*
48-
* $c->register('halloween', 'FooBundle\HalloweenProvider');
48+
* $c->register('halloween', 'FooBundle\HalloweenProvider');
4949
*
5050
* Or parameters:
5151
*
52-
* $c->setParameter('halloween', 'lot of fun');
52+
* $c->setParameter('halloween', 'lot of fun');
5353
*
5454
* @param ContainerBuilder $c
5555
* @param LoaderInterface $loader

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,18 +212,14 @@ public function block(FormView $view, $blockName, array $variables = array())
212212
* Use this helper for CSRF protection without the overhead of creating a
213213
* form.
214214
*
215-
* <code>
216-
* echo $view['form']->csrfToken('rm_user_'.$user->getId());
217-
* </code>
215+
* echo $view['form']->csrfToken('rm_user_'.$user->getId());
218216
*
219217
* Check the token in your action using the same CSRF token id.
220218
*
221-
* <code>
222-
* // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface
223-
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
224-
* throw new \RuntimeException('CSRF attack detected.');
225-
* }
226-
* </code>
219+
* // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface
220+
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
221+
* throw new \RuntimeException('CSRF attack detected.');
222+
* }
227223
*
228224
* @param string $tokenId The CSRF token id of the protected action
229225
*

src/Symfony/Component/Config/Definition/PrototypedArrayNode.php

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -342,27 +342,31 @@ protected function mergeValues($leftSide, $rightSide)
342342
* one is same as this->keyAttribute and the other is 'value', then the prototype will be different.
343343
*
344344
* For example, assume $this->keyAttribute is 'name' and the value array is as follows:
345-
* array(
345+
*
346346
* array(
347-
* 'name' => 'name001',
348-
* 'value' => 'value001'
347+
* array(
348+
* 'name' => 'name001',
349+
* 'value' => 'value001'
350+
* )
349351
* )
350-
* )
351352
*
352353
* Now, the key is 0 and the child node is:
353-
* array(
354-
* 'name' => 'name001',
355-
* 'value' => 'value001'
356-
* )
354+
*
355+
* array(
356+
* 'name' => 'name001',
357+
* 'value' => 'value001'
358+
* )
357359
*
358360
* When normalizing the value array, the 'name' element will removed from the child node
359361
* and its value becomes the new key of the child node:
360-
* array(
361-
* 'name001' => array('value' => 'value001')
362-
* )
362+
*
363+
* array(
364+
* 'name001' => array('value' => 'value001')
365+
* )
363366
*
364367
* Now only 'value' element is left in the child node which can be further simplified into a string:
365-
* array('name001' => 'value001')
368+
*
369+
* array('name001' => 'value001')
366370
*
367371
* Now, the key becomes 'name001' and the child node becomes 'value001' and
368372
* the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance.

src/Symfony/Component/Console/Helper/Table.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,14 @@ public function setRow($column, array $row)
263263
* Renders table to output.
264264
*
265265
* Example:
266-
* <code>
267-
* +---------------+-----------------------+------------------+
268-
* | ISBN | Title | Author |
269-
* +---------------+-----------------------+------------------+
270-
* | 99921-58-10-7 | Divine Comedy | Dante Alighieri |
271-
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
272-
* | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
273-
* +---------------+-----------------------+------------------+
274-
* </code>
266+
*
267+
* +---------------+-----------------------+------------------+
268+
* | ISBN | Title | Author |
269+
* +---------------+-----------------------+------------------+
270+
* | 99921-58-10-7 | Divine Comedy | Dante Alighieri |
271+
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
272+
* | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
273+
* +---------------+-----------------------+------------------+
275274
*/
276275
public function render()
277276
{
@@ -305,7 +304,9 @@ public function render()
305304
/**
306305
* Renders horizontal header separator.
307306
*
308-
* Example: <code>+-----+-----------+-------+</code>
307+
* Example:
308+
*
309+
* +-----+-----------+-------+
309310
*/
310311
private function renderRowSeparator()
311312
{
@@ -336,7 +337,9 @@ private function renderColumnSeparator()
336337
/**
337338
* Renders table row.
338339
*
339-
* Example: <code>| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |</code>
340+
* Example:
341+
*
342+
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
340343
*
341344
* @param array $row
342345
* @param string $cellFormat

src/Symfony/Component/Console/Input/InputDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
* Usage:
2121
*
2222
* $definition = new InputDefinition(array(
23-
* new InputArgument('name', InputArgument::REQUIRED),
24-
* new InputOption('foo', 'f', InputOption::VALUE_REQUIRED),
23+
* new InputArgument('name', InputArgument::REQUIRED),
24+
* new InputOption('foo', 'f', InputOption::VALUE_REQUIRED),
2525
* ));
2626
*
2727
* @author Fabien Potencier <fabien@symfony.com>

src/Symfony/Component/Console/Output/StreamOutput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
*
2121
* Usage:
2222
*
23-
* $output = new StreamOutput(fopen('php://stdout', 'w'));
23+
* $output = new StreamOutput(fopen('php://stdout', 'w'));
2424
*
2525
* As `StreamOutput` can use any stream, you can also use a file:
2626
*
27-
* $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
27+
* $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
2828
*
2929
* @author Fabien Potencier <fabien@symfony.com>
3030
*/

src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@
1818
*/
1919
interface ContainerAwareInterface
2020
{
21+
/**
22+
* Sets the container.
23+
*/
2124
public function setContainer(ContainerInterface $container = null);
2225
}

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,10 @@ private function doGet($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_
647647
* the parameters passed to the container constructor to have precedence
648648
* over the loaded ones.
649649
*
650-
* $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar')));
651-
* $loader = new LoaderXXX($container);
652-
* $loader->load('resource_name');
653-
* $container->register('foo', 'stdClass');
650+
* $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar')));
651+
* $loader = new LoaderXXX($container);
652+
* $loader->load('resource_name');
653+
* $container->register('foo', 'stdClass');
654654
*
655655
* In the above example, even if the loaded resource defines a foo
656656
* parameter, the value will still be 'bar' as defined in the ContainerBuilder
@@ -1288,14 +1288,14 @@ private function doResolveServices($value, array &$inlineServices = array(), $is
12881288
*
12891289
* Example:
12901290
*
1291-
* $container->register('foo')->addTag('my.tag', array('hello' => 'world'));
1291+
* $container->register('foo')->addTag('my.tag', array('hello' => 'world'));
12921292
*
1293-
* $serviceIds = $container->findTaggedServiceIds('my.tag');
1294-
* foreach ($serviceIds as $serviceId => $tags) {
1295-
* foreach ($tags as $tag) {
1296-
* echo $tag['hello'];
1293+
* $serviceIds = $container->findTaggedServiceIds('my.tag');
1294+
* foreach ($serviceIds as $serviceId => $tags) {
1295+
* foreach ($tags as $tag) {
1296+
* echo $tag['hello'];
1297+
* }
12971298
* }
1298-
* }
12991299
*
13001300
* @param string $name
13011301
* @param bool $throwOnAbstract

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function setFactory($factory)
109109
/**
110110
* Gets the factory.
111111
*
112-
* @return string|array The PHP function or an array containing a class/Reference and a method to call
112+
* @return string|array|null The PHP function or an array containing a class/Reference and a method to call
113113
*/
114114
public function getFactory()
115115
{

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ public function evaluate($xpath)
626626
*
627627
* Example:
628628
*
629-
* $crawler->filter('h1 a')->extract(array('_text', 'href'));
629+
* $crawler->filter('h1 a')->extract(array('_text', 'href'));
630630
*
631631
* @param array $attributes An array of attributes
632632
*
@@ -889,7 +889,7 @@ public function registerNamespace($prefix, $namespace)
889889
* Escaped characters are: quotes (") and apostrophe (').
890890
*
891891
* Examples:
892-
* <code>
892+
*
893893
* echo Crawler::xpathLiteral('foo " bar');
894894
* //prints 'foo " bar'
895895
*
@@ -898,7 +898,7 @@ public function registerNamespace($prefix, $namespace)
898898
*
899899
* echo Crawler::xpathLiteral('a\'b"c');
900900
* //prints concat('a', "'", 'b"c')
901-
* </code>
901+
*
902902
*
903903
* @param string $s String to be escaped
904904
*

src/Symfony/Component/DomCrawler/FormFieldRegistry.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ private function walk(array $array, $base = '', array &$output = array())
186186
/**
187187
* Splits a field name into segments as a web browser would do.
188188
*
189-
* <code>
190189
* getSegments('base[foo][3][]') = array('base', 'foo, '3', '');
191-
* </code>
192190
*
193191
* @param string $name The name of the field
194192
*

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
161161
*/
162162
public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
163163
{
164-
$sourceFilePath = 'http://symfony.com/images/common/logo/logo_symfony_header.png';
164+
$sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png';
165165
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file' 41D5 ;
166166

167167
file_put_contents($targetFilePath, 'TARGET FILE');

0 commit comments

Comments
 (0)
0