Skip to content

Commit 603289e

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Security][WIP] Add authenticators info to the profiler [Translation] Use symfony default locale when pulling translations from providers added missing translations for Bosnian (bs) Add the missing greek translations for security core and validator component [HttpKernel] Fix return types in `EventDataCollector` Do not call substr_count() if ip is null to avoid deprecation warning in PHP 8.1 [Security][Validator] Add missing translations for Slovenian (sl) [Messenger] Add worker metadata inside logs [Messenger] Log when worker should stop and when `SIGTERM` is received cs fix [Security][Validator] Add missing translations for Finnish (fi) [VarDumper] returns a 500 when dd() is executed chore(VarDumper): declare that dd() never returns [MonologBridge] Deprecate the Swiftmailer handler [Cache] Commit items implicitly only when deferred keys are requested [MonologBridge] Deprecates ResetLoggersWorkerSubscriber Fix "can not" spelling [HttpClient] fix missing kernel.reset tag on TraceableHttpClient services [Form] Fix ChoiceType Extension to effectively set and use the translator Added new CssColor constraint
2 parents b579d6a + 5ffc22f commit 603289e

13 files changed

+87
-14
lines changed

AbstractExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getType(string $name): FormTypeInterface
5353
}
5454

5555
if (!isset($this->types[$name])) {
56-
throw new InvalidArgumentException(sprintf('The type "%s" can not be loaded by this extension.', $name));
56+
throw new InvalidArgumentException(sprintf('The type "%s" cannot be loaded by this extension.', $name));
5757
}
5858

5959
return $this->types[$name];

Extension/Core/CoreExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function loadTypes(): array
4545
new Type\FormType($this->propertyAccessor),
4646
new Type\BirthdayType(),
4747
new Type\CheckboxType(),
48-
new Type\ChoiceType($this->choiceListFactory),
48+
new Type\ChoiceType($this->choiceListFactory, $this->translator),
4949
new Type\CollectionType(),
5050
new Type\CountryType(),
5151
new Type\DateIntervalType(),

Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function reverseTransform(mixed $value): ?\DateTime
159159
*
160160
* @param bool $ignoreTimezone Use UTC regardless of the configured timezone
161161
*
162-
* @throws TransformationFailedException in case the date formatter can not be constructed
162+
* @throws TransformationFailedException in case the date formatter cannot be constructed
163163
*/
164164
protected function getIntlDateFormatter(bool $ignoreTimezone = false): \IntlDateFormatter
165165
{

Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(?int $scale = 2, ?bool $grouping = true, ?int $round
3636
* @param int|float|null $value Normalized number
3737
*
3838
* @throws TransformationFailedException if the given value is not numeric or
39-
* if the value can not be transformed
39+
* if the value cannot be transformed
4040
*/
4141
public function transform(mixed $value): string
4242
{
@@ -56,7 +56,7 @@ public function transform(mixed $value): string
5656
* @param string $value Localized money string
5757
*
5858
* @throws TransformationFailedException if the given value is not a string
59-
* or if the value can not be transformed
59+
* or if the value cannot be transformed
6060
*/
6161
public function reverseTransform(mixed $value): int|float|null
6262
{

Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(int $scale = null, ?bool $grouping = false, ?int $ro
4444
* @param int|float|null $value Number value
4545
*
4646
* @throws TransformationFailedException if the given value is not numeric
47-
* or if the value can not be transformed
47+
* or if the value cannot be transformed
4848
*/
4949
public function transform(mixed $value): string
5050
{
@@ -75,7 +75,7 @@ public function transform(mixed $value): string
7575
* @param string $value The localized value
7676
*
7777
* @throws TransformationFailedException if the given value is not a string
78-
* or if the value can not be transformed
78+
* or if the value cannot be transformed
7979
*/
8080
public function reverseTransform(mixed $value): int|float|null
8181
{

Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function transform(mixed $value): array
4444
* Extracts the duplicated value from an array.
4545
*
4646
* @throws TransformationFailedException if the given value is not an array or
47-
* if the given array can not be transformed
47+
* if the given array cannot be transformed
4848
*/
4949
public function reverseTransform(mixed $array): mixed
5050
{

Extension/Core/DataTransformer/WeekToArrayTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function transform(mixed $value): array
5858
*
5959
* @return string|null A week date string following the format Y-\WW
6060
*
61-
* @throws TransformationFailedException If the given value can not be merged in a valid week date string,
61+
* @throws TransformationFailedException If the given value cannot be merged in a valid week date string,
6262
* or if the obtained week date does not exists
6363
*/
6464
public function reverseTransform(mixed $value): ?string

Extension/Core/Type/DateIntervalType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
5555
throw new InvalidConfigurationException('The single_text widget does not support invertible intervals.');
5656
}
5757
if ($options['with_weeks'] && $options['with_days']) {
58-
throw new InvalidConfigurationException('You can not enable weeks and days fields together.');
58+
throw new InvalidConfigurationException('You cannot enable weeks and days fields together.');
5959
}
6060
$format = 'P';
6161
$parts = [];

Extension/Core/Type/TimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4343
$format = 'H';
4444

4545
if ($options['with_seconds'] && !$options['with_minutes']) {
46-
throw new InvalidConfigurationException('You can not disable minutes if you have enabled seconds.');
46+
throw new InvalidConfigurationException('You cannot disable minutes if you have enabled seconds.');
4747
}
4848

4949
if (null !== $options['reference_date'] && $options['reference_date']->getTimezone()->getName() !== $options['model_timezone']) {

FormRegistryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface FormRegistryInterface
2323
*
2424
* This methods registers the type extensions from the form extensions.
2525
*
26-
* @throws Exception\InvalidArgumentException if the type can not be retrieved from any extension
26+
* @throws Exception\InvalidArgumentException if the type cannot be retrieved from any extension
2727
*/
2828
public function getType(string $name): ResolvedFormTypeInterface;
2929

0 commit comments

Comments
 (0)