Merge branch '4.3' into 4.4
* 4.3: Adopt `@PHPUnit55Migration:risky` rule of php-cs-fixer
This commit is contained in:
commit
83f1dca60c
@ -8,8 +8,9 @@ return PhpCsFixer\Config::create()
|
||||
->setRules([
|
||||
'@Symfony' => true,
|
||||
'@Symfony:risky' => true,
|
||||
'@PHPUnit48Migration:risky' => true,
|
||||
'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice
|
||||
'@PHPUnit75Migration:risky' => true,
|
||||
'php_unit_dedicate_assert' => ['target' => '3.5'],
|
||||
'phpdoc_no_empty_return' => false, // triggers almost always false positive
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'fopen_flags' => false,
|
||||
'ordered_imports' => true,
|
||||
|
@ -165,7 +165,7 @@ class ConsoleLoggerTest extends TestCase
|
||||
if (method_exists($this, 'createPartialMock')) {
|
||||
$dummy = $this->createPartialMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']);
|
||||
} else {
|
||||
$dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']);
|
||||
$dummy = $this->createPartialMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']);
|
||||
}
|
||||
$dummy->method('__toString')->willReturn('DUMMY');
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\Debug\Tests\Exception;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||
use Symfony\Component\Debug\Exception\FlattenException;
|
||||
use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
|
||||
@ -35,6 +36,8 @@ use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
|
||||
*/
|
||||
class FlattenExceptionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testStatusCode()
|
||||
{
|
||||
$flattened = FlattenException::create(new \RuntimeException(), 403);
|
||||
@ -297,7 +300,7 @@ class FlattenExceptionTest extends TestCase
|
||||
|
||||
// assertEquals() does not like NAN values.
|
||||
$this->assertEquals($array[$i][0], 'float');
|
||||
$this->assertTrue(is_nan($array[$i++][1]));
|
||||
$this->assertNan($array[$i++][1]);
|
||||
}
|
||||
|
||||
public function testRecursionInArguments()
|
||||
|
@ -913,7 +913,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
* with a fluid interface.
|
||||
*
|
||||
* @param string $id The service identifier
|
||||
* @param string $class|null The service class
|
||||
* @param string|null $class The service class
|
||||
*
|
||||
* @return Definition A Definition instance
|
||||
*/
|
||||
|
@ -55,15 +55,15 @@ class ContainerParametersResourceCheckerTest extends TestCase
|
||||
|
||||
public function isFreshProvider()
|
||||
{
|
||||
yield 'not fresh on missing parameter' => [function (\PHPUnit_Framework_MockObject_MockObject $container) {
|
||||
yield 'not fresh on missing parameter' => [function (\PHPUnit\Framework\MockObject\MockObject $container) {
|
||||
$container->method('hasParameter')->with('locales')->willReturn(false);
|
||||
}, false];
|
||||
|
||||
yield 'not fresh on different value' => [function (\PHPUnit_Framework_MockObject_MockObject $container) {
|
||||
yield 'not fresh on different value' => [function (\PHPUnit\Framework\MockObject\MockObject $container) {
|
||||
$container->method('getParameter')->with('locales')->willReturn(['nl', 'es']);
|
||||
}, false];
|
||||
|
||||
yield 'fresh on every identical parameters' => [function (\PHPUnit_Framework_MockObject_MockObject $container) {
|
||||
yield 'fresh on every identical parameters' => [function (\PHPUnit\Framework\MockObject\MockObject $container) {
|
||||
$container->expects($this->exactly(2))->method('hasParameter')->willReturn(true);
|
||||
$container->expects($this->exactly(2))->method('getParameter')
|
||||
->withConsecutive(
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Component\DependencyInjection\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\DependencyInjection\Alias;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
@ -29,7 +29,6 @@ use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symfony\Component\DependencyInjection\Parameter;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Component\DependencyInjection\ServiceLocator;
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
@ -1,15 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="<?= $this->charset ?>" />
|
||||
<meta charset="<?= $this->charset; ?>" />
|
||||
<meta name="robots" content="noindex,nofollow,noarchive" />
|
||||
<title>An Error Occurred: <?= $statusText ?></title>
|
||||
<style><?= $this->include('assets/css/error.css') ?></style>
|
||||
<title>An Error Occurred: <?= $statusText; ?></title>
|
||||
<style><?= $this->include('assets/css/error.css'); ?></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Oops! An Error Occurred</h1>
|
||||
<h2>The server returned a "<?= $statusCode ?> <?= $statusText ?>".</h2>
|
||||
<h2>The server returned a "<?= $statusCode; ?> <?= $statusText; ?>".</h2>
|
||||
|
||||
<p>
|
||||
Something is broken. Please let us know what you were doing when this error occurred.
|
||||
|
@ -1,25 +1,25 @@
|
||||
<div class="exception-summary <?= !$exceptionMessage ? 'exception-without-message' : '' ?>">
|
||||
<div class="exception-summary <?= !$exceptionMessage ? 'exception-without-message' : ''; ?>">
|
||||
<div class="exception-metadata">
|
||||
<div class="container">
|
||||
<h2 class="exception-hierarchy">
|
||||
<?php foreach (array_reverse($exception->getAllPrevious(), true) as $index => $previousException) { ?>
|
||||
<a href="#trace-box-<?= $index + 2 ?>"><?= $this->abbrClass($previousException->getClass()) ?></a>
|
||||
<span class="icon"><?= $this->include('assets/images/chevron-right.svg') ?></span>
|
||||
<a href="#trace-box-<?= $index + 2; ?>"><?= $this->abbrClass($previousException->getClass()); ?></a>
|
||||
<span class="icon"><?= $this->include('assets/images/chevron-right.svg'); ?></span>
|
||||
<?php } ?>
|
||||
<a href="#trace-box-1"><?= $this->abbrClass($exception->getClass()) ?></a>
|
||||
<a href="#trace-box-1"><?= $this->abbrClass($exception->getClass()); ?></a>
|
||||
</h2>
|
||||
<h2 class="exception-http">
|
||||
HTTP <?= $statusCode ?> <small><?= $statusText ?></small>
|
||||
HTTP <?= $statusCode; ?> <small><?= $statusText; ?></small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="exception-message-wrapper">
|
||||
<div class="container">
|
||||
<h1 class="break-long-words exception-message<?= mb_strlen($exceptionMessage) > 180 ? ' long' : '' ?>"><?= $this->formatFileFromText(nl2br($exceptionMessage)) ?></h1>
|
||||
<h1 class="break-long-words exception-message<?= mb_strlen($exceptionMessage) > 180 ? ' long' : ''; ?>"><?= $this->formatFileFromText(nl2br($exceptionMessage)); ?></h1>
|
||||
|
||||
<div class="exception-illustration hidden-xs-down">
|
||||
<?= $this->include('assets/images/symfony-ghost.svg.php') ?>
|
||||
<?= $this->include('assets/images/symfony-ghost.svg.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -31,8 +31,8 @@
|
||||
<?php
|
||||
$exceptionAsArray = $exception->toArray();
|
||||
$exceptionWithUserCode = [];
|
||||
$exceptionAsArrayCount = \count($exceptionAsArray);
|
||||
$last = \count($exceptionAsArray) - 1;
|
||||
$exceptionAsArrayCount = count($exceptionAsArray);
|
||||
$last = count($exceptionAsArray) - 1;
|
||||
foreach ($exceptionAsArray as $i => $e) {
|
||||
foreach ($e['trace'] as $trace) {
|
||||
if ($trace['file'] && false === mb_strpos($trace['file'], '/vendor/') && false === mb_strpos($trace['file'], '/var/cache/') && $i < $last) {
|
||||
@ -43,7 +43,7 @@
|
||||
?>
|
||||
<h3 class="tab-title">
|
||||
<?php if ($exceptionAsArrayCount > 1) { ?>
|
||||
Exceptions <span class="badge"><?= $exceptionAsArrayCount ?></span>
|
||||
Exceptions <span class="badge"><?= $exceptionAsArrayCount; ?></span>
|
||||
<?php } else { ?>
|
||||
Exception
|
||||
<?php } ?>
|
||||
@ -55,7 +55,7 @@
|
||||
echo $this->include('views/traces.html.php', [
|
||||
'exception' => $e,
|
||||
'index' => $i + 1,
|
||||
'expand' => \in_array($i, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $i),
|
||||
'expand' => in_array($i, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $i),
|
||||
]);
|
||||
}
|
||||
?>
|
||||
@ -63,15 +63,15 @@
|
||||
</div>
|
||||
|
||||
<?php if ($logger) { ?>
|
||||
<div class="tab <?= !$logger->getLogs() ? 'disabled' : '' ?>">
|
||||
<div class="tab <?= !$logger->getLogs() ? 'disabled' : ''; ?>">
|
||||
<h3 class="tab-title">
|
||||
Logs
|
||||
<?php if ($logger->countErrors()) { ?><span class="badge status-error"><?= $logger->countErrors() ?></span><?php } ?>
|
||||
<?php if ($logger->countErrors()) { ?><span class="badge status-error"><?= $logger->countErrors(); ?></span><?php } ?>
|
||||
</h3>
|
||||
|
||||
<div class="tab-content">
|
||||
<?php if ($logger->getLogs()) { ?>
|
||||
<?= $this->include('views/logs.html.php', ['logs' => $logger->getLogs()]) ?>
|
||||
<?= $this->include('views/logs.html.php', ['logs' => $logger->getLogs()]); ?>
|
||||
<?php } else { ?>
|
||||
<div class="empty">
|
||||
<p>No log messages</p>
|
||||
@ -84,7 +84,7 @@
|
||||
<div class="tab">
|
||||
<h3 class="tab-title">
|
||||
<?php if ($exceptionAsArrayCount > 1) { ?>
|
||||
Stack Traces <span class="badge"><?= $exceptionAsArrayCount ?></span>
|
||||
Stack Traces <span class="badge"><?= $exceptionAsArrayCount; ?></span>
|
||||
<?php } else { ?>
|
||||
Stack Trace
|
||||
<?php } ?>
|
||||
@ -108,7 +108,7 @@
|
||||
<h3 class="tab-title">Output content</h3>
|
||||
|
||||
<div class="tab-content">
|
||||
<?= $currentContent ?>
|
||||
<?= $currentContent; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
@ -1,41 +1,41 @@
|
||||
<!-- <?= $_message = sprintf('%s (%d %s)', $exceptionMessage, $statusCode, $statusText) ?> -->
|
||||
<!-- <?= $_message = sprintf('%s (%d %s)', $exceptionMessage, $statusCode, $statusText); ?> -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="<?= $this->charset ?>" />
|
||||
<meta charset="<?= $this->charset; ?>" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title><?= $_message ?></title>
|
||||
<link rel="icon" type="image/png" href="<?= $this->include('assets/images/favicon.png.base64') ?>">
|
||||
<style><?= $this->include('assets/css/exception.css') ?></style>
|
||||
<style><?= $this->include('assets/css/exception_full.css') ?></style>
|
||||
<title><?= $_message; ?></title>
|
||||
<link rel="icon" type="image/png" href="<?= $this->include('assets/images/favicon.png.base64'); ?>">
|
||||
<style><?= $this->include('assets/css/exception.css'); ?></style>
|
||||
<style><?= $this->include('assets/css/exception_full.css'); ?></style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="container">
|
||||
<h1 class="logo"><?= $this->include('assets/images/symfony-logo.svg') ?> Symfony Exception</h1>
|
||||
<h1 class="logo"><?= $this->include('assets/images/symfony-logo.svg'); ?> Symfony Exception</h1>
|
||||
|
||||
<div class="help-link">
|
||||
<a href="https://symfony.com/doc/<?= Symfony\Component\HttpKernel\Kernel::VERSION ?>/index.html">
|
||||
<span class="icon"><?= $this->include('assets/images/icon-book.svg') ?></span>
|
||||
<a href="https://symfony.com/doc/<?= Symfony\Component\HttpKernel\Kernel::VERSION; ?>/index.html">
|
||||
<span class="icon"><?= $this->include('assets/images/icon-book.svg'); ?></span>
|
||||
<span class="hidden-xs-down">Symfony</span> Docs
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="help-link">
|
||||
<a href="https://symfony.com/support">
|
||||
<span class="icon"><?= $this->include('assets/images/icon-support.svg') ?></span>
|
||||
<span class="icon"><?= $this->include('assets/images/icon-support.svg'); ?></span>
|
||||
<span class="hidden-xs-down">Symfony</span> Support
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<?= $this->include('views/exception.html.php', $context) ?>
|
||||
<?= $this->include('views/exception.html.php', $context); ?>
|
||||
|
||||
<script>
|
||||
<?= $this->include('assets/js/exception.js') ?>
|
||||
<?= $this->include('assets/js/exception.js'); ?>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!-- <?= $_message ?> -->
|
||||
<!-- <?= $_message; ?> -->
|
||||
|
@ -1,5 +1,5 @@
|
||||
<table class="logs" data-filter-level="Emergency,Alert,Critical,Error,Warning,Notice,Info,Debug" data-filters>
|
||||
<?php $channelIsDefined = isset($logs[0]['channel']) ?>
|
||||
<?php $channelIsDefined = isset($logs[0]['channel']); ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-filter="level">Level</th>
|
||||
@ -19,20 +19,20 @@
|
||||
$severity = $log['context']['exception']['severity'] ?? false;
|
||||
$status = E_DEPRECATED === $severity || E_USER_DEPRECATED === $severity ? 'warning' : 'normal';
|
||||
} ?>
|
||||
<tr class="status-<?= $status ?>" data-filter-level="<?= strtolower($this->escape($log['priorityName'])) ?>"<?php if ($channelIsDefined) { ?> data-filter-channel="<?= $this->escape($log['channel']) ?>"<?php } ?>
|
||||
<tr class="status-<?= $status; ?>" data-filter-level="<?= strtolower($this->escape($log['priorityName'])); ?>"<?php if ($channelIsDefined) { ?> data-filter-channel="<?= $this->escape($log['channel']); ?>"<?php } ?>
|
||||
<td class="text-small" nowrap>
|
||||
<span class="colored text-bold"><?= $this->escape($log['priorityName']) ?></span>
|
||||
<span class="text-muted newline"><?= (new \DateTime($log['timestamp']))->format('H:i:s') ?></span>
|
||||
<span class="colored text-bold"><?= $this->escape($log['priorityName']); ?></span>
|
||||
<span class="text-muted newline"><?= (new \DateTime($log['timestamp']))->format('H:i:s'); ?></span>
|
||||
</td>
|
||||
<?php if ($channelIsDefined) { ?>
|
||||
<td class="text-small text-bold nowrap">
|
||||
<?= $this->escape($log['channel']) ?>
|
||||
<?= $this->escape($log['channel']); ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<?= $this->formatLogMessage($log['message'], $log['context']) ?>
|
||||
<?= $this->formatLogMessage($log['message'], $log['context']); ?>
|
||||
<?php if ($log['context']) { ?>
|
||||
<pre class="text-muted prewrap m-t-5"><?= json_encode($log['context'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?></pre>
|
||||
<pre class="text-muted prewrap m-t-5"><?= json_encode($log['context'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?></pre>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div class="trace-line-header break-long-words <?= $trace['file'] ? 'sf-toggle' : '' ?>" data-toggle-selector="#trace-html-<?= $prefix ?>-<?= $i ?>" data-toggle-initial="<?= 'expanded' === $style ? 'display' : '' ?>">
|
||||
<div class="trace-line-header break-long-words <?= $trace['file'] ? 'sf-toggle' : ''; ?>" data-toggle-selector="#trace-html-<?= $prefix; ?>-<?= $i; ?>" data-toggle-initial="<?= 'expanded' === $style ? 'display' : ''; ?>">
|
||||
<?php if ($trace['file']) { ?>
|
||||
<span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square.svg') ?></span>
|
||||
<span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square.svg') ?></span>
|
||||
<span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square.svg'); ?></span>
|
||||
<span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square.svg'); ?></span>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ('compact' !== $style && $trace['function']) { ?>
|
||||
<span class="trace-class"><?= $this->abbrClass($trace['class']) ?></span><?php if ($trace['type']) { ?><span class="trace-type"><?= $trace['type'] ?></span><?php } ?><span class="trace-method"><?= $trace['function'] ?></span><span class="trace-arguments">(<?= $this->formatArgs($trace['args']) ?>)</span>
|
||||
<span class="trace-class"><?= $this->abbrClass($trace['class']); ?></span><?php if ($trace['type']) { ?><span class="trace-type"><?= $trace['type']; ?></span><?php } ?><span class="trace-method"><?= $trace['function']; ?></span><span class="trace-arguments">(<?= $this->formatArgs($trace['args']); ?>)</span>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($trace['file']) { ?>
|
||||
@ -17,24 +17,24 @@
|
||||
?>
|
||||
<span class="block trace-file-path">
|
||||
in
|
||||
<a href="<?= $fileLink ?>">
|
||||
<?= implode(\DIRECTORY_SEPARATOR, array_slice($filePathParts, 0, -1)).\DIRECTORY_SEPARATOR ?><strong><?= end($filePathParts) ?></strong>
|
||||
<a href="<?= $fileLink; ?>">
|
||||
<?= implode(\DIRECTORY_SEPARATOR, array_slice($filePathParts, 0, -1)).\DIRECTORY_SEPARATOR; ?><strong><?= end($filePathParts); ?></strong>
|
||||
</a>
|
||||
<?php if ('compact' === $style && $trace['function']) { ?>
|
||||
<span class="trace-type"><?= $trace['type'] ?></span>
|
||||
<span class="trace-method"><?= $trace['function'] ?></span>
|
||||
<span class="trace-type"><?= $trace['type']; ?></span>
|
||||
<span class="trace-method"><?= $trace['function']; ?></span>
|
||||
<?php } ?>
|
||||
(line <?= $lineNumber ?>)
|
||||
(line <?= $lineNumber; ?>)
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if ($trace['file']) { ?>
|
||||
<div id="trace-html-<?= $prefix.'-'.$i ?>" class="trace-code sf-toggle-content">
|
||||
<div id="trace-html-<?= $prefix.'-'.$i; ?>" class="trace-code sf-toggle-content">
|
||||
<?= strtr($this->fileExcerpt($trace['file'], $trace['line'], 5), [
|
||||
'#DD0000' => 'var(--highlight-string)',
|
||||
'#007700' => 'var(--highlight-keyword)',
|
||||
'#0000BB' => 'var(--highlight-default)',
|
||||
'#FF8000' => 'var(--highlight-comment)',
|
||||
]) ?>
|
||||
]); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<div class="trace trace-as-html" id="trace-box-<?= $index ?>">
|
||||
<div class="trace trace-as-html" id="trace-box-<?= $index; ?>">
|
||||
<div class="trace-details">
|
||||
<div class="trace-head">
|
||||
<span class="sf-toggle" data-toggle-selector="#trace-html-<?= $index ?>" data-toggle-initial="<?= $expand ? 'display' : '' ?>">
|
||||
<span class="sf-toggle" data-toggle-selector="#trace-html-<?= $index; ?>" data-toggle-initial="<?= $expand ? 'display' : ''; ?>">
|
||||
<h3 class="trace-class">
|
||||
<span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square-o.svg') ?></span>
|
||||
<span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square-o.svg') ?></span>
|
||||
<span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square-o.svg'); ?></span>
|
||||
<span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square-o.svg'); ?></span>
|
||||
|
||||
<span class="trace-namespace">
|
||||
<?= implode('\\', array_slice(explode('\\', $exception['class']), 0, -1)) ?><?= \count(explode('\\', $exception['class'])) > 1 ? '\\' : '' ?>
|
||||
<?= implode('\\', array_slice(explode('\\', $exception['class']), 0, -1)); ?><?= count(explode('\\', $exception['class'])) > 1 ? '\\' : ''; ?>
|
||||
</span>
|
||||
<?= ($parts = explode('\\', $exception['class'])) ? end($parts) : '' ?>
|
||||
<?= ($parts = explode('\\', $exception['class'])) ? end($parts) : ''; ?>
|
||||
</h3>
|
||||
|
||||
<?php if ($exception['message'] && $index > 1) { ?>
|
||||
<p class="break-long-words trace-message"><?= $this->escape($exception['message']) ?></p>
|
||||
<p class="break-long-words trace-message"><?= $this->escape($exception['message']); ?></p>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="trace-html-<?= $index ?>" class="sf-toggle-content">
|
||||
<div id="trace-html-<?= $index; ?>" class="sf-toggle-content">
|
||||
<?php
|
||||
$isFirstUserCode = true;
|
||||
foreach ($exception['trace'] as $i => $trace) {
|
||||
@ -27,13 +27,13 @@
|
||||
if ($displayCodeSnippet) {
|
||||
$isFirstUserCode = false;
|
||||
} ?>
|
||||
<div class="trace-line <?= $isVendorTrace ? 'trace-from-vendor' : '' ?>">
|
||||
<div class="trace-line <?= $isVendorTrace ? 'trace-from-vendor' : ''; ?>">
|
||||
<?= $this->include('views/trace.html.php', [
|
||||
'prefix' => $index,
|
||||
'i' => $i,
|
||||
'trace' => $trace,
|
||||
'style' => $isVendorTrace ? 'compact' : ($displayCodeSnippet ? 'expanded' : ''),
|
||||
]) ?>
|
||||
]); ?>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
|
@ -1,20 +1,20 @@
|
||||
<table class="trace trace-as-text">
|
||||
<thead class="trace-head">
|
||||
<tr>
|
||||
<th class="sf-toggle" data-toggle-selector="#trace-text-<?= $index ?>" data-toggle-initial="<?= 1 === $index ? 'display' : '' ?>">
|
||||
<th class="sf-toggle" data-toggle-selector="#trace-text-<?= $index; ?>" data-toggle-initial="<?= 1 === $index ? 'display' : ''; ?>">
|
||||
<h3 class="trace-class">
|
||||
<?php if ($numExceptions > 1) { ?>
|
||||
<span class="text-muted">[<?= $numExceptions - $index + 1 ?>/<?= $numExceptions ?>]</span>
|
||||
<span class="text-muted">[<?= $numExceptions - $index + 1; ?>/<?= $numExceptions; ?>]</span>
|
||||
<?php } ?>
|
||||
<?= ($parts = explode('\\', $exception['class'])) ? end($parts) : '' ?>
|
||||
<span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square-o.svg') ?></span>
|
||||
<span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square-o.svg') ?></span>
|
||||
<?= ($parts = explode('\\', $exception['class'])) ? end($parts) : ''; ?>
|
||||
<span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square-o.svg'); ?></span>
|
||||
<span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square-o.svg'); ?></span>
|
||||
</h3>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody id="trace-text-<?= $index ?>">
|
||||
<tbody id="trace-text-<?= $index; ?>">
|
||||
<tr>
|
||||
<td>
|
||||
<?php if ($exception['trace']) { ?>
|
||||
|
@ -509,6 +509,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider nanRepresentationProvider
|
||||
*
|
||||
* @see https://github.com/symfony/symfony/issues/3161
|
||||
*/
|
||||
public function testReverseTransformDisallowsNaN($nan)
|
||||
|
@ -28,7 +28,6 @@ class ButtonTypeTest extends BaseTypeTest
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $emptyData
|
||||
* @param null $expectedData
|
||||
*/
|
||||
|
@ -20,11 +20,7 @@ class TranslationFilesTest extends TestCase
|
||||
*/
|
||||
public function testTranslationFileIsValid($filePath)
|
||||
{
|
||||
if (class_exists('PHPUnit_Util_XML')) {
|
||||
\PHPUnit_Util_XML::loadfile($filePath, false, false, true);
|
||||
} else {
|
||||
\PHPUnit\Util\XML::loadfile($filePath, false, false, true);
|
||||
}
|
||||
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ class LoggerTest extends TestCase
|
||||
if (method_exists($this, 'createPartialMock')) {
|
||||
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
|
||||
} else {
|
||||
$dummy = $this->getMock(DummyTest::class, ['__toString']);
|
||||
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
|
||||
}
|
||||
$dummy->expects($this->atLeastOnce())
|
||||
->method('__toString')
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Lock\Tests\Store;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Lock\Exception\LockExpiredException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistingStoreInterface;
|
||||
|
@ -69,6 +69,7 @@ class PdoStoreTest extends AbstractStoreTest
|
||||
public function testInvalidTtlConstruct()
|
||||
{
|
||||
$this->expectException('Symfony\Component\Lock\Exception\InvalidTtlException');
|
||||
|
||||
return new PdoStore('sqlite:'.self::$dbFile, [], 0.1, 0.1);
|
||||
}
|
||||
}
|
||||
|
@ -20,11 +20,7 @@ class TranslationFilesTest extends TestCase
|
||||
*/
|
||||
public function testTranslationFileIsValid($filePath)
|
||||
{
|
||||
if (class_exists('PHPUnit_Util_XML')) {
|
||||
\PHPUnit_Util_XML::loadfile($filePath, false, false, true);
|
||||
} else {
|
||||
\PHPUnit\Util\XML::loadfile($filePath, false, false, true);
|
||||
}
|
||||
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Greate
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\PositiveOrZero" constraint cannot be set.');
|
||||
|
||||
return new PositiveOrZero(['propertyPath' => 'field']);
|
||||
}
|
||||
|
||||
@ -62,6 +63,7 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Greate
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\PositiveOrZero" constraint cannot be set.');
|
||||
|
||||
return new PositiveOrZero(['value' => 0]);
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ class GreaterThanValidatorWithPositiveConstraintTest extends GreaterThanValidato
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\Positive" constraint cannot be set.');
|
||||
|
||||
return new Positive(['propertyPath' => 'field']);
|
||||
}
|
||||
|
||||
@ -60,6 +61,7 @@ class GreaterThanValidatorWithPositiveConstraintTest extends GreaterThanValidato
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\Positive" constraint cannot be set.');
|
||||
|
||||
return new Positive(['value' => 0]);
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends LessThanO
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\NegativeOrZero" constraint cannot be set.');
|
||||
|
||||
return new NegativeOrZero(['propertyPath' => 'field']);
|
||||
}
|
||||
|
||||
@ -60,6 +61,7 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends LessThanO
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\NegativeOrZero" constraint cannot be set.');
|
||||
|
||||
return new NegativeOrZero(['value' => 0]);
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ class LessThanValidatorWithNegativeConstraintTest extends LessThanValidatorTest
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "propertyPath" option of the "Symfony\Component\Validator\Constraints\Negative" constraint cannot be set.');
|
||||
|
||||
return new Negative(['propertyPath' => 'field']);
|
||||
}
|
||||
|
||||
@ -60,6 +61,7 @@ class LessThanValidatorWithNegativeConstraintTest extends LessThanValidatorTest
|
||||
{
|
||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||
$this->expectExceptionMessage('The "value" option of the "Symfony\Component\Validator\Constraints\Negative" constraint cannot be set.');
|
||||
|
||||
return new Negative(['value' => 0]);
|
||||
}
|
||||
|
||||
|
@ -20,11 +20,7 @@ class TranslationFilesTest extends TestCase
|
||||
*/
|
||||
public function testTranslationFileIsValid($filePath)
|
||||
{
|
||||
if (class_exists('PHPUnit_Util_XML')) {
|
||||
\PHPUnit_Util_XML::loadfile($filePath, false, false, true);
|
||||
} else {
|
||||
\PHPUnit\Util\XML::loadfile($filePath, false, false, true);
|
||||
}
|
||||
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
|
@ -656,7 +656,6 @@ class InlineTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @dataProvider getNotPhpCompatibleMappingKeyData
|
||||
*/
|
||||
public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expected)
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Component\Yaml\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Yaml\Exception\ParseException;
|
||||
use Symfony\Component\Yaml\Parser;
|
||||
use Symfony\Component\Yaml\Tag\TaggedValue;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
@ -786,7 +785,6 @@ EOF
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* > It is an error for two equal keys to appear in the same mapping node.
|
||||
* > In such a case the YAML processor may continue, ignoring the second
|
||||
* > "key: value" pair and issuing an appropriate warning. This strategy
|
||||
|
Reference in New Issue
Block a user