Skip to content

Commit 318fc2d

Browse files
committed
Merge branch '2.5' into 2.6
* 2.5: [SecurityBundle] Authentication entry point is only registered with firewall exception listener, not with authentication listeners be smarter when guessing the document root Azerbaijani locale Fixed grammar error in docblock Adjust upgrade file rendering [Bridge/Propel1] Changed deps to accepts all upcoming propel1 versions compare version using PHP_VERSION_ID [Form] Add doc for FormEvents don't override internal PHP constants [Session] Fix parameter names in WriteCheckSessionHandler Add consistency with request type checking [FrameworkBundle] Fix server run in case the router script does not exist Conflicts: composer.json src/Symfony/Component/Debug/ErrorHandler.php src/Symfony/Component/Debug/ExceptionHandler.php
2 parents 20a9e09 + 3cf476d commit 318fc2d

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

EventListener/SaveSessionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class SaveSessionListener implements EventSubscriberInterface
4747
{
4848
public function onKernelResponse(FilterResponseEvent $event)
4949
{
50-
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
50+
if (!$event->isMasterRequest()) {
5151
return;
5252
}
5353

Fragment/HIncludeFragmentRenderer.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Fragment;
1313

14-
if (!defined('ENT_SUBSTITUTE')) {
15-
define('ENT_SUBSTITUTE', 8);
16-
}
17-
1814
use Symfony\Component\HttpFoundation\Request;
1915
use Symfony\Component\HttpFoundation\Response;
2016
use Symfony\Component\Templating\EngineInterface;
@@ -111,11 +107,16 @@ public function render($uri, Request $request, array $options = array())
111107
}
112108
$renderedAttributes = '';
113109
if (count($attributes) > 0) {
110+
if (PHP_VERSION_ID >= 50400) {
111+
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
112+
} else {
113+
$flags = ENT_QUOTES;
114+
}
114115
foreach ($attributes as $attribute => $value) {
115116
$renderedAttributes .= sprintf(
116117
' %s="%s"',
117-
htmlspecialchars($attribute, ENT_QUOTES | ENT_SUBSTITUTE, $this->charset, false),
118-
htmlspecialchars($value, ENT_QUOTES | ENT_SUBSTITUTE, $this->charset, false)
118+
htmlspecialchars($attribute, $flags, $this->charset, false),
119+
htmlspecialchars($value, $flags, $this->charset, false)
119120
);
120121
}
121122
}

Tests/Controller/ControllerResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function testGetArguments()
181181
$request->attributes->set('foobar', 'foobar');
182182
$controller = array(new self(), 'controllerMethod3');
183183

184-
if (version_compare(PHP_VERSION, '5.3.16', '==')) {
184+
if (PHP_VERSION_ID === 50316) {
185185
$this->markTestSkipped('PHP 5.3.16 has a major bug in the Reflection sub-system');
186186
} else {
187187
try {

0 commit comments

Comments
 (0)