Merge branch '4.3' into 4.4
* 4.3: [ProxyManager] fix closure binding [VarDumper] fix annotations [Console] fixed a PHP notice when there is no function
This commit is contained in:
commit
3fa8ad0859
@ -95,7 +95,7 @@ EOF;
|
||||
}
|
||||
|
||||
if (version_compare(self::getProxyManagerVersion(), '2.5', '<')) {
|
||||
$code = str_replace(' \Closure::bind(function ', ' \Closure::bind(static function ', $code);
|
||||
$code = preg_replace('/ \\\\Closure::bind\(function ((?:& )?\(\$instance(?:, \$value)?\))/', ' \Closure::bind(static function \1', $code);
|
||||
}
|
||||
|
||||
return $code;
|
||||
|
@ -123,6 +123,9 @@ class Translator extends BaseTranslator implements WarmableInterface
|
||||
parent::initializeCatalogue($locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected function doLoadCatalogue($locale): void
|
||||
{
|
||||
parent::doLoadCatalogue($locale);
|
||||
|
@ -844,11 +844,11 @@ class Application implements ResetInterface
|
||||
for ($i = 0, $count = \count($trace); $i < $count; ++$i) {
|
||||
$class = isset($trace[$i]['class']) ? $trace[$i]['class'] : '';
|
||||
$type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';
|
||||
$function = $trace[$i]['function'];
|
||||
$function = isset($trace[$i]['function']) ? $trace[$i]['function'] : '';
|
||||
$file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a';
|
||||
$line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a';
|
||||
|
||||
$output->writeln(sprintf(' %s%s%s() at <info>%s:%s</info>', $class, $type, $function, $file, $line), OutputInterface::VERBOSITY_QUIET);
|
||||
$output->writeln(sprintf(' %s%s at <info>%s:%s</info>', $class, $function ? $type.$function.'()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET);
|
||||
}
|
||||
|
||||
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
|
||||
|
@ -61,7 +61,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $recursive Whether values should be resolved recursively or not
|
||||
* @param array|bool $recursive Whether values should be resolved recursively or not
|
||||
*
|
||||
* @return string|int|float|bool|array|Data[]|null A native representation of the original value
|
||||
*/
|
||||
@ -168,7 +168,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param int $maxDepth The max dumped depth level
|
||||
*
|
||||
* @return self A clone of $this
|
||||
* @return static
|
||||
*/
|
||||
public function withMaxDepth($maxDepth)
|
||||
{
|
||||
@ -183,7 +183,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param int $maxItemsPerDepth The max number of items dumped per depth level
|
||||
*
|
||||
* @return self A clone of $this
|
||||
* @return static
|
||||
*/
|
||||
public function withMaxItemsPerDepth($maxItemsPerDepth)
|
||||
{
|
||||
@ -198,7 +198,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param bool $useRefHandles False to hide global ref. handles
|
||||
*
|
||||
* @return self A clone of $this
|
||||
* @return static
|
||||
*/
|
||||
public function withRefHandles($useRefHandles)
|
||||
{
|
||||
@ -213,7 +213,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string|int $key The key to seek to
|
||||
*
|
||||
* @return self|null A clone of $this or null if the key is not set
|
||||
* @return static|null Null if the key is not set
|
||||
*/
|
||||
public function seek($key)
|
||||
{
|
||||
|
@ -38,19 +38,19 @@ interface DumperInterface
|
||||
/**
|
||||
* Dumps while entering an hash.
|
||||
*
|
||||
* @param int $type A Cursor::HASH_* const for the type of hash
|
||||
* @param string $class The object class, resource type or array count
|
||||
* @param bool $hasChild When the dump of the hash has child item
|
||||
* @param int $type A Cursor::HASH_* const for the type of hash
|
||||
* @param string|int $class The object class, resource type or array count
|
||||
* @param bool $hasChild When the dump of the hash has child item
|
||||
*/
|
||||
public function enterHash(Cursor $cursor, $type, $class, $hasChild);
|
||||
|
||||
/**
|
||||
* Dumps while leaving an hash.
|
||||
*
|
||||
* @param int $type A Cursor::HASH_* const for the type of hash
|
||||
* @param string $class The object class, resource type or array count
|
||||
* @param bool $hasChild When the dump of the hash has child item
|
||||
* @param int $cut The number of items the hash has been cut by
|
||||
* @param int $type A Cursor::HASH_* const for the type of hash
|
||||
* @param string|int $class The object class, resource type or array count
|
||||
* @param bool $hasChild When the dump of the hash has child item
|
||||
* @param int $cut The number of items the hash has been cut by
|
||||
*/
|
||||
public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut);
|
||||
}
|
||||
|
@ -184,13 +184,13 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
|
||||
/**
|
||||
* Converts a non-UTF-8 string to UTF-8.
|
||||
*
|
||||
* @param string $s The non-UTF-8 string to convert
|
||||
* @param string|null $s The non-UTF-8 string to convert
|
||||
*
|
||||
* @return string The string converted to UTF-8
|
||||
* @return string|null The string converted to UTF-8
|
||||
*/
|
||||
protected function utf8Encode($s)
|
||||
{
|
||||
if (preg_match('//u', $s)) {
|
||||
if (null === $s || preg_match('//u', $s)) {
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user