8000 Merge branch '2.3' into 2.5 · symfony/symfony@d7bd259 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d7bd259

Browse files
Merge branch '2.3' into 2.5
* 2.3: [TwigBridge] fix form requirement [CssSelector] added the license of the Python library we ported to PHP [SecurityBundle] avoid unneeded work Conflicts: src/Symfony/Bridge/Twig/composer.json
2 parents 9e5066f + 841f532 commit d7bd259

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,17 +599,17 @@ private function createExpression($container, $expression)
599599

600600
private function createRequestMatcher($container, $path = null, $host = null, $methods = array(), $ip = null, array $attributes = array())
601601
{
602+
if ($methods) {
603+
$methods = array_map('strtoupper', (array) $methods);
604+
}
605+
602606
$serialized = serialize(array($path, $host, $methods, $ip, $attributes));
603607
$id = 'security.request_matcher.'.md5($serialized).sha1($serialized);
604608

605609
if (isset($this->requestMatchers[$id])) {
606610
return $this->requestMatchers[$id];
607611
}
608612

609-
if ($methods) {
610-
$methods = array_map('strtoupper', (array) $methods);
611-
}
612-
613613
// only add arguments that are necessary
614614
$arguments = array($path, $host, $methods, $ip, $attributes);
615615
while (count($arguments) > 0 && !end($arguments)) {

src/Symfony/Component/CssSelector/CssSelector.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,39 @@
2727
* This component is a port of the Python cssselector library,
2828
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
2929
*
30+
* Copyright (c) 2007-2012 Ian Bicking and contributors. See AUTHORS
31+
* for more details.
32+
*
33+
* All rights reserved.
34+
*
35+
* Redistribution and use in source and binary forms, with or without
36+
* modification, are permitted provided that the following conditions are
37+
* met:
38+
*
39+
* 1. Redistributions of source code must retain the above copyright
40+
* notice, this list of conditions and the following disclaimer.
41+
*
42+
* 2. Redistributions in binary form must reproduce the above copyright
43+
* notice, this list of conditions and the following disclaimer in
44+
* the documentation and/or other materials provided with the
45+
* distribution.
46+
*
47+
* 3. Neither the name of Ian Bicking nor the names of its contributors may
48+
* be used to endorse or promote products derived from this software
49+
* without specific prior written permission.
50+
*
51+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
52+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
53+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
54+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IAN BICKING OR
55+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
56+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
57+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
58+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
59+
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
60+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
61+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62+
*
3063
* @author Fabien Potencier <fabien@symfony.com>
3164
*
3265
* @api

0 commit comments

Comments
 (0)
0