Skip to content

Commit b62d459

Browse files
committed
Merge branch '2.5'
* 2.5: [TwigBridge][Trans]set %count% only on transChoice [Debug] throw even in stacking mode to preserve code paths [Debug] preserve modified error level [DomCrawler] Fixed a forgotten case of complex XPath queries bumped Symfony version to 2.4.6 updated VERSION for 2.4.5 updated CHANGELOG for 2.4.5 bumped Symfony version to 2.3.16 updated VERSION for 2.3.15 updated CHANGELOG for 2.3.15
2 parents a11645c + 487e6ed commit b62d459

File tree

7 files changed

+57
-12
lines changed

7 files changed

+57
-12
lines changed

CHANGELOG-2.3.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ in 2.3 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1
99

10+
* 2.3.15 (2014-05-22)
11+
12+
* reverted #10908
13+
1014
* 2.3.14 (2014-05-22)
1115

1216
* bug #10849 [WIP][Finder] Fix wrong implementation on sortable callback comparator (ProPheT777)

CHANGELOG-2.4.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,38 @@ in 2.4 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.4.0...v2.4.1
99

10+
* 2.4.5 (2014-05-22)
11+
12+
* bug #10849 [WIP][Finder] Fix wrong implementation on sortable callback comparator (ProPheT777)
13+
* bug #10929 [Process] Add validation on Process input (romainneutron)
14+
* bug #10958 [DomCrawler] Fixed filterXPath() chaining loosing the parent DOM nodes (stof, robbertkl)
15+
* bug #10953 [HttpKernel] fixed file uploads in functional tests without file selected (realmfoo)
16+
* bug #10947 [PropertyAccess] Fixed getValue() when accessing non-existing indices of ArrayAccess implementations (webmozart)
17+
* bug #10937 [HttpKernel] Fix "absolute path" when we look to the cache directory (BenoitLeveque)
18+
* bug #10894 [HttpKernel] removed absolute paths from the generated container (fabpot)
19+
* bug #10926 [DomCrawler] Fixed the initial state for options without value attribute (stof)
20+
* bug #10925 [DomCrawler] Fixed the handling of boolean attributes in ChoiceFormField (stof)
21+
* bug #10777 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed (tucksaun)
22+
* bug #10909 [PropertyAccess] Fixed plurals for -ves words (csarrazi)
23+
* bug #10904 [HttpKernel] Replace sha1 with sha256 in recently added tests (jakzal)
24+
* bug #10899 Explicitly define the encoding. (jakzal)
25+
* bug #10897 [Console] Fix a console test (jakzal)
26+
* bug #10896 [HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined (alquerci, fabpot)
27+
* bug #10841 [DomCrawler] Fixed image input case sensitive (geoffrey-brier)
28+
* bug #10714 [Console]Improve formatter for double-width character (denkiryokuhatsuden)
29+
* bug #10872 [Form] Fixed TrimListenerTest as of PHP 5.5 (webmozart)
30+
* bug #10762 [BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string (thewilkybarkid)
31+
* bug #10863 [Security] Add check for supported attributes in AclVoter (artursvonda)
32+
* bug #10833 [TwigBridge][Transchoice] set %count% from the current context. (aitboudad)
33+
* bug #10820 [WebProfilerBundle] Fixed profiler seach/homepage with empty token (tucksaun)
34+
* bug #10815 Fixed issue #5427 (umpirsky)
35+
* bug #10817 [Debug] fix #10313: FlattenException not found (nicolas-grekas)
36+
* bug #10803 [Debug] fix ErrorHandlerTest when context is not an array (nicolas-grekas)
37+
* bug #10801 [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292 (nicolas-grekas)
38+
* bug #10797 [HttpFoundation] Allow File instance to be passed to BinaryFileResponse (anlutro)
39+
* bug #10643 [TwigBridge] Removed strict check when found variables inside a translation (goetas)
40+
* bug #10605 [ExpressionLanguage] Strict in_array check in Parser.php (parnas)
41+
1042
* 2.4.4 (2014-04-27)
1143

1244
* bug #10789 [Console] Fixed the rendering of exceptions on HHVM with a terminal width (stof)

src/Symfony/Bridge/Twig/Node/TransNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ protected function compileString(\Twig_NodeInterface $body, \Twig_Node_Expressio
9898
foreach ($matches[1] as $var) {
9999
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getLine());
100100
if (!$vars->hasElement($key)) {
101-
if ('count' === $var) {
101+
if ('count' === $var && null !== $this->getNode('count')) {
102102
$vars->addElement($this->getNode('count'), $key);
103103
} else {
104104
$varExpr = new \Twig_Node_Expression_Name($var, $body->getLine());

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static function setLogger(LoggerInterface $logger, $channel = 'deprecatio
117117
}
118118

119119
/**
120-
* @throws ContextErrorException When error_reporting returns error
120+
* @throws \ErrorException When error_reporting returns error
121121
*/
122122
public function handle($level, $message, $file = 'unknown', $line = 0, $context = array())
123123
{
@@ -145,18 +145,19 @@ function ($row) {
145145
return true;
146146
}
147147
} elseif ($this->displayErrors && error_reporting() & $level && $this->level & $level) {
148-
if (self::$stackedErrorLevels) {
149-
self::$stackedErrors[] = func_get_args();
150-
151-
return true;
152-
}
153-
154148
if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && is_array($context)) {
155-
unset($context['GLOBALS']);
149+
$c = $context; // Whatever the signature of the method,
150+
unset($c['GLOBALS'], $context); // $context is always a reference in 5.3
151+
$context = $c;
156152
}
157153

158154
$exception = sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line);
159-
$exception = new ContextErrorException($exception, 0, $level, $file, $line, $context);
155+
if ($context && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) {
156+
// Checking for class existence is a work around for https://bugs.php.net/42098
157+
$exception = new ContextErrorException($exception, 0, $level, $file, $line, $context);
158+
} else {
159+
$exception = new \ErrorException($exception, 0, $level, $file, $line);
160+
}
160161

161162
if (PHP_VERSION_ID <= 50407 && (PHP_VERSION_ID >= 50400 || PHP_VERSION_ID <= 50317)) {
162163
// Exceptions thrown from error handlers are sometimes not caught by the exception
@@ -225,7 +226,11 @@ public static function unstackErrors()
225226
$level = array_pop(self::$stackedErrorLevels);
226227

227228
if (null !== $level) {
228-
error_reporting($level);
229+
$e = error_reporting($level);
230+
if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) {
231+
// If the user changed the error level, do not overwrite it
232+
error_reporting($e);
233+
}
229234
}
230235

231236
if (empty(self::$stackedErrorLevels)) {

src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function testStacking()
9999
class ChildTestingStacking extends TestingStacking { function foo($bar) {} }
100100
');
101101
$this->fail('ContextErrorException expected');
102-
} catch (ContextErrorException $exception) {
102+
} catch (\ErrorException $exception) {
103103
// if an exception is thrown, the test passed
104104
restore_error_handler();
105105
restore_exception_handler();

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,8 @@ private function relativize($xpath)
874874
$expression = $nonMatchingExpression;
875875
} elseif (0 === strpos($expression, '//')) {
876876
$expression = 'descendant-or-self::' . substr($expression, 2);
877+
} elseif (0 === strpos($expression, './/')) {
878+
$expression = 'descendant-or-self::' . substr($expression, 3);
877879
} elseif (0 === strpos($expression, './')) {
878880
$expression = 'self::' . substr($expression, 2);
879881
} elseif ('/' === $expression[0]) {

src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ public function testFilterXpathComplexQueries()
388388
$this->assertCount(0, $crawler->filterXPath('/body'));
389389
$this->assertCount(1, $crawler->filterXPath('/_root/body'));
390390
$this->assertCount(1, $crawler->filterXPath('./body'));
391+
$this->assertCount(1, $crawler->filterXPath('.//body'));
392+
$this->assertCount(5, $crawler->filterXPath('.//input'));
391393
$this->assertCount(4, $crawler->filterXPath('//form')->filterXPath('//button | //input'));
392394
$this->assertCount(1, $crawler->filterXPath('body'));
393395
$this->assertCount(6, $crawler->filterXPath('//button | //input'));

0 commit comments

Comments
 (0)