Browse files

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
  • Loading branch information...
2 parents d6a402a + a7cd5f5 commit d2885adffe909dbb7aa95f48504650834959e748 @fabpot fabpot committed Dec 11, 2012
View
2 README.md
@@ -1,8 +1,6 @@
README
======
-[![Build Status](https://secure.travis-ci.org/symfony/symfony.png?branch=master)](http://travis-ci.org/symfony/symfony)
-
What is Symfony2?
-----------------
View
4 src/Symfony/Component/Config/Loader/Loader.php
@@ -47,10 +47,12 @@ public function setResolver(LoaderResolverInterface $resolver)
*
* @param mixed $resource A Resource
* @param string $type The resource type
+ *
+ * @return mixed
*/
public function import($resource, $type = null)
{
- $this->resolve($resource)->load($resource, $type);
+ return $this->resolve($resource)->load($resource, $type);
}
/**
View
9 src/Symfony/Component/Config/Tests/Loader/LoaderTest.php
@@ -55,6 +55,15 @@ public function testResolve()
$this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderLoadException', $e, '->resolve() throws a FileLoaderLoadException if the resource cannot be loaded');
}
}
+
+ public function testImport()
+ {
+ $loader = $this->getMock('Symfony\Component\Config\Loader\Loader', array('supports', 'load'));
+ $loader->expects($this->once())->method('supports')->will($this->returnValue(true));
+ $loader->expects($this->once())->method('load')->will($this->returnValue('yes'));
+
+ $this->assertEquals('yes', $loader->import('foo'));
+ }
}
class ProjectLoader1 extends Loader
View
2 src/Symfony/Component/CssSelector/Node/FunctionNode.php
@@ -209,7 +209,6 @@ protected function _xpath_contains($xpath, $expr)
$xpath->addCondition(sprintf('contains(string(.), %s)', XPathExpr::xpathLiteral($expr)));
// FIXME: Currently case insensitive matching doesn't seem to be happening
-
return $xpath;
}
@@ -264,7 +263,6 @@ protected function parseSeries($s)
if (false === strpos($s, 'n')) {
// Just a b
-
return array(0, intval((string) $s));
}
View
2 src/Symfony/Component/HttpFoundation/Request.php
@@ -992,7 +992,7 @@ public function getHost()
// trim and remove port number from host
// host is lowercase as per RFC 952/2181
- $host = strtolower(trim(preg_replace('/:\d+$/', '', $host)));
+ $host = strtolower(preg_replace('/:\d+$/', '', trim($host)));
// as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user)
// check that it does not contain forbidden characters (see RFC 952 and RFC 2181)
View
1 src/Symfony/Component/HttpFoundation/RequestMatcher.php
@@ -235,4 +235,3 @@ protected function checkIp6($requestIp, $ip)
return true;
}
}
-
View
1 src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php
@@ -200,4 +200,3 @@ public function testAttributes()
$this->assertFalse($matcher->matches($request));
}
}
-
View
1 src/Symfony/Component/Security/Http/Firewall/ContextListener.php
@@ -75,6 +75,7 @@ public function handle(GetResponseEvent $event)
if (null === $session || null === $token = $session->get('_security_'.$this->contextKey)) {
$this->context->setToken(null);
+
return;
}

0 comments on commit d2885ad

Please sign in to comment.