Merge branch '4.4'

* 4.4:
  [VarDumper] Add missing changelog entry for VarDumperTestTrait::setUpVarDumper()
  [Mailer] Make transport factory test case public
  Typo in variable name
  use a reference date to handle times during DST
This commit is contained in:
Nicolas Grekas 2019-07-26 12:10:11 +02:00
commit 1cc7067cc1
20 changed files with 169 additions and 25 deletions

View File

@ -72,6 +72,8 @@ Filesystem
Form Form
---- ----
* Using different values for the "model_timezone" and "view_timezone" options of the `TimeType` without configuring a
reference date is deprecated.
* Using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` is deprecated. * Using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` is deprecated.
FrameworkBundle FrameworkBundle

View File

@ -152,6 +152,8 @@ Finder
Form Form
---- ----
* Removed support for using different values for the "model_timezone" and "view_timezone" options of the `TimeType`
without configuring a reference date.
* Removed support for using `int` or `float` as data for the `NumberType` when the `input` option is set to `string`. * Removed support for using `int` or `float` as data for the `NumberType` when the `input` option is set to `string`.
* Removed support for using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled. * Removed support for using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled.
* Using names for buttons that do not start with a letter, a digit, or an underscore leads to an exception. * Using names for buttons that do not start with a letter, a digit, or an underscore leads to an exception.

View File

@ -22,6 +22,8 @@ CHANGELOG
4.4.0 4.4.0
----- -----
* using different values for the "model_timezone" and "view_timezone" options of the `TimeType` without configuring a
reference date is deprecated
* preferred choices are repeated in the list of all choices * preferred choices are repeated in the list of all choices
* deprecated using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` * deprecated using `int` or `float` as data for the `NumberType` when the `input` option is set to `string`
* The type guesser guesses the HTML accept attribute when a mime type is configured in the File or Image constraint. * The type guesser guesses the HTML accept attribute when a mime type is configured in the File or Image constraint.

View File

@ -24,6 +24,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
private $pad; private $pad;
private $fields; private $fields;
private $referenceDate;
/** /**
* @param string $inputTimezone The input timezone * @param string $inputTimezone The input timezone
@ -31,7 +32,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
* @param array $fields The date fields * @param array $fields The date fields
* @param bool $pad Whether to use padding * @param bool $pad Whether to use padding
*/ */
public function __construct(string $inputTimezone = null, string $outputTimezone = null, array $fields = null, bool $pad = false) public function __construct(string $inputTimezone = null, string $outputTimezone = null, array $fields = null, bool $pad = false, \DateTimeInterface $referenceDate = null)
{ {
parent::__construct($inputTimezone, $outputTimezone); parent::__construct($inputTimezone, $outputTimezone);
@ -41,6 +42,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
$this->fields = $fields; $this->fields = $fields;
$this->pad = $pad; $this->pad = $pad;
$this->referenceDate = $referenceDate ?: new \DateTimeImmutable('1970-01-01 00:00:00');
} }
/** /**
@ -165,12 +167,12 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
try { try {
$dateTime = new \DateTime(sprintf( $dateTime = new \DateTime(sprintf(
'%s-%s-%s %s:%s:%s', '%s-%s-%s %s:%s:%s',
empty($value['year']) ? '1970' : $value['year'], empty($value['year']) ? $this->referenceDate->format('Y') : $value['year'],
empty($value['month']) ? '1' : $value['month'], empty($value['month']) ? $this->referenceDate->format('m') : $value['month'],
empty($value['day']) ? '1' : $value['day'], empty($value['day']) ? $this->referenceDate->format('d') : $value['day'],
empty($value['hour']) ? '0' : $value['hour'], empty($value['hour']) ? $this->referenceDate->format('H') : $value['hour'],
empty($value['minute']) ? '0' : $value['minute'], empty($value['minute']) ? $this->referenceDate->format('i') : $value['minute'],
empty($value['second']) ? '0' : $value['second'] empty($value['second']) ? $this->referenceDate->format('s') : $value['second']
), ),
new \DateTimeZone($this->outputTimezone) new \DateTimeZone($this->outputTimezone)
); );

View File

@ -45,6 +45,10 @@ class TimeType extends AbstractType
throw new InvalidConfigurationException('You can not disable minutes if you have enabled seconds.'); throw new InvalidConfigurationException('You can not disable minutes if you have enabled seconds.');
} }
if (null !== $options['reference_date'] && $options['reference_date']->getTimezone()->getName() !== $options['model_timezone']) {
throw new InvalidConfigurationException(sprintf('The configured "model_timezone" (%s) must match the timezone of the "reference_date" (%s).', $options['model_timezone'], $options['reference_date']->getTimezone()->getName()));
}
if ($options['with_minutes']) { if ($options['with_minutes']) {
$format .= ':i'; $format .= ':i';
$parts[] = 'minute'; $parts[] = 'minute';
@ -56,8 +60,6 @@ class TimeType extends AbstractType
} }
if ('single_text' === $options['widget']) { if ('single_text' === $options['widget']) {
$builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format));
// handle seconds ignored by user's browser when with_seconds enabled // handle seconds ignored by user's browser when with_seconds enabled
// https://codereview.chromium.org/450533009/ // https://codereview.chromium.org/450533009/
if ($options['with_seconds']) { if ($options['with_seconds']) {
@ -68,6 +70,20 @@ class TimeType extends AbstractType
} }
}); });
} }
if (null !== $options['reference_date']) {
$format = 'Y-m-d '.$format;
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) {
$data = $event->getData();
if (preg_match('/^\d{2}:\d{2}(:\d{2})?$/', $data)) {
$event->setData($options['reference_date']->format('Y-m-d ').$data);
}
});
}
$builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format));
} else { } else {
$hourOptions = $minuteOptions = $secondOptions = [ $hourOptions = $minuteOptions = $secondOptions = [
'error_bubbling' => true, 'error_bubbling' => true,
@ -157,7 +173,7 @@ class TimeType extends AbstractType
$builder->add('second', self::$widgets[$options['widget']], $secondOptions); $builder->add('second', self::$widgets[$options['widget']], $secondOptions);
} }
$builder->addViewTransformer(new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts, 'text' === $options['widget'])); $builder->addViewTransformer(new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts, 'text' === $options['widget'], $options['reference_date']));
} }
if ('datetime_immutable' === $options['input']) { if ('datetime_immutable' === $options['input']) {
@ -262,6 +278,7 @@ class TimeType extends AbstractType
'with_seconds' => false, 'with_seconds' => false,
'model_timezone' => null, 'model_timezone' => null,
'view_timezone' => null, 'view_timezone' => null,
'reference_date' => null,
'placeholder' => $placeholderDefault, 'placeholder' => $placeholderDefault,
'html5' => true, 'html5' => true,
// Don't modify \DateTime classes by reference, we treat // Don't modify \DateTime classes by reference, we treat
@ -280,6 +297,14 @@ class TimeType extends AbstractType
'choice_translation_domain' => false, 'choice_translation_domain' => false,
]); ]);
$resolver->setDeprecated('model_timezone', function (Options $options, $modelTimezone): string {
if (null !== $modelTimezone && $options['view_timezone'] !== $modelTimezone && null === $options['reference_date']) {
return sprintf('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is deprecated since Symfony 4.4.');
}
return '';
});
$resolver->setNormalizer('placeholder', $placeholderNormalizer); $resolver->setNormalizer('placeholder', $placeholderNormalizer);
$resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer);
@ -300,6 +325,7 @@ class TimeType extends AbstractType
$resolver->setAllowedTypes('minutes', 'array'); $resolver->setAllowedTypes('minutes', 'array');
$resolver->setAllowedTypes('seconds', 'array'); $resolver->setAllowedTypes('seconds', 'array');
$resolver->setAllowedTypes('input_format', 'string'); $resolver->setAllowedTypes('input_format', 'string');
$resolver->setAllowedTypes('reference_date', ['null', \DateTimeInterface::class]);
} }
/** /**

View File

@ -45,7 +45,7 @@ class DebugCommandTest extends TestCase
Built-in form types (Symfony\Component\Form\Extension\Core\Type) Built-in form types (Symfony\Component\Form\Extension\Core\Type)
---------------------------------------------------------------- ----------------------------------------------------------------
IntegerType IntegerType, TimeType
Service form types Service form types
------------------ ------------------

View File

@ -276,6 +276,57 @@ class TimeTypeTest extends BaseTypeTest
$this->assertEquals('03:04:00', $form->getViewData()); $this->assertEquals('03:04:00', $form->getViewData());
} }
public function testSubmitDifferentTimezones()
{
$form = $this->factory->create(static::TESTED_TYPE, null, [
'model_timezone' => 'UTC',
'view_timezone' => 'Europe/Berlin',
'input' => 'datetime',
'with_seconds' => true,
'reference_date' => new \DateTimeImmutable('2019-01-01', new \DateTimeZone('UTC')),
]);
$form->submit([
'hour' => '16',
'minute' => '9',
'second' => '10',
]);
$this->assertSame('15:09:10', $form->getData()->format('H:i:s'));
}
public function testSubmitDifferentTimezonesDuringDaylightSavingTime()
{
$form = $this->factory->create(static::TESTED_TYPE, null, [
'model_timezone' => 'UTC',
'view_timezone' => 'Europe/Berlin',
'input' => 'datetime',
'with_seconds' => true,
'reference_date' => new \DateTimeImmutable('2019-07-12', new \DateTimeZone('UTC')),
]);
$form->submit([
'hour' => '16',
'minute' => '9',
'second' => '10',
]);
$this->assertSame('14:09:10', $form->getData()->format('H:i:s'));
}
public function testSubmitDifferentTimezonesDuringDaylightSavingTimeUsingSingleTextWidget()
{
$form = $this->factory->create(static::TESTED_TYPE, null, [
'model_timezone' => 'UTC',
'view_timezone' => 'Europe/Berlin',
'input' => 'datetime',
'with_seconds' => true,
'reference_date' => new \DateTimeImmutable('2019-07-12', new \DateTimeZone('UTC')),
'widget' => 'single_text',
]);
$form->submit('16:09:10');
$this->assertSame('14:09:10', $form->getData()->format('H:i:s'));
}
public function testSetDataWithoutMinutes() public function testSetDataWithoutMinutes()
{ {
$form = $this->factory->create(static::TESTED_TYPE, null, [ $form = $this->factory->create(static::TESTED_TYPE, null, [
@ -311,6 +362,7 @@ class TimeTypeTest extends BaseTypeTest
'view_timezone' => 'Asia/Hong_Kong', 'view_timezone' => 'Asia/Hong_Kong',
'input' => 'string', 'input' => 'string',
'with_seconds' => true, 'with_seconds' => true,
'reference_date' => new \DateTimeImmutable('2013-01-01 00:00:00', new \DateTimeZone('America/New_York')),
]); ]);
$dateTime = new \DateTime('2013-01-01 12:04:05'); $dateTime = new \DateTime('2013-01-01 12:04:05');
@ -337,6 +389,7 @@ class TimeTypeTest extends BaseTypeTest
'view_timezone' => 'Asia/Hong_Kong', 'view_timezone' => 'Asia/Hong_Kong',
'input' => 'datetime', 'input' => 'datetime',
'with_seconds' => true, 'with_seconds' => true,
'reference_date' => new \DateTimeImmutable('now', new \DateTimeZone('America/New_York')),
]); ]);
$dateTime = new \DateTime('12:04:05'); $dateTime = new \DateTime('12:04:05');
@ -357,6 +410,39 @@ class TimeTypeTest extends BaseTypeTest
$this->assertEquals($displayedData, $form->getViewData()); $this->assertEquals($displayedData, $form->getViewData());
} }
public function testSetDataDifferentTimezonesDuringDaylightSavingTime()
{
$form = $this->factory->create(static::TESTED_TYPE, null, [
'model_timezone' => 'UTC',
'view_timezone' => 'Europe/Berlin',
'input' => 'datetime',
'with_seconds' => true,
'reference_date' => new \DateTimeImmutable('2019-07-12', new \DateTimeZone('UTC')),
]);
$form->setData(new \DateTime('2019-07-24 14:09:10', new \DateTimeZone('UTC')));
$this->assertSame(['hour' => '16', 'minute' => '9', 'second' => '10'], $form->getViewData());
}
/**
* @group legacy
* @expectedDeprecation Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is deprecated since Symfony 4.4.
*/
public function testSetDataDifferentTimezonesWithoutReferenceDate()
{
$form = $this->factory->create(static::TESTED_TYPE, null, [
'model_timezone' => 'UTC',
'view_timezone' => 'Europe/Berlin',
'input' => 'datetime',
'with_seconds' => true,
]);
$form->setData(new \DateTime('2019-07-24 14:09:10', new \DateTimeZone('UTC')));
$this->assertSame(['hour' => '16', 'minute' => '9', 'second' => '10'], $form->getViewData());
}
public function testHoursOption() public function testHoursOption()
{ {
$form = $this->factory->create(static::TESTED_TYPE, null, [ $form = $this->factory->create(static::TESTED_TYPE, null, [
@ -762,6 +848,18 @@ class TimeTypeTest extends BaseTypeTest
]); ]);
} }
/**
* @expectedException \Symfony\Component\Form\Exception\InvalidConfigurationException
*/
public function testReferenceDateTimezoneMustMatchModelTimezone()
{
$this->factory->create(static::TESTED_TYPE, null, [
'model_timezone' => 'UTC',
'view_timezone' => 'Europe/Berlin',
'reference_date' => new \DateTimeImmutable('now', new \DateTimeZone('Europe/Berlin')),
]);
}
public function testPassDefaultChoiceTranslationDomain() public function testPassDefaultChoiceTranslationDomain()
{ {
$form = $this->factory->create(static::TESTED_TYPE); $form = $this->factory->create(static::TESTED_TYPE);

View File

@ -110,13 +110,13 @@ class ValidatorTypeGuesserTest extends TestCase
public function testGuessMimeTypesForConstraintWithMimeTypesValue() public function testGuessMimeTypesForConstraintWithMimeTypesValue()
{ {
$mineTypes = ['image/png', 'image/jpeg']; $mimeTypes = ['image/png', 'image/jpeg'];
$constraint = new File(['mimeTypes' => $mineTypes]); $constraint = new File(['mimeTypes' => $mimeTypes]);
$typeGuess = $this->guesser->guessTypeForConstraint($constraint); $typeGuess = $this->guesser->guessTypeForConstraint($constraint);
$this->assertInstanceOf('Symfony\Component\Form\Guess\TypeGuess', $typeGuess); $this->assertInstanceOf('Symfony\Component\Form\Guess\TypeGuess', $typeGuess);
$this->assertArrayHasKey('attr', $typeGuess->getOptions()); $this->assertArrayHasKey('attr', $typeGuess->getOptions());
$this->assertArrayHasKey('accept', $typeGuess->getOptions()['attr']); $this->assertArrayHasKey('accept', $typeGuess->getOptions()['attr']);
$this->assertEquals(implode(',', $mineTypes), $typeGuess->getOptions()['attr']['accept']); $this->assertEquals(implode(',', $mimeTypes), $typeGuess->getOptions()['attr']['accept']);
} }
public function testGuessMimeTypesForConstraintWithoutMimeTypesValue() public function testGuessMimeTypesForConstraintWithoutMimeTypesValue()

View File

@ -15,7 +15,7 @@ use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiTransport;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpTransport; use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpTransport;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesSmtpTransport; use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesSmtpTransport;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory; use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface; use Symfony\Component\Mailer\Transport\TransportFactoryInterface;

View File

@ -4,7 +4,7 @@ namespace Symfony\Component\Mailer\Bridge\Google\Tests\Transport;
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailSmtpTransport; use Symfony\Component\Mailer\Bridge\Google\Transport\GmailSmtpTransport;
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory; use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface; use Symfony\Component\Mailer\Transport\TransportFactoryInterface;

View File

@ -15,7 +15,7 @@ use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillApiTransport;
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillHttpTransport; use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillHttpTransport;
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillSmtpTransport; use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillSmtpTransport;
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory; use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface; use Symfony\Component\Mailer\Transport\TransportFactoryInterface;

View File

@ -15,7 +15,7 @@ use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunApiTransport;
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunHttpTransport; use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunHttpTransport;
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunSmtpTransport; use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunSmtpTransport;
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory; use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface; use Symfony\Component\Mailer\Transport\TransportFactoryInterface;

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Mailer\Bridge\Postmark\Tests\Transport;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkApiTransport; use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkApiTransport;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkSmtpTransport; use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkSmtpTransport;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory; use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface; use Symfony\Component\Mailer\Transport\TransportFactoryInterface;

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Mailer\Bridge\Sendgrid\Tests\Transport;
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridApiTransport; use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridApiTransport;
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridSmtpTransport; use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridSmtpTransport;
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory; use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface; use Symfony\Component\Mailer\Transport\TransportFactoryInterface;

View File

@ -9,8 +9,9 @@ CHANGELOG
instead of `Symfony\Component\EventDispatcher\EventDispatcherInterface`. instead of `Symfony\Component\EventDispatcher\EventDispatcherInterface`.
* Added possibility to register custom transport for dsn by implementing * Added possibility to register custom transport for dsn by implementing
`Symfony\Component\Mailer\Transport\TransportFactoryInterface` and tagging with `mailer.transport_factory` tag in DI. `Symfony\Component\Mailer\Transport\TransportFactoryInterface` and tagging with `mailer.transport_factory` tag in DI.
* Added `Symfony\Component\Mailer\Test\TransportFactoryTestCase` to ease testing custom transport factories.
4.3.0 4.3.0
----- -----
* Added the component * Added the component.

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Symfony\Component\Mailer\Tests; namespace Symfony\Component\Mailer\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
@ -21,6 +21,11 @@ use Symfony\Component\Mailer\Transport\TransportInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
/**
* A test case to ease testing Transport Factory.
*
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
abstract class TransportFactoryTestCase extends TestCase abstract class TransportFactoryTestCase extends TestCase
{ {
protected const USER = 'u$er'; protected const USER = 'u$er';

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Mailer\Tests\Transport; namespace Symfony\Component\Mailer\Tests\Transport;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\NullTransport; use Symfony\Component\Mailer\Transport\NullTransport;
use Symfony\Component\Mailer\Transport\NullTransportFactory; use Symfony\Component\Mailer\Transport\NullTransportFactory;

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Mailer\Tests\Transport; namespace Symfony\Component\Mailer\Tests\Transport;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\SendmailTransport; use Symfony\Component\Mailer\Transport\SendmailTransport;
use Symfony\Component\Mailer\Transport\SendmailTransportFactory; use Symfony\Component\Mailer\Transport\SendmailTransportFactory;

View File

@ -2,7 +2,7 @@
namespace Symfony\Component\Mailer\Tests\Transport\Smtp; namespace Symfony\Component\Mailer\Tests\Transport\Smtp;
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase; use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
use Symfony\Component\Mailer\Transport\Dsn; use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport; use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory; use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory;

View File

@ -1,6 +1,12 @@
CHANGELOG CHANGELOG
========= =========
4.4.0
-----
* added `VarDumperTestTrait::setUpVarDumper()` and `VarDumperTestTrait::tearDownVarDumper()`
to configure casters & flags to use in tests
4.3.0 4.3.0
----- -----