Merge branch '4.3' into 4.4
* 4.3: [4.3] Remove unused local variables
This commit is contained in:
commit
94beae00b1
@ -62,8 +62,6 @@ class TransNode extends Node
|
|||||||
}
|
}
|
||||||
list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults, (bool) $vars);
|
list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults, (bool) $vars);
|
||||||
|
|
||||||
$method = !$this->hasNode('count') ? 'trans' : 'transChoice';
|
|
||||||
|
|
||||||
$compiler
|
$compiler
|
||||||
->write('echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans(')
|
->write('echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans(')
|
||||||
->subcompile($msg)
|
->subcompile($msg)
|
||||||
|
@ -1039,8 +1039,6 @@ class FrameworkExtension extends Extension
|
|||||||
{
|
{
|
||||||
$loader->load('assets.xml');
|
$loader->load('assets.xml');
|
||||||
|
|
||||||
$defaultVersion = null;
|
|
||||||
|
|
||||||
if ($config['version_strategy']) {
|
if ($config['version_strategy']) {
|
||||||
$defaultVersion = new Reference($config['version_strategy']);
|
$defaultVersion = new Reference($config['version_strategy']);
|
||||||
} else {
|
} else {
|
||||||
|
@ -111,11 +111,6 @@ class DelegatingLoader extends BaseDelegatingLoader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (1 === substr_count($controller, ':')) {
|
|
||||||
$nonDeprecatedNotation = str_replace(':', '::', $controller);
|
|
||||||
// TODO deprecate this in 5.1
|
|
||||||
}
|
|
||||||
|
|
||||||
$route->setDefault('_controller', $controller);
|
$route->setDefault('_controller', $controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,14 +18,14 @@ class ContainerDumpTest extends AbstractWebTestCase
|
|||||||
{
|
{
|
||||||
public function testContainerCompilationInDebug()
|
public function testContainerCompilationInDebug()
|
||||||
{
|
{
|
||||||
$client = $this->createClient(['test_case' => 'ContainerDump', 'root_config' => 'config.yml']);
|
$this->createClient(['test_case' => 'ContainerDump', 'root_config' => 'config.yml']);
|
||||||
|
|
||||||
$this->assertTrue(static::$container->has('serializer'));
|
$this->assertTrue(static::$container->has('serializer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testContainerCompilation()
|
public function testContainerCompilation()
|
||||||
{
|
{
|
||||||
$client = $this->createClient(['test_case' => 'ContainerDump', 'root_config' => 'config.yml', 'debug' => false]);
|
$this->createClient(['test_case' => 'ContainerDump', 'root_config' => 'config.yml', 'debug' => false]);
|
||||||
|
|
||||||
$this->assertTrue(static::$container->has('serializer'));
|
$this->assertTrue(static::$container->has('serializer'));
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,6 @@ class SecurityDataCollectorTest extends TestCase
|
|||||||
|
|
||||||
$eventDispatcher = $this->getMockBuilder(EventDispatcherInterface::class)->getMockForAbstractClass();
|
$eventDispatcher = $this->getMockBuilder(EventDispatcherInterface::class)->getMockForAbstractClass();
|
||||||
$decoratedVoter1 = new TraceableVoter($voter1, $eventDispatcher);
|
$decoratedVoter1 = new TraceableVoter($voter1, $eventDispatcher);
|
||||||
$decoratedVoter2 = new TraceableVoter($voter2, $eventDispatcher);
|
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
AccessDecisionManager::STRATEGY_AFFIRMATIVE,
|
AccessDecisionManager::STRATEGY_AFFIRMATIVE,
|
||||||
|
@ -87,8 +87,8 @@ abstract class AdapterTestCase extends CachePoolTest
|
|||||||
$cache = $this->createCachePool(0, __FUNCTION__);
|
$cache = $this->createCachePool(0, __FUNCTION__);
|
||||||
|
|
||||||
$v = $cache->get('k1', function () use (&$counter, $cache) {
|
$v = $cache->get('k1', function () use (&$counter, $cache) {
|
||||||
$v = $cache->get('k2', function () use (&$counter) { return ++$counter; });
|
$cache->get('k2', function () use (&$counter) { return ++$counter; });
|
||||||
$v = $cache->get('k2', function () use (&$counter) { return ++$counter; });
|
$v = $cache->get('k2', function () use (&$counter) { return ++$counter; }); // ensure the callback is called once
|
||||||
|
|
||||||
return $v;
|
return $v;
|
||||||
});
|
});
|
||||||
|
@ -39,7 +39,7 @@ class NullAdapterTest extends TestCase
|
|||||||
$adapter = $this->createCachePool();
|
$adapter = $this->createCachePool();
|
||||||
|
|
||||||
$fetched = [];
|
$fetched = [];
|
||||||
$item = $adapter->get('myKey', function ($item) use (&$fetched) { $fetched[] = $item; });
|
$adapter->get('myKey', function ($item) use (&$fetched) { $fetched[] = $item; });
|
||||||
$this->assertCount(1, $fetched);
|
$this->assertCount(1, $fetched);
|
||||||
$item = $fetched[0];
|
$item = $fetched[0];
|
||||||
$this->assertFalse($item->isHit());
|
$this->assertFalse($item->isHit());
|
||||||
|
@ -32,8 +32,6 @@ class PdoDbalAdapterTest extends AdapterTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
|
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
|
||||||
|
|
||||||
$pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function tearDownAfterClass(): void
|
public static function tearDownAfterClass(): void
|
||||||
|
@ -152,7 +152,6 @@ class ResourceCheckerConfigCache implements ConfigCacheInterface
|
|||||||
|
|
||||||
private function safelyUnserialize(string $file)
|
private function safelyUnserialize(string $file)
|
||||||
{
|
{
|
||||||
$e = null;
|
|
||||||
$meta = false;
|
$meta = false;
|
||||||
$content = file_get_contents($file);
|
$content = file_get_contents($file);
|
||||||
$signalingException = new \UnexpectedValueException();
|
$signalingException = new \UnexpectedValueException();
|
||||||
|
@ -118,8 +118,8 @@ class ConsoleSectionOutputTest extends TestCase
|
|||||||
public function testAddingMultipleSections()
|
public function testAddingMultipleSections()
|
||||||
{
|
{
|
||||||
$sections = [];
|
$sections = [];
|
||||||
$output1 = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter());
|
new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter());
|
||||||
$output2 = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter());
|
new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter());
|
||||||
|
|
||||||
$this->assertCount(2, $sections);
|
$this->assertCount(2, $sections);
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,6 @@ trait ResponseTrait
|
|||||||
|
|
||||||
if (null === $this->content) {
|
if (null === $this->content) {
|
||||||
$content = null;
|
$content = null;
|
||||||
$chunk = null;
|
|
||||||
|
|
||||||
foreach (self::stream([$this]) as $chunk) {
|
foreach (self::stream([$this]) as $chunk) {
|
||||||
if (!$chunk->isLast()) {
|
if (!$chunk->isLast()) {
|
||||||
|
@ -27,7 +27,7 @@ class NativeFileSessionHandlerTest extends TestCase
|
|||||||
{
|
{
|
||||||
public function testConstruct()
|
public function testConstruct()
|
||||||
{
|
{
|
||||||
$storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler(sys_get_temp_dir()));
|
new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler(sys_get_temp_dir()));
|
||||||
|
|
||||||
$this->assertEquals('user', ini_get('session.save_handler'));
|
$this->assertEquals('user', ini_get('session.save_handler'));
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
|
|||||||
public function testNotTaggedControllerServiceReceivesLocatorArgument()
|
public function testNotTaggedControllerServiceReceivesLocatorArgument()
|
||||||
{
|
{
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$resolver = $container->register('argument_resolver.not_tagged_controller')->addArgument([]);
|
$container->register('argument_resolver.not_tagged_controller')->addArgument([]);
|
||||||
|
|
||||||
$pass = new RegisterControllerArgumentLocatorsPass();
|
$pass = new RegisterControllerArgumentLocatorsPass();
|
||||||
$pass->process($container);
|
$pass->process($container);
|
||||||
|
@ -42,13 +42,13 @@ class EnvelopeTest extends TestCase
|
|||||||
public function testConstructorWithNoRecipients()
|
public function testConstructorWithNoRecipients()
|
||||||
{
|
{
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$e = new Envelope(new Address('fabien@symfony.com'), []);
|
new Envelope(new Address('fabien@symfony.com'), []);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConstructorWithWrongRecipients()
|
public function testConstructorWithWrongRecipients()
|
||||||
{
|
{
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$e = new Envelope(new Address('fabien@symfony.com'), ['lucas@symfony.com']);
|
new Envelope(new Address('fabien@symfony.com'), ['lucas@symfony.com']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSenderFromHeaders()
|
public function testSenderFromHeaders()
|
||||||
|
@ -131,7 +131,6 @@ class Connection
|
|||||||
$messageId = '0'; // will receive consumers pending messages
|
$messageId = '0'; // will receive consumers pending messages
|
||||||
}
|
}
|
||||||
|
|
||||||
$e = null;
|
|
||||||
try {
|
try {
|
||||||
$messages = $this->connection->xreadgroup(
|
$messages = $this->connection->xreadgroup(
|
||||||
$this->group,
|
$this->group,
|
||||||
|
@ -50,7 +50,6 @@ class PhpSerializer implements SerializerInterface
|
|||||||
|
|
||||||
private function safelyUnserialize(string $contents)
|
private function safelyUnserialize(string $contents)
|
||||||
{
|
{
|
||||||
$e = null;
|
|
||||||
$signalingException = new MessageDecodingFailedException(sprintf('Could not decode message using PHP serialization: %s.', $contents));
|
$signalingException = new MessageDecodingFailedException(sprintf('Could not decode message using PHP serialization: %s.', $contents));
|
||||||
$prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback');
|
$prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback');
|
||||||
$prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) {
|
$prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) {
|
||||||
|
@ -114,7 +114,6 @@ final class CharacterStream
|
|||||||
if ($this->currentPos >= $this->charCount) {
|
if ($this->currentPos >= $this->charCount) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$ret = null;
|
|
||||||
$length = ($this->currentPos + $length > $this->charCount) ? $this->charCount - $this->currentPos : $length;
|
$length = ($this->currentPos + $length > $this->charCount) ? $this->charCount - $this->currentPos : $length;
|
||||||
if ($this->fixedWidth > 0) {
|
if ($this->fixedWidth > 0) {
|
||||||
$len = $length * $this->fixedWidth;
|
$len = $length * $this->fixedWidth;
|
||||||
|
@ -319,7 +319,6 @@ class EmailTest extends TestCase
|
|||||||
$e->text('text content');
|
$e->text('text content');
|
||||||
$e->attach($file);
|
$e->attach($file);
|
||||||
$e->attach($image, 'test.gif');
|
$e->attach($image, 'test.gif');
|
||||||
$fullhtml = new TextPart($content, 'utf-8', 'html');
|
|
||||||
$body = $e->getBody();
|
$body = $e->getBody();
|
||||||
$this->assertInstanceOf(MixedPart::class, $body);
|
$this->assertInstanceOf(MixedPart::class, $body);
|
||||||
$this->assertCount(2, $related = $body->getParts());
|
$this->assertCount(2, $related = $body->getParts());
|
||||||
@ -376,7 +375,7 @@ class EmailTest extends TestCase
|
|||||||
$e->from('fabien@symfony.com');
|
$e->from('fabien@symfony.com');
|
||||||
$e->text($r);
|
$e->text($r);
|
||||||
$e->html($r);
|
$e->html($r);
|
||||||
$contents = file_get_contents($name = __DIR__.'/Fixtures/mimetypes/test', 'r');
|
$name = __DIR__.'/Fixtures/mimetypes/test';
|
||||||
$file = fopen($name, 'r');
|
$file = fopen($name, 'r');
|
||||||
$e->attach($file, 'test');
|
$e->attach($file, 'test');
|
||||||
$expected = clone $e;
|
$expected = clone $e;
|
||||||
|
@ -173,8 +173,6 @@ class HeadersTest extends TestCase
|
|||||||
|
|
||||||
public function testRemoveRemovesAllHeadersWithName()
|
public function testRemoveRemovesAllHeadersWithName()
|
||||||
{
|
{
|
||||||
$header0 = new UnstructuredHeader('X-Test', 'some@id');
|
|
||||||
$header1 = new UnstructuredHeader('X-Test', 'other@id');
|
|
||||||
$headers = new Headers();
|
$headers = new Headers();
|
||||||
$headers->addIdHeader('X-Test', 'some@id');
|
$headers->addIdHeader('X-Test', 'some@id');
|
||||||
$headers->addIdHeader('X-Test', 'other@id');
|
$headers->addIdHeader('X-Test', 'other@id');
|
||||||
@ -185,7 +183,6 @@ class HeadersTest extends TestCase
|
|||||||
|
|
||||||
public function testHasIsNotCaseSensitive()
|
public function testHasIsNotCaseSensitive()
|
||||||
{
|
{
|
||||||
$header = new IdentificationHeader('Message-ID', 'some@id');
|
|
||||||
$headers = new Headers();
|
$headers = new Headers();
|
||||||
$headers->addIdHeader('Message-ID', 'some@id');
|
$headers->addIdHeader('Message-ID', 'some@id');
|
||||||
$this->assertTrue($headers->has('message-id'));
|
$this->assertTrue($headers->has('message-id'));
|
||||||
@ -209,7 +206,6 @@ class HeadersTest extends TestCase
|
|||||||
|
|
||||||
public function testRemoveIsNotCaseSensitive()
|
public function testRemoveIsNotCaseSensitive()
|
||||||
{
|
{
|
||||||
$header = new IdentificationHeader('Message-ID', 'some@id');
|
|
||||||
$headers = new Headers();
|
$headers = new Headers();
|
||||||
$headers->addIdHeader('Message-ID', 'some@id');
|
$headers->addIdHeader('Message-ID', 'some@id');
|
||||||
$headers->remove('message-id');
|
$headers->remove('message-id');
|
||||||
|
@ -103,7 +103,7 @@ class IdentificationHeaderTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->expectException('Exception');
|
$this->expectException('Exception');
|
||||||
$this->expectExceptionMessage('Email "a b c@d" does not comply with addr-spec of RFC 2822.');
|
$this->expectExceptionMessage('Email "a b c@d" does not comply with addr-spec of RFC 2822.');
|
||||||
$header = new IdentificationHeader('References', 'a b c@d');
|
new IdentificationHeader('References', 'a b c@d');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIdRightCanBeDotAtom()
|
public function testIdRightCanBeDotAtom()
|
||||||
@ -139,7 +139,7 @@ class IdentificationHeaderTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->expectException('Exception');
|
$this->expectException('Exception');
|
||||||
$this->expectExceptionMessage('Email "a@b c d" does not comply with addr-spec of RFC 2822.');
|
$this->expectExceptionMessage('Email "a@b c d" does not comply with addr-spec of RFC 2822.');
|
||||||
$header = new IdentificationHeader('References', 'a@b c d');
|
new IdentificationHeader('References', 'a@b c d');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMissingAtSignThrowsException()
|
public function testMissingAtSignThrowsException()
|
||||||
@ -149,7 +149,7 @@ class IdentificationHeaderTest extends TestCase
|
|||||||
/* -- RFC 2822, 3.6.4.
|
/* -- RFC 2822, 3.6.4.
|
||||||
msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
|
msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
|
||||||
*/
|
*/
|
||||||
$header = new IdentificationHeader('References', 'abc');
|
new IdentificationHeader('References', 'abc');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetBody()
|
public function testSetBody()
|
||||||
|
@ -26,7 +26,7 @@ class PathHeaderTest extends TestCase
|
|||||||
public function testAddressMustComplyWithRfc2822()
|
public function testAddressMustComplyWithRfc2822()
|
||||||
{
|
{
|
||||||
$this->expectException('Exception');
|
$this->expectException('Exception');
|
||||||
$header = new PathHeader('Return-Path', new Address('chr is@swiftmailer.org'));
|
new PathHeader('Return-Path', new Address('chr is@swiftmailer.org'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValueIsAngleAddrWithValidAddress()
|
public function testValueIsAngleAddrWithValidAddress()
|
||||||
|
@ -121,7 +121,7 @@ EOF;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF;
|
EOF;
|
||||||
$compiledRoutes[4] = $forDump ? $checkConditionCode .= ",\n" : eval('return '.$checkConditionCode.';');
|
$compiledRoutes[4] = $forDump ? $checkConditionCode.",\n" : eval('return '.$checkConditionCode.';');
|
||||||
} else {
|
} else {
|
||||||
$compiledRoutes[4] = $forDump ? " null, // \$checkCondition\n" : null;
|
$compiledRoutes[4] = $forDump ? " null, // \$checkCondition\n" : null;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ class RouteTest extends TestCase
|
|||||||
public function testTryingToSetLocalesDirectly()
|
public function testTryingToSetLocalesDirectly()
|
||||||
{
|
{
|
||||||
$this->expectException('BadMethodCallException');
|
$this->expectException('BadMethodCallException');
|
||||||
$route = new Route(['locales' => ['nl' => 'bar']]);
|
new Route(['locales' => ['nl' => 'bar']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -194,7 +194,7 @@ class CompiledUrlGeneratorDumperTest extends TestCase
|
|||||||
file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump());
|
file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump());
|
||||||
|
|
||||||
$projectUrlGenerator = new CompiledUrlGenerator(require $this->testTmpFilepath, new RequestContext());
|
$projectUrlGenerator = new CompiledUrlGenerator(require $this->testTmpFilepath, new RequestContext());
|
||||||
$url = $projectUrlGenerator->generate('NonExisting', []);
|
$projectUrlGenerator->generate('NonExisting', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDumpForRouteWithDefaults()
|
public function testDumpForRouteWithDefaults()
|
||||||
|
@ -14,7 +14,6 @@ namespace Symfony\Component\Security\Http\Tests;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
||||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||||
use Symfony\Component\Security\Http\Firewall;
|
use Symfony\Component\Security\Http\Firewall;
|
||||||
@ -52,8 +51,6 @@ class FirewallTest extends TestCase
|
|||||||
|
|
||||||
public function testOnKernelRequestStopsWhenThereIsAResponse()
|
public function testOnKernelRequestStopsWhenThereIsAResponse()
|
||||||
{
|
{
|
||||||
$response = new Response();
|
|
||||||
|
|
||||||
$called = [];
|
$called = [];
|
||||||
|
|
||||||
$first = function () use (&$called) {
|
$first = function () use (&$called) {
|
||||||
|
@ -550,7 +550,6 @@ abstract class AbstractNormalizer implements NormalizerInterface, DenormalizerIn
|
|||||||
{
|
{
|
||||||
if (\func_num_args() < 3) {
|
if (\func_num_args() < 3) {
|
||||||
@trigger_error(sprintf('Method "%s::%s()" will have a third "?string $format" argument in version 5.0; not defining it is deprecated since Symfony 4.3.', \get_class($this), __FUNCTION__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Method "%s::%s()" will have a third "?string $format" argument in version 5.0; not defining it is deprecated since Symfony 4.3.', \get_class($this), __FUNCTION__), E_USER_DEPRECATED);
|
||||||
$format = null;
|
|
||||||
}
|
}
|
||||||
if (isset($parentContext[self::ATTRIBUTES][$attribute])) {
|
if (isset($parentContext[self::ATTRIBUTES][$attribute])) {
|
||||||
$parentContext[self::ATTRIBUTES] = $parentContext[self::ATTRIBUTES][$attribute];
|
$parentContext[self::ATTRIBUTES] = $parentContext[self::ATTRIBUTES][$attribute];
|
||||||
|
@ -14,7 +14,6 @@ namespace Symfony\Component\Validator\Tests;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Symfony\Component\Validator\ConstraintViolation;
|
use Symfony\Component\Validator\ConstraintViolation;
|
||||||
use Symfony\Component\Validator\Tests\Fixtures\CustomArrayObject;
|
use Symfony\Component\Validator\Tests\Fixtures\CustomArrayObject;
|
||||||
use Symfony\Component\Validator\Tests\Fixtures\ToString;
|
|
||||||
|
|
||||||
class ConstraintViolationTest extends TestCase
|
class ConstraintViolationTest extends TestCase
|
||||||
{
|
{
|
||||||
@ -134,7 +133,7 @@ EOF;
|
|||||||
public function testMessageCannotBeArray()
|
public function testMessageCannotBeArray()
|
||||||
{
|
{
|
||||||
$this->expectException(\TypeError::class);
|
$this->expectException(\TypeError::class);
|
||||||
$violation = new ConstraintViolation(
|
new ConstraintViolation(
|
||||||
['cannot be an array'],
|
['cannot be an array'],
|
||||||
'',
|
'',
|
||||||
[],
|
[],
|
||||||
@ -147,7 +146,7 @@ EOF;
|
|||||||
public function testMessageObjectMustBeStringable()
|
public function testMessageObjectMustBeStringable()
|
||||||
{
|
{
|
||||||
$this->expectException(\TypeError::class);
|
$this->expectException(\TypeError::class);
|
||||||
$violation = new ConstraintViolation(
|
new ConstraintViolation(
|
||||||
new CustomArrayObject(),
|
new CustomArrayObject(),
|
||||||
'',
|
'',
|
||||||
[],
|
[],
|
||||||
|
@ -85,7 +85,6 @@ class Parser
|
|||||||
$this->refs = [];
|
$this->refs = [];
|
||||||
|
|
||||||
$mbEncoding = null;
|
$mbEncoding = null;
|
||||||
$data = null;
|
|
||||||
|
|
||||||
if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
|
if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
|
||||||
$mbEncoding = mb_internal_encoding();
|
$mbEncoding = mb_internal_encoding();
|
||||||
|
Reference in New Issue
Block a user