Skip to content

Commit e7f17a7

Browse files
Marvin Butkereitnicolas-grekas
authored andcommitted
[Console] HHVM read input stream bug
1 parent c0b894d commit e7f17a7

File tree

22 files changed

+133
-56
lines changed

22 files changed

+133
-56
lines changed

src/Symfony/Bridge/PhpUnit/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Provides utilities for PHPUnit, especially user deprecation notices management.
55

66
It comes with the following features:
77

8-
* disable the garbage collector;
98
* enforce a consistent `C` locale;
109
* auto-register `class_exists` to load Doctrine annotations;
1110
* print a user deprecation notices summary at the end of the test suite;

src/Symfony/Bridge/PhpUnit/bootstrap.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
return;
1818
}
1919

20-
if (PHP_VERSION_ID >= 50400 && gc_enabled()) {
21-
// Disabling Zend Garbage Collection to prevent segfaults with PHP5.4+
22-
// https://bugs.php.net/bug.php?id=53976
23-
gc_disable();
24-
}
25-
2620
// Enforce a consistent locale
2721
setlocale(LC_ALL, 'C');
2822

src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,18 @@ protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = tr
164164
}
165165

166166
// fix references to kernel/container related classes
167-
$search = $tempKernel->getName().ucfirst($tempKernel->getEnvironment());
168-
$replace = $realKernel->getName().ucfirst($realKernel->getEnvironment());
169-
foreach (Finder::create()->files()->name($search.'*')->in($warmupDir) as $file) {
167+
$fileSearch = $tempKernel->getName().ucfirst($tempKernel->getEnvironment()).'*';
168+
$search = array(
169+
$tempKernel->getName().ucfirst($tempKernel->getEnvironment()),
170+
sprintf('\'kernel.name\' => \'%s\'', $tempKernel->getName()),
171+
sprintf('key="kernel.name">%s<', $tempKernel->getName()),
172+
);
173+
$replace = array(
174+
$realKernel->getName().ucfirst($realKernel->getEnvironment()),
175+
sprintf('\'kernel.name\' => \'%s\'', $realKernel->getName()),
176+
sprintf('key="kernel.name">%s<', $realKernel->getName()),
177+
);
178+
foreach (Finder::create()->files()->name($fileSearch)->in($warmupDir) as $file) {
170179
$content = str_replace($search, $replace, file_get_contents($file));
171180
file_put_contents(str_replace($search, $replace, $file), $content);
172181
unlink($file);

src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
<deprecated>The "%service_id%" service is deprecated since Symfony 2.7 and will be removed in 3.0. Use the "request_stack" service instead.</deprecated>
4747
</service>
4848

49-
<service id="service_container" synthetic="true" />
49+
<service id="service_container" synthetic="true">
50+
<autowiring-type>Symfony\Component\DependencyInjection\ContainerInterface</autowiring-type>
51+
</service>
5052

5153
<service id="kernel" synthetic="true" />
5254

src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,14 @@ private static function getPhpUnitCliConfigArgument()
8080
if (preg_match('/^-[^ \-]*c$/', $testArg) || $testArg === '--configuration') {
8181
$dir = realpath($reversedArgs[$argIndex - 1]);
8282
break;
83-
} elseif (strpos($testArg, '--configuration=') === 0) {
83+
} elseif (0 === strpos($testArg, '--configuration=')) {
8484
$argPath = substr($testArg, strlen('--configuration='));
8585
$dir = realpath($argPath);
8686
break;
87+
} elseif (0 === strpos($testArg, '-c')) {
88+
$argPath = substr($testArg, strlen('-c'));
89+
$dir = realpath($argPath);
90+
break;
8791
}
8892
}
8993

src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ public function testCacheIsFreshAfterCacheClearedWithWarmup()
8181
}
8282
}
8383
$this->assertTrue($found, 'Kernel file should present as resource');
84+
$this->assertRegExp(sprintf('/\'kernel.name\'\s*=>\s*\'%s\'/', $this->kernel->getName()), file_get_contents($containerFile), 'kernel.name is properly set on the dumped container');
8485
}
8586
}

src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
9999
if (clazz) {
100100
var tags = document.getElementsByTagName('*');
101-
for (i = tags.length - 1; i >= 0 ; i--) {
101+
for (i = tags.length - 1; i >= 0; i--) {
102102
if (tags[i].className === clazz) {
103103
tags[i].style.display = 'none';
104104
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184

185185
{% for index, call in stack if index > 1 %}
186186
{% if index == 2 %}
187-
<ul class="sf-call-stack" id="{{ id }}" class="hidden">
187+
<ul class="sf-call-stack hidden" id="{{ id }}">
188188
{% endif %}
189189

190190
{% if call.class is defined %}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
Sfjs.removeClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
189189
} else if (state == 'error') {
190190
Sfjs.addClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
191+
Sfjs.removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
191192
} else {
192193
Sfjs.addClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
193194
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
.sf-minitoolbar img {
2121
max-height: 24px;
2222
max-width: 24px;
23+
display: inline;
2324
}
2425

2526
.sf-toolbarreset * {

0 commit comments

Comments
 (0)