8000 Merge branch '2.8' into 3.4 · symfony/symfony@771c22b · GitHub
[go: up one dir, main page]

Skip to content

Commit 771c22b

Browse files
Merge branch '2.8' into 3.4
* 2.8: Add color support for Hyper terminal . [HttpFoundation] Fix tests: new message for status 425 [Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
2 parents 1aae233 + 7f3aae0 commit 771c22b

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private function addTaggedSubscribers(ContainerBuilder $container)
6868
$connections = isset($tag['connection']) ? array($tag['connection']) : array_keys($this->connections);
6969
foreach ($connections as $con) {
7070
if (!isset($this->connections[$con])) {
71-
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s', $con, $taggedSubscriber, implode(', ', array_keys($this->connections))));
71+
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s', $con, $id, implode(', ', array_keys($this->connections))));
7272
}
7373

7474
$this->getEventManagerDef($container, $con)->addMethodCall('addEventSubscriber', array(new Reference($id)));

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ private static function hasColorSupport()
316316
&& sapi_windows_vt100_support(STDOUT))
317317
|| false !== getenv('ANSICON')
318318
|| 'ON' === getenv('ConEmuANSI')
319-
|| 'xterm' === getenv('TERM');
319+
|| 'xterm' === getenv('TERM')
320+
|| 'Hyper' === getenv('TERM_PROGRAM');
320321
}
321322

322323
if (function_exists('stream_isatty')) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ protected function hasColorSupport()
9898
&& @sapi_windows_vt100_support($this->stream))
9999
|| false !== getenv('ANSICON')
100100
|| 'ON' === getenv('ConEmuANSI')
101-
|| 'xterm' === getenv('TERM');
101+
|| 'xterm' === getenv('TERM')
102+
|| 'Hyper' === getenv('TERM_PROGRAM');
102103
}
103104

104105
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) {
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/HttpFoundation/Response.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ class Response
6464
const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918
6565
const HTTP_LOCKED = 423; // RFC4918
6666
const HTTP_FAILED_DEPENDENCY = 424; // RFC4918
67+
68+
/**
69+
* @deprecated
70+
*/
6771
const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817
72+
const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04
6873
const HTTP_UPGRADE_REQUIRED = 426; // RFC2817
6974
const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585
7075
const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585
@@ -169,7 +174,7 @@ class Response
169174
422 => 'Unprocessable Entity', // RFC4918
170175
423 => 'Locked', // RFC4918
171176
424 => 'Failed Dependency', // RFC4918
172-
425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817
177+
425 => 'Too Early', // RFC-ietf-httpbis-replay-04
173178
426 => 'Upgrade Required', // RFC2817
174179
428 => 'Precondition Required', // RFC6585
175180
429 => 'Too Many Requests', // RFC6585

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,8 @@ private function hasColorSupport($stream)
546546
&& @sapi_windows_vt100_support($stream))
547547
|| false !== getenv('ANSICON')
548548
|| 'ON' === getenv('ConEmuANSI')
549-
|| 'xterm' === getenv('TERM');
549+
|| 'xterm' === getenv('TERM')
550+
|| 'Hyper' === getenv('TERM_PROGRAM');
550551
}
551552

552553
if (function_exists('stream_isatty')) {
@@ -575,7 +576,8 @@ private function isWindowsTrueColor()
575576
{
576577
$result = 183 <= getenv('ANSICON_VER')
577578
|| 'ON' === getenv('ConEmuANSI')
578-
|| 'xterm' === getenv('TERM');
579+
|| 'xterm' === getenv('TERM')
580+
|| 'Hyper' === getenv('TERM_PROGRAM');
579581

580582
if (!$result && PHP_VERSION_ID >= 70200) {
581583
$version = sprintf(

0 commit comments

Comments
 (0)
0