Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc68d1a7

Browse files
Remove legacy code paths that rely on feature checks
1 parenta53380e commitc68d1a7

File tree

102 files changed

+263
-1279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+263
-1279
lines changed

‎composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ext-xml":"*",
4040
"doctrine/event-manager":"^2",
4141
"doctrine/persistence":"^3.1|^4",
42-
"twig/twig":"^3.12",
42+
"twig/twig":"^3.21",
4343
"psr/cache":"^2.0|^3.0",
4444
"psr/clock":"^1.0",
4545
"psr/container":"^1.1|^2.0",
@@ -133,8 +133,8 @@
133133
"cache/integration-tests":"dev-master",
134134
"doctrine/collections":"^1.8|^2.0",
135135
"doctrine/data-fixtures":"^1.1",
136-
"doctrine/dbal":"^3.6|^4",
137-
"doctrine/orm":"^2.15|^3",
136+
"doctrine/dbal":"^4.3",
137+
"doctrine/orm":"^3.4",
138138
"dragonmantank/cron-expression":"^3.1",
139139
"egulias/email-validator":"^2.1.10|^3.1|^4",
140140
"guzzlehttp/promises":"^1.4|^2.0",
@@ -171,8 +171,8 @@
171171
"amphp/amp":"<3",
172172
"async-aws/core":"<1.5",
173173
"doctrine/collections":"<1.8",
174-
"doctrine/dbal":"<3.6",
175-
"doctrine/orm":"<2.15",
174+
"doctrine/dbal":"<4.3",
175+
"doctrine/orm":"<3.4",
176176
"egulias/email-validator":"~3.0.0",
177177
"masterminds/html5":"<2.6",
178178
"phpdocumentor/reflection-docblock":"<5.2",

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public function guessType(string $class, string $property): ?TypeGuess
6161
}
6262

6363
returnmatch ($metadata->getTypeOfField($property)) {
64-
'array',// DBAL < 4
6564
Types::SIMPLE_ARRAY =>newTypeGuess(CollectionType::class, [], Guess::MEDIUM_CONFIDENCE),
6665
Types::BOOLEAN =>newTypeGuess(CheckboxType::class, [], Guess::HIGH_CONFIDENCE),
6766
Types::DATETIME_MUTABLE,

‎src/Symfony/Bridge/Doctrine/IdGenerator/UlidGenerator.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespaceSymfony\Bridge\Doctrine\IdGenerator;
1313

14-
useDoctrine\ORM\EntityManager;
1514
useDoctrine\ORM\EntityManagerInterface;
1615
useDoctrine\ORM\Id\AbstractIdGenerator;
1716
useSymfony\Component\Uid\Factory\UlidFactory;
@@ -24,14 +23,6 @@ public function __construct(
2423
) {
2524
}
2625

27-
/**
28-
* doctrine/orm < 2.11 BC layer.
29-
*/
30-
publicfunctiongenerate(EntityManager$em,$entity):Ulid
31-
{
32-
return$this->generateId($em,$entity);
33-
}
34-
3526
publicfunctiongenerateId(EntityManagerInterface$em,$entity):Ulid
3627
{
3728
if ($this->factory) {

‎src/Symfony/Bridge/Doctrine/IdGenerator/UuidGenerator.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespaceSymfony\Bridge\Doctrine\IdGenerator;
1313

14-
useDoctrine\ORM\EntityManager;
1514
useDoctrine\ORM\EntityManagerInterface;
1615
useDoctrine\ORM\Id\AbstractIdGenerator;
1716
useSymfony\Component\Uid\Factory\NameBasedUuidFactory;
@@ -31,14 +30,6 @@ public function __construct(?UuidFactory $factory = null)
3130
$this->protoFactory =$this->factory =$factory ??newUuidFactory();
3231
}
3332

34-
/**
35-
* doctrine/orm < 2.11 BC layer.
36-
*/
37-
publicfunctiongenerate(EntityManager$em,$entity):Uuid
38-
{
39-
return$this->generateId($em,$entity);
40-
}
41-
4233
publicfunctiongenerateId(EntityManagerInterface$em,$entity):Uuid
4334
{
4435
if (null !==$this->entityGetter) {

‎src/Symfony/Bridge/Doctrine/Middleware/Debug/DBAL3/Connection.php

Lines changed: 0 additions & 133 deletions
This file was deleted.

‎src/Symfony/Bridge/Doctrine/Middleware/Debug/DBAL3/Statement.php

Lines changed: 0 additions & 76 deletions
This file was deleted.

‎src/Symfony/Bridge/Doctrine/Middleware/Debug/Driver.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ public function connect(array $params): ConnectionInterface
3636
{
3737
$connection =parent::connect($params);
3838

39-
if ('void' !== (string) (new \ReflectionMethod(ConnectionInterface::class,'commit'))->getReturnType()) {
40-
returnnewDBAL3\Connection(
41-
$connection,
42-
$this->debugDataHolder,
43-
$this->stopwatch,
44-
$this->connectionName
45-
);
46-
}
47-
4839
returnnewConnection(
4940
$connection,
5041
$this->debugDataHolder,

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespaceSymfony\Bridge\Doctrine\PropertyInfo;
1313

1414
useDoctrine\Common\Collections\Collection;
15-
useDoctrine\DBAL\Types\BigIntType;
1615
useDoctrine\DBAL\Types\Types;
1716
useDoctrine\ORM\EntityManagerInterface;
1817
useDoctrine\ORM\Mapping\AssociationMapping;
@@ -130,8 +129,7 @@ public function getType(string $class, string $property, array $context = []): ?
130129

131130
$nullable =$metadatainstanceof ClassMetadata &&$metadata->isNullable($property);
132131

133-
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
134-
if (Types::BIGINT ===$typeOfField && !method_exists(BigIntType::class,'getName')) {
132+
if (Types::BIGINT ===$typeOfField) {
135133
return$nullable ? Type::nullable(Type::union(Type::int(), Type::string())) : Type::union(Type::int(), Type::string());
136134
}
137135

@@ -231,7 +229,6 @@ private function getTypeIdentifier(string $doctrineType): ?TypeIdentifier
231229
Types::BOOLEAN => TypeIdentifier::BOOL,
232230
Types::BLOB,
233231
Types::BINARY => TypeIdentifier::RESOURCE,
234-
'object',// DBAL < 4
235232
Types::DATE_MUTABLE,
236233
Types::DATETIME_MUTABLE,
237234
Types::DATETIMETZ_MUTABLE,
@@ -242,8 +239,6 @@ private function getTypeIdentifier(string $doctrineType): ?TypeIdentifier
242239
Types::DATETIMETZ_IMMUTABLE,
243240
Types::TIME_IMMUTABLE,
244241
Types::DATEINTERVAL => TypeIdentifier::OBJECT,
245-
'array',// DBAL < 4
246-
'json_array',// DBAL < 3
247242
Types::SIMPLE_ARRAY => TypeIdentifier::ARRAY,
248243
default =>null,
249244
};

‎src/Symfony/Bridge/Doctrine/SchemaListener/AbstractSchemaListener.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,14 @@ abstract public function postGenerateSchema(GenerateSchemaEventArgs $event): voi
2727
protectedfunctiongetIsSameDatabaseChecker(Connection$connection):\Closure
2828
{
2929
returnstaticfunction (\Closure$exec)use ($connection):bool {
30-
$schemaManager =method_exists($connection,'createSchemaManager') ?$connection->createSchemaManager() :$connection->getSchemaManager();
30+
$schemaManager =$connection->createSchemaManager();
3131
$checkTable ='schema_subscriber_check_'.bin2hex(random_bytes(7));
3232
$table =newTable($checkTable);
3333
$table->addColumn('id', Types::INTEGER)
3434
->setAutoincrement(true)
3535
->setNotnull(true);
3636

37-
if (class_exists(PrimaryKeyConstraint::class)) {
38-
$table->addPrimaryKeyConstraint(newPrimaryKeyConstraint(null, [newUnqualifiedName(Identifier::unquoted('id'))],true));
39-
}else {
40-
$table->setPrimaryKey(['id']);
41-
}
37+
$table->addPrimaryKeyConstraint(newPrimaryKeyConstraint(null, [newUnqualifiedName(Identifier::unquoted('id'))],true));
4238

4339
$schemaManager->createTable($table);
4440

‎src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ private function addTableToSchema(Schema $schema): void
198198
$table->addColumn('class', Types::STRING, ['length' =>100]);
199199
$table->addColumn('username', Types::STRING, ['length' =>200]);
200200

201-
if (class_exists(PrimaryKeyConstraint::class)) {
202-
$table->addPrimaryKeyConstraint(newPrimaryKeyConstraint(null, [newUnqualifiedName(Identifier::unquoted('series'))],true));
203-
}else {
204-
$table->setPrimaryKey(['series']);
205-
}
201+
$table->addPrimaryKeyConstraint(newPrimaryKeyConstraint(null, [newUnqualifiedName(Identifier::unquoted('series'))],true));
206202
}
207203
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp