Merge branch '4.1'
* 4.1: CS fix [Debug] fix compat with PHP 7.3
This commit is contained in:
commit
944b06d7fa
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
|
||||||
class Foo6Command extends Command
|
class Foo6Command extends Command
|
||||||
|
@ -84,7 +84,7 @@ class Translator implements TranslatorInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return sprintf('concat(%s)', implode($parts, ', '));
|
return sprintf('concat(%s)', implode(', ', $parts));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -341,7 +341,7 @@ class DebugClassLoader
|
|||||||
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);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $deprecations;
|
return $deprecations;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
--TEST--
|
--TEST--
|
||||||
Test catching fatal errors when handlers are nested
|
Test catching fatal errors when handlers are nested
|
||||||
|
--INI--
|
||||||
|
display_errors=0
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -24,7 +26,6 @@ if (true) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d
|
|
||||||
object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
|
object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
|
||||||
["message":protected]=>
|
["message":protected]=>
|
||||||
string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".
|
string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".
|
||||||
|
@ -57,7 +57,7 @@ class MoFileDumper extends FileDumper
|
|||||||
.$this->writeLong($offset[2] + $sourcesStart + $sourcesSize);
|
.$this->writeLong($offset[2] + $sourcesStart + $sourcesSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = implode(array_map(array($this, 'writeLong'), $header))
|
$output = implode('', array_map(array($this, 'writeLong'), $header))
|
||||||
.$sourceOffsets
|
.$sourceOffsets
|
||||||
.$targetOffsets
|
.$targetOffsets
|
||||||
.$sources
|
.$sources
|
||||||
|
@ -33,7 +33,7 @@ class IdentityTranslator implements TranslatorInterface
|
|||||||
{
|
{
|
||||||
$this->selector = $selector;
|
$this->selector = $selector;
|
||||||
|
|
||||||
if (\get_class($this) !== __CLASS__) {
|
if (__CLASS__ !== \get_class($this)) {
|
||||||
@trigger_error(sprintf('Calling "%s()" is deprecated since Symfony 4.2.'), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Calling "%s()" is deprecated since Symfony 4.2.'), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,10 +355,10 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
|
|||||||
* objects are iterated as well. Nested arrays are always iterated,
|
* objects are iterated as well. Nested arrays are always iterated,
|
||||||
* regardless of the value of $recursive.
|
* regardless of the value of $recursive.
|
||||||
*
|
*
|
||||||
* @param iterable $collection The collection
|
* @param iterable $collection The collection
|
||||||
* @param string $propertyPath The current property path
|
* @param string $propertyPath The current property path
|
||||||
* @param (string|GroupSequence)[] $groups The validated groups
|
* @param (string|GroupSequence)[] $groups The validated groups
|
||||||
* @param ExecutionContextInterface $context The current execution context
|
* @param ExecutionContextInterface $context The current execution context
|
||||||
*
|
*
|
||||||
* @see ClassNode
|
* @see ClassNode
|
||||||
* @see CollectionNode
|
* @see CollectionNode
|
||||||
|
@ -55,9 +55,9 @@ class LinkStub extends ConstStub
|
|||||||
if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) {
|
if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) {
|
||||||
$this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1;
|
$this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1;
|
||||||
$this->attr['ellipsis-type'] = 'path';
|
$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))) {
|
} 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-type'] = 'path';
|
||||||
$this->attr['ellipsis-tail'] = 1;
|
$this->attr['ellipsis-tail'] = 1;
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ class Inline
|
|||||||
if (null !== $delimiters) {
|
if (null !== $delimiters) {
|
||||||
$tmp = ltrim(substr($scalar, $i), ' ');
|
$tmp = ltrim(substr($scalar, $i), ' ');
|
||||||
if ('' === $tmp) {
|
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)) {
|
if (!\in_array($tmp[0], $delimiters)) {
|
||||||
throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
|
throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
|
||||||
|
Reference in New Issue
Block a user