8000 Merge branch '2.0' into 2.1 · symfony/symfony@d2885ad · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit d2885ad

Browse files
committed
Merge branch '2.0' into 2.1
* 2.0: fixed CS removed the Travis icon (as this is not stable enough -- many false positive, closes #6186) [Config] Loader::import must return imported data [HttpFoundation] fixed a small regression Conflicts: README.md src/Symfony/Bridge/Twig/Extension/FormExtension.php src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php src/Symfony/Component/Form/Form.php src/Symfony/Component/HttpFoundation/Request.php src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php tests/Symfony/Tests/Bridge/Doctrine/Logger/DbalLoggerTest.php
2 parents d6a402a + a7cd5f5 commit d2885ad

File tree

8 files changed

+14
-8
lines changed

8 files changed

+14
-8
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
README
22
======
33

4-
[![Build Status](https://secure.travis-ci.org/symfony/symfony.png?branch=master)](http://travis-ci.org/symfony/symfony)
5-
64
What is Symfony2?
75
-----------------
86

src/Symfony/Component/Config/Loader/Loader.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ public function setResolver(LoaderResolverInterface $resolver)
4747
*
4848
* @param mixed $resource A Resource
4949
* @param string $type The resource type
50+
*
51+
* @return mixed
5052
*/
5153
public function import($resource, $type = null)
5254
{
53-
$this->resolve($resource)->load($resource, $type);
55+
return $this->resolve($resource)->load($resource, $type);
5456
}
5557

5658
/**

src/Symfony/Component/Config/Tests/Loader/LoaderTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ public function testResolve()
5555
$this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderLoadException', $e, '->resolve() throws a FileLoaderLoadException if the resource cannot be loaded');
5656
}
5757
}
58+
59+
public function testImport()
60+
{
61+
$loader = $this->getMock('Symfony\Component\Config\Loader\Loader', array('supports', 'load'));
62+
$loader->expects($this->once())->method('supports')->will($this->returnValue(true));
63+
$loader->expects($this->once())->method('load')->will($this->returnValue('yes'));
64+
65+
$this->assertEquals('yes', $loader->import('foo'));
66+
}
5867
}
5968

6069
class ProjectLoader1 extends Loader

src/Symfony/Component/CssSelector/Node/FunctionNode.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ protected function _xpath_contains($xpath, $expr)
209209
$xpath->addCondition(sprintf('contains(string(.), %s)', XPathExpr::xpathLiteral($expr)));
210210

211211
// FIXME: Currently case insensitive matching doesn't seem to be happening
212-
213212
return $xpath;
214213
}
215214

@@ -264,7 +263,6 @@ protected function parseSeries($s)
264263

265264
if (false === strpos($s, 'n')) {
266265
// Just a b
267-
268266
return array(0, intval((string) $s));
269267
}
270268

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ public function getHost()
992992

993993
// trim and remove port number from host
994994
// host is lowercase as per RFC 952/2181
995-
$host = strtolower(trim(preg_replace('/:\d+$/', '', $host)));
995+
$host = strtolower(preg_replace('/:\d+$/', '', trim($host)));
996996

997997
// as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user)
998998
// check that it does not contain forbidden characters (see RFC 952 and RFC 2181)

src/Symfony/Component/HttpFoundation/RequestMatcher.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,3 @@ protected function checkIp6($requestIp, $ip)
235235
return true;
236236
}
237237
}
238-

src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,3 @@ public function testAttributes()
200200
$this->assertFalse($matcher->matches($request));
201201
}
202202
}
203-

src/Symfony/Component/Security/Http/Firewall/ContextListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function handle(GetResponseEvent $event)
7575

7676
if (null === $session || null === $token = $session->get('_security_'.$this->contextKey)) {
7777
$this->context->setToken(null);
78+
78 4473 79
return;
7980
}
8081

0 commit comments

Comments
 (0)
0