Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

Commit 9a7b97f

Browse files
committed
Migration to Symfony 6.4 LTS
1 parent 611b53a commit 9a7b97f

File tree

8 files changed

+1101
-1095
lines changed

8 files changed

+1101
-1095
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"doctrine/orm": "2.*",
1616
"knplabs/knp-paginator-bundle": "*",
1717
"symfony/asset": "*",
18+
"symfony/clock": "*",
1819
"symfony/console": "*",
1920
"symfony/dotenv": "*",
2021
"symfony/expression-language": "*",
@@ -98,7 +99,7 @@
9899
"extra": {
99100
"symfony": {
100101
"allow-contrib": false,
101-
"require": "6.3.*"
102+
"require": "6.4.*"
102103
}
103104
},
104105
"authors": [

composer.lock

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

config/packages/doctrine.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
1-
parameters:
2-
# Adds a fallback DATABASE_URL if the env var is not set.
3-
# This allows you to run cache:warmup even if your
4-
# environment variables are not available yet.
5-
# You should not need to change this value.
6-
env(DATABASE_URL): ''
7-
env(DATABASE_URL_SECOND): ''
8-
91
doctrine:
102
dbal:
113
default_connection: main
124
connections:
135
main:
146
url: '%env(resolve:DATABASE_URL)%'
7+
profiling_collect_backtrace: '%kernel.debug%'
158
default_table_options:
169
charset: utf8
1710
collate: utf8_unicode_ci
1811
second:
1912
url: '%env(resolve:DATABASE_URL_SECOND)%'
13+
profiling_collect_backtrace: '%kernel.debug%'
2014
default_table_options:
2115
charset: utf8
2216
collate: utf8_unicode_ci
2317

2418
orm:
2519
auto_generate_proxy_classes: true
2620
default_entity_manager: main
21+
enable_lazy_ghost_objects: true
2722
entity_managers:
2823
main:
2924
connection: main
3025
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
26+
report_fields_where_declared: true
27+
validate_xml_mapping: true
3128
mappings:
3229
App:
3330
is_bundle: false
@@ -38,6 +35,8 @@ doctrine:
3835
second:
3936
connection: second
4037
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
38+
report_fields_where_declared: true
39+
validate_xml_mapping: true
4140
mappings:
4241
Second:
4342
is_bundle: false
@@ -50,6 +49,7 @@ when@prod:
5049
doctrine:
5150
orm:
5251
auto_generate_proxy_classes: false
52+
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
5353
query_cache_driver:
5454
type: pool
5555
pool: doctrine.system_cache_pool

config/packages/framework.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
framework:
33
secret: '%env(APP_SECRET)%'
44
#csrf_protection: true
5+
annotations: false
56
http_method_override: false
67
handle_all_throwables: true
78

@@ -11,7 +12,6 @@ framework:
1112
handler_id: null
1213
cookie_secure: auto
1314
cookie_samesite: lax
14-
storage_factory_id: session.storage.factory.native
1515

1616
#esi: true
1717
#fragments: true

config/packages/monolog.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,6 @@ when@prod:
2222
process_psr_3_messages: false
2323
channels: [ "!event", "!doctrine", "!console", "!deprecation" ]
2424

25-
when@staging: # Showroom DEV
26-
monolog:
27-
handlers:
28-
main:
29-
type: fingers_crossed
30-
action_level: error
31-
handler: nested
32-
excluded_http_codes: [405]
33-
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
34-
nested:
35-
type: rotating_file
36-
path: "%kernel.logs_dir%/%kernel.environment%.log"
37-
level: debug
38-
max_files: 30
39-
channels: [ "!deprecation" ]
40-
deprecation:
41-
type: rotating_file
42-
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
43-
max_files: 2
44-
channels: [ "deprecation" ]
45-
console:
46-
type: console
47-
process_psr_3_messages: false
48-
channels: [ "!event", "!doctrine", "!console", "!deprecation" ]
49-
5025
when@dev:
5126
monolog:
5227
handlers:

config/packages/security.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
security:
22
password_hashers:
3-
# Our user class and the algorithm we'll use to encode passwords
4-
# 'auto' means to let Symfony choose the best possible password hasher (Argon2 or Bcrypt)
5-
# https://symfony.com/doc/current/security.html#c-encoding-passwords
63
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
74
providers:
85
database_users:

config/packages/web_profiler.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ when@dev:
44
intercept_redirects: false
55

66
framework:
7-
profiler: { only_exceptions: false }
7+
profiler:
8+
only_exceptions: false
9+
collect_serializer_data: true
810

911
when@test:
1012
web_profiler:
1113
toolbar: false
1214
intercept_redirects: false
1315

1416
framework:
15-
profiler: { collect: false }
17+
profiler: { collect: false }

src/Entity/Trait/LastUpdateTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ trait LastUpdateTrait
1010
{
1111
#[ORM\Column(type: Types::DATETIME_MUTABLE, options: ['default' => 'CURRENT_TIMESTAMP'])]
1212
#[Groups('Details')]
13-
private \DateTimeInterface $lastUpdate;
13+
private \DateTime $lastUpdate;
1414

15-
public function getLastUpdate(): \DateTimeInterface
15+
public function getLastUpdate(): \DateTime
1616
{
1717
return $this->lastUpdate;
1818
}
1919

20-
public function setLastUpdate(\DateTimeInterface $lastUpdate): self
20+
public function setLastUpdate(\DateTime $lastUpdate): self
2121
{
2222
$this->lastUpdate = $lastUpdate;
2323

@@ -27,6 +27,6 @@ public function setLastUpdate(\DateTimeInterface $lastUpdate): self
2727
#[ORM\PrePersist, ORM\PreUpdate]
2828
public function persistLastUpdate(): void
2929
{
30-
$this->lastUpdate = new \DateTime;
30+
$this->lastUpdate = new \DateTime();
3131
}
3232
}

0 commit comments

Comments
 (0)