Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1cc7067

Browse filesBrowse files
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
2 parents 40b7857 + 9216cb7 commit 1cc7067
Copy full SHA for 1cc7067

File tree

20 files changed

+169
-25
lines changed
Filter options

20 files changed

+169
-25
lines changed

‎UPGRADE-4.4.md

Copy file name to clipboardExpand all lines: UPGRADE-4.4.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Filesystem
7272
Form
7373
----
7474

75+
* Using different values for the "model_timezone" and "view_timezone" options of the `TimeType` without configuring a
76+
reference date is deprecated.
7577
* Using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` is deprecated.
7678

7779
FrameworkBundle

‎UPGRADE-5.0.md

Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ Finder
152152
Form
153153
----
154154

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

‎src/Symfony/Component/Form/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ CHANGELOG
2222
4.4.0
2323
-----
2424

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

‎src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php
+9-7Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
2424
private $pad;
2525

2626
private $fields;
27+
private $referenceDate;
2728

2829
/**
2930
* @param string $inputTimezone The input timezone
3031
* @param string $outputTimezone The output timezone
3132
* @param array $fields The date fields
3233
* @param bool $pad Whether to use padding
3334
*/
34-
public function __construct(string $inputTimezone = null, string $outputTimezone = null, array $fields = null, bool $pad = false)
35+
public function __construct(string $inputTimezone = null, string $outputTimezone = null, array $fields = null, bool $pad = false, \DateTimeInterface $referenceDate = null)
3536
{
3637
parent::__construct($inputTimezone, $outputTimezone);
3738

@@ -41,6 +42,7 @@ public function __construct(string $inputTimezone = null, string $outputTimezone
4142

4243
$this->fields = $fields;
4344
$this->pad = $pad;
45+
$this->referenceDate = $referenceDate ?: new \DateTimeImmutable('1970-01-01 00:00:00');
4446
}
4547

4648
/**
@@ -165,12 +167,12 @@ public function reverseTransform($value)
165167
try {
166168
$dateTime = new \DateTime(sprintf(
167169
'%s-%s-%s %s:%s:%s',
168-
empty($value['year']) ? '1970' : $value['year'],
169-
empty($value['month']) ? '1' : $value['month'],
170-
empty($value['day']) ? '1' : $value['day'],
171-
empty($value['hour']) ? '0' : $value['hour'],
172-
empty($value['minute']) ? '0' : $value['minute'],
173-
empty($value['second']) ? '0' : $value['second']
170+
empty($value['year']) ? $this->referenceDate->format('Y') : $value['year'],
171+
empty($value['month']) ? $this->referenceDate->format('m') : $value['month'],
172+
empty($value['day']) ? $this->referenceDate->format('d') : $value['day'],
173+
empty($value['hour']) ? $this->referenceDate->format('H') : $value['hour'],
174+
empty($value['minute']) ? $this->referenceDate->format('i') : $value['minute'],
175+
empty($value['second']) ? $this->referenceDate->format('s') : $value['second']
174176
),
175177
new \DateTimeZone($this->outputTimezone)
176178
);

‎src/Symfony/Component/Form/Extension/Core/Type/TimeType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/TimeType.php
+29-3Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4545
throw new InvalidConfigurationException('You can not disable minutes if you have enabled seconds.');
4646
}
4747

48+
if (null !== $options['reference_date'] && $options['reference_date']->getTimezone()->getName() !== $options['model_timezone']) {
49+
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()));
50+
}
51+
4852
if ($options['with_minutes']) {
4953
$format .= ':i';
5054
$parts[] = 'minute';
@@ -56,8 +60,6 @@ public function buildForm(FormBuilderInterface $builder, array $options)
5660
}
5761

5862
if ('single_text' === $options['widget']) {
59-
$builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format));
60-
6163
// handle seconds ignored by user's browser when with_seconds enabled
6264
// https://codereview.chromium.org/450533009/
6365
if ($options['with_seconds']) {
@@ -68,6 +70,20 @@ public function buildForm(FormBuilderInterface $builder, array $options)
6870
}
6971
});
7072
}
73+
74+
if (null !== $options['reference_date']) {
75+
$format = 'Y-m-d '.$format;
76+
77+
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) {
78+
$data = $event->getData();
79+
80+
if (preg_match('/^\d{2}:\d{2}(:\d{2})?$/', $data)) {
81+
$event->setData($options['reference_date']->format('Y-m-d ').$data);
82+
}
83+
});
84+
}
85+
86+
$builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format));
7187
} else {
7288
$hourOptions = $minuteOptions = $secondOptions = [
7389
'error_bubbling' => true,
@@ -157,7 +173,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
157173
$builder->add('second', self::$widgets[$options['widget']], $secondOptions);
158174
}
159175

160-
$builder->addViewTransformer(new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts, 'text' === $options['widget']));
176+
$builder->addViewTransformer(new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts, 'text' === $options['widget'], $options['reference_date']));
161177
}
162178

163179
if ('datetime_immutable' === $options['input']) {
@@ -262,6 +278,7 @@ public function configureOptions(OptionsResolver $resolver)
262278
'with_seconds' => false,
263279
'model_timezone' => null,
264280
'view_timezone' => null,
281+
'reference_date' => null,
265282
'placeholder' => $placeholderDefault,
266283
'html5' => true,
267284
// Don't modify \DateTime classes by reference, we treat
@@ -280,6 +297,14 @@ public function configureOptions(OptionsResolver $resolver)
280297
'choice_translation_domain' => false,
281298
]);
282299

300+
$resolver->setDeprecated('model_timezone', function (Options $options, $modelTimezone): string {
301+
if (null !== $modelTimezone && $options['view_timezone'] !== $modelTimezone && null === $options['reference_date']) {
302+
return sprintf('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is deprecated since Symfony 4.4.');
303+
}
304+
305+
return '';
306+
});
307+
283308
$resolver->setNormalizer('placeholder', $placeholderNormalizer);
284309
$resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer);
285310

@@ -300,6 +325,7 @@ public function configureOptions(OptionsResolver $resolver)
300325
$resolver->setAllowedTypes('minutes', 'array');
301326
$resolver->setAllowedTypes('seconds', 'array');
302327
$resolver->setAllowedTypes('input_format', 'string');
328+
$resolver->setAllowedTypes('reference_date', ['null', \DateTimeInterface::class]);
303329
}
304330

305331
/**

‎src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testDebugDeprecatedDefaults()
4545
Built-in form types (Symfony\Component\Form\Extension\Core\Type)
4646
----------------------------------------------------------------
4747
48-
IntegerType
48+
IntegerType, TimeType
4949
5050
Service form types
5151
------------------

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
+98Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,57 @@ public function testSubmitWithSecondsAndBrowserOmissionSeconds()
276276
$this->assertEquals('03:04:00', $form->getViewData());
277277
}
278278

279+
public function testSubmitDifferentTimezones()
280+
{
281+
$form = $this->factory->create(static::TESTED_TYPE, null, [
282+
'model_timezone' => 'UTC',
283+
'view_timezone' => 'Europe/Berlin',
284+
'input' => 'datetime',
285+
'with_seconds' => true,
286+
'reference_date' => new \DateTimeImmutable('2019-01-01', new \DateTimeZone('UTC')),
287+
]);
288+
$form->submit([
289+
'hour' => '16',
290+
'minute' => '9',
291+
'second' => '10',
292+
]);
293+
294+
$this->assertSame('15:09:10', $form->getData()->format('H:i:s'));
295+
}
296+
297+
public function testSubmitDifferentTimezonesDuringDaylightSavingTime()
298+
{
299+
$form = $this->factory->create(static::TESTED_TYPE, null, [
300+
'model_timezone' => 'UTC',
301+
'view_timezone' => 'Europe/Berlin',
302+
'input' => 'datetime',
303+
'with_seconds' => true,
304+
'reference_date' => new \DateTimeImmutable('2019-07-12', new \DateTimeZone('UTC')),
305+
]);
306+
$form->submit([
307+
'hour' => '16',
308+
'minute' => '9',
309+
'second' => '10',
310+
]);
311+
312+
$this->assertSame('14:09:10', $form->getData()->format('H:i:s'));
313+
}
314+
315+
public function testSubmitDifferentTimezonesDuringDaylightSavingTimeUsingSingleTextWidget()
316+
{
317+
$form = $this->factory->create(static::TESTED_TYPE, null, [
318+
'model_timezone' => 'UTC',
319+
'view_timezone' => 'Europe/Berlin',
320+
'input' => 'datetime',
321+
'with_seconds' => true,
322+
'reference_date' => new \DateTimeImmutable('2019-07-12', new \DateTimeZone('UTC')),
323+
'widget' => 'single_text',
324+
]);
325+
$form->submit('16:09:10');
326+
327+
$this->assertSame('14:09:10', $form->getData()->format('H:i:s'));
328+
}
329+
279330
public function testSetDataWithoutMinutes()
280331
{
281332
$form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -311,6 +362,7 @@ public function testSetDataDifferentTimezones()
311362
'view_timezone' => 'Asia/Hong_Kong',
312363
'input' => 'string',
313364
'with_seconds' => true,
365+
'reference_date' => new \DateTimeImmutable('2013-01-01 00:00:00', new \DateTimeZone('America/New_York')),
314366
]);
315367

316368
$dateTime = new \DateTime('2013-01-01 12:04:05');
@@ -337,6 +389,7 @@ public function testSetDataDifferentTimezonesDateTime()
337389
'view_timezone' => 'Asia/Hong_Kong',
338390
'input' => 'datetime',
339391
'with_seconds' => true,
392+
'reference_date' => new \DateTimeImmutable('now', new \DateTimeZone('America/New_York')),
340393
]);
341394

342395
$dateTime = new \DateTime('12:04:05');
@@ -357,6 +410,39 @@ public function testSetDataDifferentTimezonesDateTime()
357410
$this->assertEquals($displayedData, $form->getViewData());
358411
}
359412

413+
public function testSetDataDifferentTimezonesDuringDaylightSavingTime()
414+
{
415+
$form = $this->factory->create(static::TESTED_TYPE, null, [
416+
'model_timezone' => 'UTC',
417+
'view_timezone' => 'Europe/Berlin',
418+
'input' => 'datetime',
419+
'with_seconds' => true,
420+
'reference_date' => new \DateTimeImmutable('2019-07-12', new \DateTimeZone('UTC')),
421+
]);
422+
423+
$form->setData(new \DateTime('2019-07-24 14:09:10', new \DateTimeZone('UTC')));
424+
425+
$this->assertSame(['hour' => '16', 'minute' => '9', 'second' => '10'], $form->getViewData());
426+
}
427+
428+
/**
429+
* @group legacy
430+
* @expectedDeprecation Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is deprecated since Symfony 4.4.
431+
*/
432+
public function testSetDataDifferentTimezonesWithoutReferenceDate()
433+
{
434+
$form = $this->factory->create(static::TESTED_TYPE, null, [
435+
'model_timezone' => 'UTC',
436+
'view_timezone' => 'Europe/Berlin',
437+
'input' => 'datetime',
438+
'with_seconds' => true,
439+
]);
440+
441+
$form->setData(new \DateTime('2019-07-24 14:09:10', new \DateTimeZone('UTC')));
442+
443+
$this->assertSame(['hour' => '16', 'minute' => '9', 'second' => '10'], $form->getViewData());
444+
}
445+
360446
public function testHoursOption()
361447
{
362448
$form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -762,6 +848,18 @@ public function testThrowExceptionIfSecondsIsInvalid()
762848
]);
763849
}
764850

851+
/**
852+
* @expectedException \Symfony\Component\Form\Exception\InvalidConfigurationException
853+
*/
854+
public function testReferenceDateTimezoneMustMatchModelTimezone()
855+
{
856+
$this->factory->create(static::TESTED_TYPE, null, [
857+
'model_timezone' => 'UTC',
858+
'view_timezone' => 'Europe/Berlin',
859+
'reference_date' => new \DateTimeImmutable('now', new \DateTimeZone('Europe/Berlin')),
860+
]);
861+
}
862+
765863
public function testPassDefaultChoiceTranslationDomain()
766864
{
767865
$form = $this->factory->create(static::TESTED_TYPE);

‎src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ public function testGuessMaxLengthForConstraintWithMinValue()
110110

111111
public function testGuessMimeTypesForConstraintWithMimeTypesValue()
112112
{
113-
$mineTypes = ['image/png', 'image/jpeg'];
114-
$constraint = new File(['mimeTypes' => $mineTypes]);
113+
$mimeTypes = ['image/png', 'image/jpeg'];
114+
$constraint = new File(['mimeTypes' => $mimeTypes]);
115115
$typeGuess = $this->guesser->guessTypeForConstraint($constraint);
116116
$this->assertInstanceOf('Symfony\Component\Form\Guess\TypeGuess', $typeGuess);
117117
$this->assertArrayHasKey('attr', $typeGuess->getOptions());
118118
$this->assertArrayHasKey('accept', $typeGuess->getOptions()['attr']);
119-
$this->assertEquals(implode(',', $mineTypes), $typeGuess->getOptions()['attr']['accept']);
119+
$this->assertEquals(implode(',', $mimeTypes), $typeGuess->getOptions()['attr']['accept']);
120120
}
121121

122122
public function testGuessMimeTypesForConstraintWithoutMimeTypesValue()

‎src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesTransportFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesTransportFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpTransport;
1616
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesSmtpTransport;
1717
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
18-
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase;
18+
use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
1919
use Symfony\Component\Mailer\Transport\Dsn;
2020
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
2121

‎src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailSmtpTransport;
66
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory;
7-
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase;
7+
use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
88
use Symfony\Component\Mailer\Transport\Dsn;
99
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
1010

‎src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillTransportFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillTransportFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillHttpTransport;
1616
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillSmtpTransport;
1717
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
18-
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase;
18+
use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
1919
use Symfony\Component\Mailer\Transport\Dsn;
2020
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
2121

‎src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunTransportFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunTransportFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunHttpTransport;
1616
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunSmtpTransport;
1717
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
18-
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase;
18+
use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
1919
use Symfony\Component\Mailer\Transport\Dsn;
2020
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
2121

‎src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkTransportFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkTransportFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkApiTransport;
1515
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkSmtpTransport;
1616
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
17-
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase;
17+
use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
1818
use Symfony\Component\Mailer\Transport\Dsn;
1919
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
2020

‎src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridTransportFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridTransportFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridApiTransport;
1515
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridSmtpTransport;
1616
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory;
17-
use Symfony\Component\Mailer\Tests\TransportFactoryTestCase;
17+
use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
1818
use Symfony\Component\Mailer\Transport\Dsn;
1919
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
2020

‎src/Symfony/Component/Mailer/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ CHANGELOG
99
instead of `Symfony\Component\EventDispatcher\EventDispatcherInterface`.
1010
* Added possibility to register custom transport for dsn by implementing
1111
`Symfony\Component\Mailer\Transport\TransportFactoryInterface` and tagging with `mailer.transport_factory` tag in DI.
12+
* Added `Symfony\Component\Mailer\Test\TransportFactoryTestCase` to ease testing custom transport factories.
1213

1314
4.3.0
1415
-----
1516

16-
* Added the component
17+
* Added the component.

‎src/Symfony/Component/Mailer/Tests/TransportFactoryTestCase.php renamed to ‎src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Mailer\Tests;
12+
namespace Symfony\Component\Mailer\Test;
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Psr\Log\LoggerInterface;
@@ -21,6 +21,11 @@
2121
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
2222
use Symfony\Contracts\HttpClient\HttpClientInterface;
2323

24+
/**
25+
* A test case to ease testing Transport Factory.
26+
*
27+
* @author Konstantin Myakshin <molodchick@gmail.com>
28+
*/
2429
abstract class TransportFactoryTestCase extends TestCase
2530
{
2631
protected const USER = 'u$er';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.