Merge branch '3.4' into 4.1

* 3.4:
  CS fix
  [Debug] fix compat with PHP 7.3
This commit is contained in:
Nicolas Grekas 2018-10-02 18:33:59 +02:00
commit ed6d9b9d7a
8 changed files with 11 additions and 12 deletions

View File

@ -398,7 +398,6 @@ class Table
* Example:
*
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
*
*/
private function renderRow(array $row, string $cellFormat)
{

View File

@ -1,6 +1,5 @@
<?php
use Symfony\Component\Console\Command\Command;
class Foo6Command extends Command

View File

@ -84,7 +84,7 @@ class Translator implements TranslatorInterface
}
}
return sprintf('concat(%s)', implode($parts, ', '));
return sprintf('concat(%s)', implode(', ', $parts));
}
/**

View File

@ -1,5 +1,7 @@
--TEST--
Test catching fatal errors when handlers are nested
--INI--
display_errors=0
--FILE--
<?php
@ -24,7 +26,6 @@ if (true) {
?>
--EXPECTF--
Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d
object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
["message":protected]=>
string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".

View File

@ -57,7 +57,7 @@ class MoFileDumper extends FileDumper
.$this->writeLong($offset[2] + $sourcesStart + $sourcesSize);
}
$output = implode(array_map(array($this, 'writeLong'), $header))
$output = implode('', array_map(array($this, 'writeLong'), $header))
.$sourceOffsets
.$targetOffsets
.$sources

View File

@ -355,10 +355,10 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* objects are iterated as well. Nested arrays are always iterated,
* regardless of the value of $recursive.
*
* @param iterable $collection The collection
* @param string $propertyPath The current property path
* @param (string|GroupSequence)[] $groups The validated groups
* @param ExecutionContextInterface $context The current execution context
* @param iterable $collection The collection
* @param string $propertyPath The current property path
* @param (string|GroupSequence)[] $groups The validated groups
* @param ExecutionContextInterface $context The current execution context
*
* @see ClassNode
* @see CollectionNode

View File

@ -55,9 +55,9 @@ class LinkStub extends ConstStub
if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) {
$this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1;
$this->attr['ellipsis-type'] = 'path';
$this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode(\array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
$this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode('', \array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
} elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) {
$this->attr['ellipsis'] = 2 + \strlen(implode(\array_slice($ellipsis, -2)));
$this->attr['ellipsis'] = 2 + \strlen(implode('', \array_slice($ellipsis, -2)));
$this->attr['ellipsis-type'] = 'path';
$this->attr['ellipsis-tail'] = 1;
}

View File

@ -270,7 +270,7 @@ class Inline
if (null !== $delimiters) {
$tmp = ltrim(substr($scalar, $i), ' ');
if ('' === $tmp) {
throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode($delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
}
if (!\in_array($tmp[0], $delimiters)) {
throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);