10000 Merge branch '3.4' into 4.4 · symfony/symfony@c9cdac1 · GitHub
[go: up one dir, main page]

Skip to content

Commit c9cdac1

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Fix CS [Validator] Add Polish translation for ISIN constraint
2 parents 3cdf5c4 + ba042b1 commit c9cdac1

File tree

14 files changed

+36
-12
lines changed

14 files changed

+36
-12
lines changed

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ public function guessType($class, $property)
6565
case self::$useDeprecatedConstants ? Type::BOOLEAN : Types::BOOLEAN:
6666
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', [], Guess::HIGH_CONFIDENCE);
6767
case self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE:
68+
// no break
6869
case self::$useDeprecatedConstants ? Type::DATETIMETZ : Types::DATETIMETZ_MUTABLE:
70+
// no break
6971
case 'vardatetime':
7072
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateTimeType', [], Guess::HIGH_CONFIDENCE);
7173
case 'datetime_immutable':
@@ -86,7 +88,9 @@ public function guessType($class, $property)
8688
case self::$useDeprecatedConstants ? Type::FLOAT : Types::FLOAT:
8789
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::MEDIUM_CONFIDENCE);
8890
case self::$useDeprecatedConstants ? Type::INTEGER : Types::INTEGER:
91+
// no break
8992
case self::$useDeprecatedConstants ? Type::BIGINT : Types::BIGINT:
93+
// no break
9094
case self::$useDeprecatedConstants ? Type::SMALLINT : Types::SMALLINT:
9195
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\IntegerType', [], Guess::MEDIUM_CONFIDENCE);
9296
case self::$useDeprecatedConstants ? Type::STRING : Types::STRING:

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ public function getTypes($class, $property, array $context = [])
154154
case Type::BUILTIN_TYPE_OBJECT:
155155
switch ($typeOfField) {
156156
case self::$useDeprecatedConstants ? DBALType::DATE : Types::DATE_MUTABLE:
157+
// no break
157158
case self::$useDeprecatedConstants ? DBALType::DATETIME : Types::DATETIME_MUTABLE:
159+
// no break
158160
case self::$useDeprecatedConstants ? DBALType::DATETIMETZ : Types::DATETIMETZ_MUTABLE:
161+
// no break
159162
case 'vardatetime':
160163
case self::$useDeprecatedConstants ? DBALType::TIME : Types::TIME_MUTABLE:
161164
return [new Type(Type::BUILTIN_TYPE_OBJECT, $nullable, 'DateTime')];
@@ -174,6 +177,7 @@ public function getTypes($class, $property, array $context = [])
174177
case Type::BUILTIN_TYPE_ARRAY:
175178
switch ($typeOfField) {
176179
case self::$useDeprecatedConstants ? DBALType::TARRAY : Types::ARRAY:
180+
// no break
177181
case 'json_array':
178182
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)];
179183

@@ -253,32 +257,43 @@ private function getPhpType(string $doctrineType): ?string
253257
{
254258
switch ($doctrineType) {
255259
case self::$useDeprecatedConstants ? DBALType::SMALLINT : Types::SMALLINT:
260+
// no break
256261
case self::$useDeprecatedConstants ? DBALType::INTEGER : Types::INTEGER:
257262
return Type::BUILTIN_TYPE_INT;
258263

259264
case self::$useDeprecatedConstants ? DBALType::FLOAT : Types::FLOAT:
260265
return Type::BUILTIN_TYPE_FLOAT;
261266

262267
case self::$useDeprecatedConstants ? DBALType::BIGINT : Types::BIGINT:
268+
// no break
263269
case self::$useDeprecatedConstants ? DBALType::STRING : Types::STRING:
270+
// no break
264271
case self::$useDeprecatedConstants ? DBALType::TEXT : Types::TEXT:
272+
// no break
265273
case self::$useDeprecatedConstants ? DBALType::GUID : Types::GUID:
274+
// no break
266275
case self::$useDeprecatedConstants ? DBALType::DECIMAL : Types::DECIMAL:
267276
return Type::BUILTIN_TYPE_STRING;
268277

269278
case self::$useDeprecatedConstants ? DBALType::BOOLEAN : Types::BOOLEAN:
270279
return Type::BUILTIN_TYPE_BOOL;
271280

272281
case self::$useDeprecatedConstants ? DBALType::BLOB : Types::BLOB:
282+
// no break
273283
case 'binary':
274284
return Type::BUILTIN_TYPE_RESOURCE;
275285

276286
case self::$useDeprecatedConstants ? DBALType::OBJECT : Types::OBJECT:
287+
// no break
277288
case self::$useDeprecatedConstants ? DBALType::DATE : Types::DATE_MUTABLE:
289+
// no break
278290
case self::$useDeprecatedConstants ? DBALType::DATETIME : Types::DATETIME_MUTABLE:
291+
// no break
279292
case self::$useDeprecatedConstants ? DBALType::DATETIMETZ : Types::DATETIMETZ_MUTABLE:
293+
// no break
280294
case 'vardatetime':
281295
case self::$useDeprecatedConstants ? DBALType::TIME : Types::TIME_MUTABLE:
296+
// no break
282297
case 'date_immutable':
283298
case 'datetime_immutable':
284299
case 'datetimetz_immutable':
@@ -287,7 +302,9 @@ private function getPhpType(string $doctrineType): ?string
287302
return Type::BUILTIN_TYPE_OBJECT;
288303

289304
case self::$useDeprecatedConstants ? DBALType::TARRAY : Types::ARRAY:
305+
// no break
290306
case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY:
307+
// no break
291308
case 'json_array':
292309
return Type::BUILTIN_TYPE_ARRAY;
293310
}

src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8181
['<info>PHP</>'],
8282
new TableSeparator(),
8383
['Version', PHP_VERSION],
84-
['Architecture', (PHP_INT_SIZE * 8).' bits'],
84+
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
8585
['Intl locale', class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'],
8686
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTime())->format(\DateTime::W3C).'</>)'],
8787
['OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],

src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function reverseTransform($value)
168168
if (false !== strpos($value, $decSep)) {
169169
$type = \NumberFormatter::TYPE_DOUBLE;
170170
} else {
171-
$type = PHP_INT_SIZE === 8
171+
$type = \PHP_INT_SIZE === 8
172172
? \NumberFormatter::TYPE_INT64
173173
: \NumberFormatter::TYPE_INT32;
174174
}

src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ public function testDayErrorsBubbleUp($widget)
928928

929929
public function testYearsFor32BitsMachines()
930930
{
931-
if (4 !== PHP_INT_SIZE) {
931+
if (4 !== \PHP_INT_SIZE) {
932932
$this->markTestSkipped('PHP 32 bit is required.');
933933
}
934934

src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function collect(Request $request, Response $response/*, \Throwable $exce
6868
'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a',
6969
'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a',
7070
'php_version' => PHP_VERSION,
71-
'php_architecture' => PHP_INT_SIZE * 8,
71+
'php_architecture' => \PHP_INT_SIZE * 8,
7272
'php_intl_locale' => class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
7373
'php_timezone' => date_default_timezone_get(),
7474
'xdebug_enabled' => \extension_loaded('xdebug'),

src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testCollect()
3232
$this->assertSame('config', $c->getName());
3333
$this->assertMatchesRegularExpression('~^'.preg_quote($c->getPhpVersion(), '~').'~', PHP_VERSION);
3434
$this->assertMatchesRegularExpression('~'.preg_quote((string) $c->getPhpVersionExtra(), '~').'$~', PHP_VERSION);
35-
$this->assertSame(PHP_INT_SIZE * 8, $c->getPhpArchitecture());
35+
$this->assertSame(\PHP_INT_SIZE * 8, $c->getPhpArchitecture());
3636
$this->assertSame(class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', $c->getPhpIntlLocale());
3737
$this->assertSame(date_default_timezone_get(), $c->getPhpTimezone());
3838
$this->assertSame(Kernel::VERSION, $c->getSymfonyVersion());

src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ private function getInt64Value($value)
826826
return false;
827827
}
828828

829-
if (PHP_INT_SIZE !== 8 && ($value > self::$int32Max || $value < -self::$int32Max - 1)) {
829+
if (\PHP_INT_SIZE !== 8 && ($value > self::$int32Max || $value < -self::$int32Max - 1)) {
830830
return (float) $value;
831831
}
832832

src/Symfony/Component/Intl/Resources/bin/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function get_icu_version_from_genrb($genrb)
7474
throw new \ErrorException($msg, 0, $type, $file, $line);
7575
});
7676

77-
set_exception_handler(function (\Throwable $exception) {
77+
set_exception_handler(function (Throwable $exception) {
7878
echo "\n";
7979

8080
$cause = $exception;

src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function parseQuarterProvider()
168168

169169
public function testParseThreeDigitsYears()
170170
{
171-
if (PHP_INT_SIZE < 8) {
171+
if (\PHP_INT_SIZE < 8) {
172172
$this->markTestSkipped('Parsing three digits years requires a 64bit PHP.');
173173
}
174174

src/Symfony/Component/Intl/Util/IntlTestHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static function requireFullIntl(TestCase $testCase, $minimumIcuVersion =
8686
*/
8787
public static function require32Bit(TestCase $testCase)
8888
{
89-
if (4 !== PHP_INT_SIZE) {
89+
if (4 !== \PHP_INT_SIZE) {
9090
$testCase->markTestSkipped('PHP 32 bit is required.');
9191
}
9292
}
@@ -96,7 +96,7 @@ public static function require32Bit(TestCase $testCase)
9696
*/
9797
public static function require64Bit(TestCase $testCase)
9898
{
99-
if (8 !== PHP_INT_SIZE) {
99+
if (8 !== \PHP_INT_SIZE) {
100100
$testCase->markTestSkipped('PHP 64 bit is required.');
101101
}
102102
}

src/Symfony/Component/Lock/Store/CombinedStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
*/
3030
class CombinedStore implements StoreInterface, LoggerAwareInterface
3131
{
32-
use LoggerAwareTrait;
3332
use ExpiringStoreTrait;
33+
use LoggerAwareTrait;
3434

3535
/** @var PersistingStoreInterface[] */
3636
private $stores;

src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>
383383
<target>Każdy element w tym zbiorze powinien spełniać własny zestaw reguł.</target>
384384
</trans-unit>
385+
<trans-unit id="99">
386+
<source>This value is not a valid International Securities Identification Number (ISIN).</source>
387+
<target>Ta wartość nie jest prawidłowym Międzynarodowym Numerem Identyfikacyjnym Papierów Wartościowych (ISIN).</target>
388+
</trans-unit>
385389
</body>
386390
</file>
387391
</xliff>

src/Symfony/Component/VarDumper/Cloner/VarCloner.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ protected function doClone($var)
114114
case \is_int($v):
115115
case \is_float($v):
116116
continue 2;
117-
118117
case \is_string($v):
119118
if ('' === $v) {
120119
continue 2;

0 commit comments

Comments
 (0)
0