Skip to content

Commit c3efdb8

Browse files
Upgrade Doctrine/orm to 3.x and DBAL to 4.x
1 parent 8fe21b9 commit c3efdb8

File tree

63 files changed

+214
-487
lines changed

Some content is hidden

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

63 files changed

+214
-487
lines changed

webapp/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"doctrine/doctrine-bundle": "^2.8",
5858
"doctrine/doctrine-fixtures-bundle": "^4.0",
5959
"doctrine/doctrine-migrations-bundle": "^3.2",
60-
"doctrine/orm": "^2.14",
60+
"doctrine/orm": "^3.0",
6161
"enshrined/svg-sanitize": "^0.22.0",
6262
"friendsofsymfony/rest-bundle": "^3.5",
6363
"ircmaxell/password-compat": "*",

webapp/composer.lock

Lines changed: 50 additions & 323 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webapp/config/packages/doctrine.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ doctrine:
1717
internal_error_status: App\Doctrine\DBAL\Types\InternalErrorStatusType
1818
judge_task_type: App\Doctrine\DBAL\Types\JudgeTaskType
1919
mapping_types:
20-
enum: string
20+
enum: enum
2121
schema_filter: ~^(?!sessions)~
2222
# IMPORTANT: You MUST configure your server version,
2323
# either here or in the DATABASE_URL env var (see .env file)
@@ -31,6 +31,7 @@ doctrine:
3131
controller_resolver:
3232
auto_mapping: false
3333
enable_lazy_ghost_objects: true
34+
enable_native_lazy_objects: true
3435
mappings:
3536
App:
3637
type: attribute

webapp/config/packages/framework.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ framework:
2424
assets:
2525
version: "v=%domjudge.version%"
2626

27+
property_info:
28+
with_constructor_extractor: true
29+
2730
when@test:
2831
framework:
2932
test: true

webapp/config/packages/twig_extensions.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ services:
88
#Twig\Extensions\ArrayExtension: ~
99
#Twig\Extensions\DateExtension: ~
1010
#Twig\Extensions\IntlExtension: ~
11-
Twig\Extensions\TextExtension: ~

webapp/config/packages/web_profiler.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ when@test:
1414
intercept_redirects: false
1515

1616
framework:
17-
profiler: { collect: false }
17+
profiler:
18+
collect: false
19+
collect_serializer_data: true

webapp/config/reference.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
* options?: array<string, mixed>,
181181
* mapping_types?: array<string, scalar|null>,
182182
* default_table_options?: array<string, scalar|null>,
183-
* schema_manager_factory?: scalar|null, // Default: "doctrine.dbal.legacy_schema_manager_factory"
183+
* schema_manager_factory?: scalar|null, // Default: "doctrine.dbal.default_schema_manager_factory"
184184
* result_cache?: scalar|null,
185185
* slaves?: array<string, array{ // Default: []
186186
* url?: scalar|null, // A URL with connection information; any parameter value parsed from this string will override explicitly set parameters
@@ -251,7 +251,7 @@
251251
* orm?: array{
252252
* default_entity_manager?: scalar|null,
253253
* auto_generate_proxy_classes?: scalar|null, // Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL", "FILE_NOT_EXISTS_OR_CHANGED", this option is ignored when the "enable_native_lazy_objects" option is true // Default: false
254-
* enable_lazy_ghost_objects?: bool, // Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation // Default: false
254+
* enable_lazy_ghost_objects?: bool, // Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation // Default: true
255255
* enable_native_lazy_objects?: bool, // Enables the new native implementation of PHP lazy objects instead of generated proxies // Default: false
256256
* proxy_dir?: scalar|null, // Configures the path where generated proxy classes are saved when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true // Default: "%kernel.build_dir%/doctrine/orm/Proxies"
257257
* proxy_namespace?: scalar|null, // Defines the root namespace for generated proxy classes when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true // Default: "Proxies"
@@ -297,7 +297,7 @@
297297
* fetch_mode_subselect_batch_size?: scalar|null,
298298
* repository_factory?: scalar|null, // Default: "doctrine.orm.container_repository_factory"
299299
* schema_ignore_classes?: list<scalar|null>,
300-
* report_fields_where_declared?: bool, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455. // Default: false
300+
* report_fields_where_declared?: bool, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455. // Default: true
301301
* validate_xml_mapping?: bool, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14. See https://github.com/doctrine/orm/pull/6728. // Default: false
302302
* second_level_cache?: array{
303303
* region_cache_driver?: string|array{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
when@dev:
22
_errors:
3-
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
3+
resource: '@FrameworkBundle/Resources/config/routing/errors.php'
44
prefix: /_error
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
when@dev:
22
web_profiler_wdt:
3-
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
3+
resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
44
prefix: /_wdt
55

66
web_profiler_profiler:
7-
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
7+
resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
88
prefix: /_profiler

webapp/migrations/Version20190803123217.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function getDescription(): string
2020
public function up(Schema $schema): void
2121
{
2222
$this->skipIf(
23-
$this->connection->getSchemaManager()->tablesExist(['contest']),
23+
$this->connection->createSchemaManager()->tablesExist(['contest']),
2424
'table contest already exists'
2525
);
2626

0 commit comments

Comments
 (0)