8000 Merge branch '4.1' · symfony/symfony@944b06d · GitHub
[go: up one dir, main page]

Skip to content

Commit 944b06d

Browse files
Merge branch '4.1'
* 4.1: CS fix [Debug] fix compat with PHP 7.3
2 parents 4c1f7c5 + ed6d9b9 commit 944b06d

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
use Symfony\Component\Console\Command\Command;
54

65
class Foo6Command extends Command

src/Symfony/Component/CssSelector/XPath/Translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function getXpathLiteral(string $element): string
8484
}
8585
}
8686

87-
return sprintf('concat(%s)', implode($parts, ', '));
87+
return sprintf('concat(%s)', implode(', ', $parts));
8888
}
8989

9090
/**

src/Symfony/Component/Debug/DebugClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
341341
self::$annotatedParameters[$class][$method->name][$parameterName] = sprintf('The "%%s::%s()" method will require a new "%s$%s" argument in the next major version of its parent class "%s", not defining it is deprecated.', $method->name, $parameterType ? $parameterType.' ' : '', $parameterName, $method->class);
342342
}
343343
}
344-
}
344+
}
345345

346346
return $deprecations;
347347
}

src/Symfony/Component/Debug/Tests/phpt/decorate_exception_hander.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
Test catching fatal errors when handlers are nested
3+
--INI--
4+
display_errors=0
35
--FILE--
46
<?php
57

@@ -24,7 +26,6 @@ if (true) {
2426

2527
?>
2628
--EXPECTF--
27-
Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d
2829
object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
2930
["message":protected]=>
3031
string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".

src/Symfony/Component/Translation/Dumper/MoFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti
5757
.$this->writeLong($offset[2] + $sourcesStart + $sourcesSize);
5858
}
5959

60-
$output = implode(array_map(array($this, 'writeLong'), $header))
60+
$output = implode('', array_map(array($this, 'writeLong'), $header))
6161
.$sourceOffsets
6262
.$targetOffsets
6363
.$sources

src/Symfony/Component/Translation/IdentityTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(MessageSelector $selector = null)
3333
{
3434
$this->selector = $selector;
3535

36-
if (\get_class($this) !== __CLASS__) {
36+
if (__CLASS__ !== \get_class($this)) {
3737
@trigger_error(sprintf('Calling "%s()" is deprecated since Symfony 4.2.'), E_USER_DEPRECATED);
3838
}
3939
}

src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,10 @@ private function validateObject($object, $propertyPath, array $groups, $traversa
355355
* objects are iterated as well. Nested arrays are always iterated,
356356
* regardless of the value of $recursive.
357357
*
358-
* @param iterable $collection The collection
359-
* @param string $propertyPath The current property path
360-
* @param (string|GroupSequence)[] $groups The validated groups
361-
* @param ExecutionContextInterface $context The current execution context
358+
* @param iterable $collection The collection
359+
* @param string $propertyPath The current property path
360+
* @param (string|GroupSequence)[] $groups The validated groups
361+
* @param ExecutionContextInterface $context The current execution context
362362
*
363363
* @see ClassNode
364364
* @see CollectionNode

src/Symfony/Component/VarDumper/Caster/LinkStub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public function __construct($label, int $line = 0, $href = null)
5555
if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) {
5656
$this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1;
5757
$this->attr['ellipsis-type'] = 'path';
58-
$this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode(\array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
58+
$this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode('', \array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
5959
} elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) {
60-
$this->attr['ellipsis'] = 2 + \strlen(implode(\array_slice($ellipsis, -2)));
60+
$this->attr['ellipsis'] = 2 + \strlen(implode('', \array_slice($ellipsis, -2)));
6161
$this->attr['ellipsis-type'] = 'path';
6262
$this->attr['ellipsis-tail'] = 1;
6363
}

src/Symfony/Component/Yaml/Inline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public static function parseScalar(string $scalar, int $flags = 0, array $delimi
270270
if (null !== $delimiters) {
271271
$tmp = ltrim(substr($scalar, $i), ' ');
272272
if ('' === $tmp) {
273-
throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode($delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
273+
throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
274274
}
275275
if (!\in_array($tmp[0], $delimiters)) {
276276
throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);

0 commit comments

Comments
 (0)
0