Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 601cc08

Browse files
Merge branch '2.8' into 3.4
* 2.8: [DomCrawler] Fix ChoiceFormField::select() PHPDoc [HttpFoundation] add tests for FlashBagInterface::setAll() Check for Hyper terminal on all operating systems. Prevent toolbar links color override by css
2 parents 19ab889 + eb64e32 commit 601cc08

File tree

7 files changed

+32
-10
lines changed

7 files changed

+32
-10
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,16 @@ private static function hasColorSupport()
311311
return false;
312312
}
313313

314+
if ('Hyper' === getenv('TERM_PROGRAM')) {
315+
return true;
316+
}
317+
314318
if (DIRECTORY_SEPARATOR === '\\') {
315319
return (function_exists('sapi_windows_vt100_support')
316320
&& sapi_windows_vt100_support(STDOUT))
317321
|| false !== getenv('ANSICON')
318322
|| 'ON' === getenv('ConEmuANSI')
319-
|| 'xterm' === getenv('TERM')
320-
|| 'Hyper' === getenv('TERM_PROGRAM');
323+
|| 'xterm' === getenv('TERM');
321324
}
322325

323326
if (function_exists('stream_isatty')) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@
160160
margin-bottom: 0;
161161
}
162162

163-
.sf-toolbar-block .sf-toolbar-info-piece a {
163+
div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece a {
164164
color: #99CDD8;
165165
text-decoration: underline;
166166
}
167-
.sf-toolbar-block .sf-toolbar-info-piece a:hover {
167+
div.sf-toolbar .sf-toolbar-block a:hover {
168168
text-decoration: none;
169169
}
170170

src/Symfony/Component/Console/Output/StreamOutput.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,16 @@ protected function doWrite($message, $newline)
9393
*/
9494
protected function hasColorSupport()
9595
{
96+
if ('Hyper' === getenv('TERM_PROGRAM')) {
97+
return true;
98+
}
99+
96100
if (DIRECTORY_SEPARATOR === '\\') {
97101
return (function_exists('sapi_windows_vt100_support')
98102
&& @sapi_windows_vt100_support($this->stream))
99103
|| false !== getenv('ANSICON')
100104
|| 'ON' === getenv('ConEmuANSI')
101-
|| 'xterm' === getenv('TERM')
102-
|| 'Hyper' === getenv('TERM_PROGRAM');
105+
|| 'xterm' === getenv('TERM');
103106
}
104107

105108
if (function_exists('stream_isatty')) {

src/Symfony/Component/Console/Style/SymfonyStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public function createProgressBar($max = 0)
269269
{
270270
$progressBar = parent::createProgressBar($max);
271271

272-
if ('\\' !== DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
272+
if ('\\' !== DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
273273
$progressBar->setEmptyBarCharacter(''); // light shade character \u2591
274274
$progressBar->setProgressCharacter('');
275275
$progressBar->setBarCharacter(''); // dark shade character \u2593

src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function isDisabled()
7575
/**
7676
* Sets the value of the field.
7777
*
78-
* @param string $value The value of the field
78+
* @param string|array $value The value of the field
7979
*/
8080
public function select($value)
8181
{

src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,19 @@ public function testKeys()
124124
$this->assertEquals(array('notice'), $this->bag->keys());
125125
}
126126

127+
public function testSetAll()
128+
{
129+
$this->bag->add('one_flash', 'Foo');
130+
$this->bag->add('another_flash', 'Bar');
131+
$this->assertTrue($this->bag->has('one_flash'));
132+
$this->assertTrue($this->bag->has('another_flash'));
133+
$this->bag->setAll(array('unique_flash' => 'FooBar'));
134+
$this->assertFalse($this->bag->has('one_flash'));
135+
$this->assertFalse($this->bag->has('another_flash'));
136+
$this->assertSame(array('unique_flash' => 'FooBar'), $this->bag->all());
137+
$this->assertSame(array(), $this->bag->all());
138+
}
139+
127140
public function testPeekAll()
128141
{
129142
$this->bag->set('notice', 'Foo');

src/Symfony/Component/VarDumper/Dumper/CliDumper.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,13 +541,16 @@ private function hasColorSupport($stream)
541541
return false;
542542
}
543543

544+
if ('Hyper' === getenv('TERM_PROGRAM')) {
545+
return true;
546+
}
547+
544548
if (DIRECTORY_SEPARATOR === '\\') {
545549
return (function_exists('sapi_windows_vt100_support')
546550
&& @sapi_windows_vt100_support($stream))
547551
|| false !== getenv('ANSICON')
548552
|| 'ON' === getenv('ConEmuANSI')
549-
|| 'xterm' === getenv('TERM')
550-
|| 'Hyper' === getenv('TERM_PROGRAM');
553+
|| 'xterm' === getenv('TERM');
551554
}
552555

553556
if (function_exists('stream_isatty')) {

0 commit comments

Comments
 (0)