Skip to content

Commit 9db5606

Browse files
committed
minor #1260 [Site] Fix Symfony 6.4/7.0 deprecations (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Site] Fix Symfony 6.4/7.0 deprecations Fix doctrine & framework deprecations Commits ------- a71748b [Site] Fix Symfony 6.4/7.0 deprecations
2 parents 4f47ed0 + a71748b commit 9db5606

File tree

9 files changed

+66
-48
lines changed

9 files changed

+66
-48
lines changed

ux.symfony.com/assets/translator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { localeFallbacks } from '@app/translations/configuration';
2+
import { trans, getLocale, setLocale, setLocaleFallbacks } from '@symfony/ux-translator';
13
/*
24
* This file is part of the Symfony UX Translator package.
35
*
@@ -7,10 +9,8 @@
79
* If you use TypeScript, you can rename this file to "translator.ts" to take advantage of types checking.
810
*/
911

10-
import { trans, getLocale, setLocale, setLocaleFallbacks } from '@symfony/ux-translator';
11-
import { localeFallbacks } from '@app/translations/configuration';
12-
1312
setLocaleFallbacks(localeFallbacks);
1413

15-
export { trans, setLocale };
16-
export * from '@app/translations';
14+
export { trans };
15+
16+
export * from '@app/translations';

ux.symfony.com/config/packages/doctrine.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ doctrine:
55
# IMPORTANT: You MUST configure your server version,
66
# either here or in the DATABASE_URL env var (see .env file)
77
#server_version: '14'
8+
9+
profiling_collect_backtrace: '%kernel.debug%'
810
orm:
911
auto_generate_proxy_classes: true
12+
enable_lazy_ghost_objects: true
13+
report_fields_where_declared: true
14+
validate_xml_mapping: true
1015
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
1116
auto_mapping: true
1217
mappings:
1318
App:
19+
type: attribute
1420
is_bundle: false
1521
dir: '%kernel.project_dir%/src/Entity'
1622
prefix: 'App\Entity'
@@ -26,6 +32,7 @@ when@prod:
2632
doctrine:
2733
orm:
2834
auto_generate_proxy_classes: false
35+
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
2936
query_cache_driver:
3037
type: pool
3138
pool: doctrine.system_cache_pool

ux.symfony.com/config/packages/framework.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
framework:
33
secret: '%env(APP_SECRET)%'
44
#csrf_protection: true
5+
annotations: false
56
http_method_override: false
7+
handle_all_throwables: true
68

79
# Enables session support. Note that the session will ONLY be started if you read or write from it.
810
# Remove or comment this section to explicitly disable session support.

ux.symfony.com/config/packages/notifier.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
framework:
22
notifier:
33
chatter_transports:
4+
# mercure: '%env(MERCURE_DSN)%'
45
# MERCURE_DSN is defined in .env or should be set by you
56
custom_mercure_chatter_transport: '%env(MERCURE_DSN)%'
67
# slack: '%env(SLACK_DSN)%'

ux.symfony.com/config/packages/translation.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ framework:
1212
# dsn: '%env(LOCO_DSN)%'
1313
# lokalise:
1414
# dsn: '%env(LOKALISE_DSN)%'
15+
# phrase:
16+
# dsn: '%env(PHRASE_DSN)%'

ux.symfony.com/config/packages/web_profiler.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ 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:

ux.symfony.com/config/routes.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
controllers:
2-
resource: ../src/Controller/
2+
resource:
3+
path: ../src/Controller/
4+
namespace: App\Controller
35
type: attribute
4-
5-
kernel:
6-
resource: ../src/Kernel.php
7-
type: annotation

ux.symfony.com/symfony.lock

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"version": "v1.0.0"
2525
},
2626
"doctrine/doctrine-bundle": {
27-
"version": "2.7",
27+
"version": "2.10",
2828
"recipe": {
2929
"repo": "github.com/symfony/recipes",
3030
"branch": "main",
31-
"version": "2.4",
32-
"ref": "d562b46dd8075ab2de3d58bf7895cf6b8365cb72"
31+
"version": "2.10",
32+
"ref": "0db4b12b5df45f5122213b4ecd18733ab7fa7d53"
3333
},
3434
"files": [
3535
"config/packages/doctrine.yaml",
@@ -144,12 +144,12 @@
144144
"version": "5.0.3"
145145
},
146146
"phpunit/phpunit": {
147-
"version": "9.5",
147+
"version": "9.6",
148148
"recipe": {
149149
"repo": "github.com/symfony/recipes",
150150
"branch": "main",
151-
"version": "9.3",
152-
"ref": "a6249a6c4392e9169b87abf93225f7f9f59025e6"
151+
"version": "9.6",
152+
"ref": "7364a21d87e658eb363c5020c072ecfdc12e2326"
153153
},
154154
"files": [
155155
".env.test",
@@ -335,12 +335,12 @@
335335
"version": "v6.0.7"
336336
},
337337
"symfony/framework-bundle": {
338-
"version": "6.0",
338+
"version": "6.4",
339339
"recipe": {
340340
"repo": "github.com/symfony/recipes",
341-
"branch": "master",
342-
"version": "5.4",
343-
"ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb"
341+
"branch": "main",
342+
"version": "6.4",
343+
"ref": "a91c965766ad3ff2ae15981801643330eb42b6a5"
344344
},
345345
"files": [
346346
"config/packages/cache.yaml",
@@ -383,19 +383,19 @@
383383
"repo": "github.com/symfony/recipes",
384384
"branch": "main",
385385
"version": "0.3",
386-
"ref": "7c7e63c36530052a174f28a6be4e451c4709be83"
386+
"ref": "851667ac03fd113c5bd2215fb743974f6709bc62"
387387
},
388388
"files": [
389389
"config/packages/mercure.yaml"
390390
]
391391
},
392392
"symfony/mercure-notifier": {
393-
"version": "6.0",
393+
"version": "6.4",
394394
"recipe": {
395395
"repo": "github.com/symfony/recipes",
396396
"branch": "main",
397397
"version": "5.3",
398-
"ref": "ae4620ee823a67e41f65aabec525fa52c79a8b09"
398+
"ref": "98a27687305d236709390ff01d7a6a9818735b97"
399399
}
400400
},
401401
"symfony/monolog-bridge": {
@@ -414,12 +414,12 @@
414414
]
415415
},
416416
"symfony/notifier": {
417-
"version": "6.0",
417+
"version": "6.4",
418418
"recipe": {
419419
"repo": "github.com/symfony/recipes",
420420
"branch": "main",
421421
"version": "5.0",
422-
"ref": "c31585e252b32fe0e1f30b1f256af553f4a06eb9"
422+
"ref": "178877daf79d2dbd62129dd03612cb1a2cb407cc"
423423
},
424424
"files": [
425425
"config/packages/notifier.yaml"
@@ -429,12 +429,12 @@
429429
"version": "v6.0.3"
430430
},
431431
"symfony/phpunit-bridge": {
432-
"version": "6.1",
432+
"version": "6.4",
433433
"recipe": {
434434
"repo": "github.com/symfony/recipes",
435435
"branch": "main",
436-
"version": "5.3",
437-
"ref": "97cb3dc7b0f39c7cfc4b7553504c9d7b7795de96"
436+
"version": "6.3",
437+
"ref": "5e6e46e7bd453880707d920c99be0da5afaaaa22"
438438
},
439439
"files": [
440440
".env.test",
@@ -468,12 +468,12 @@
468468
"version": "v6.0.6"
469469
},
470470
"symfony/routing": {
471-
"version": "6.0",
471+
"version": "6.4",
472472
"recipe": {
473473
"repo": "github.com/symfony/recipes",
474-
"branch": "master",
475-
"version": "6.0",
476-
"ref": "eb3b377a4dc07006c4bdb2c773652cc9434f5246"
474+
"branch": "main",
475+
"version": "6.2",
476+
"ref": "e0a11b4ccb8c9e70b574ff5ad3dfdcd41dec5aa6"
477477
},
478478
"files": [
479479
"config/packages/routing.yaml",
@@ -495,7 +495,7 @@
495495
"repo": "github.com/symfony/recipes",
496496
"branch": "main",
497497
"version": "2.9",
498-
"ref": "b6d49e237d6c2c106da0fc283dae268b31534bb4"
498+
"ref": "05c45071c7ecacc1e48f94bc43c1f8d4405fb2b2"
499499
},
500500
"files": [
501501
"assets/bootstrap.js",
@@ -510,12 +510,12 @@
510510
"version": "v6.0.3"
511511
},
512512
"symfony/translation": {
513-
"version": "6.2",
513+
"version": "6.4",
514514
"recipe": {
515515
"repo": "github.com/symfony/recipes",
516516
"branch": "main",
517-
"version": "5.3",
518-
"ref": "da64f5a2b6d96f5dc24914517c0350a5f91dee43"
517+
"version": "6.3",
518+
"ref": "64fe617084223633e1dedf9112935d8c95410d3e"
519519
},
520520
"files": [
521521
"config/packages/translation.yaml",
@@ -529,12 +529,12 @@
529529
"version": "v6.0.7"
530530
},
531531
"symfony/twig-bundle": {
532-
"version": "6.0",
532+
"version": "6.4",
533533
"recipe": {
534534
"repo": "github.com/symfony/recipes",
535-
"branch": "master",
536-
"version": "5.4",
537-
"ref": "bb2178c57eee79e6be0b297aa96fc0c0def81387"
535+
"branch": "main",
536+
"version": "6.3",
537+
"ref": "b7772eb20e92f3fb4d4fe756e7505b4ba2ca1a2c"
538538
},
539539
"files": [
540540
"config/packages/twig.yaml",
@@ -597,12 +597,14 @@
597597
"recipe": {
598598
"repo": "github.com/symfony/recipes",
599599
"branch": "main",
600-
"version": "2.7",
601-
"ref": "368d87bd6a1888d83b6b028692cdb09c2097f004"
600+
"version": "2.9",
601+
"ref": "bc396565cc4cab95692dd6df810553dc22e352e1"
602602
},
603603
"files": [
604604
"assets/translator.js",
605-
"config/packages/ux_translator.yaml"
605+
"config/packages/ux_translator.yaml",
606+
"var/translations/configuration.js",
607+
"var/translations/index.js"
606608
]
607609
},
608610
"symfony/ux-turbo": {
@@ -639,12 +641,12 @@
639641
"version": "v6.0.3"
640642
},
641643
"symfony/web-profiler-bundle": {
642-
"version": "6.0",
644+
"version": "6.4",
643645
"recipe": {
644646
"repo": "github.com/symfony/recipes",
645-
"branch": "master",
646-
"version": "5.3",
647-
"ref": "24bbc3d84ef2f427f82104f766014e799eefcc3e"
647+
"branch": "main",
648+
"version": "6.1",
649+
"ref": "e42b3f0177df239add25373083a564e5ead4e13a"
648650
},
649651
"files": [
650652
"config/packages/web_profiler.yaml",

ux.symfony.com/tests/bootstrap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
1919
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
2020
}
21+
22+
if ($_SERVER['APP_DEBUG']) {
23+
umask(0000);
24+
}

0 commit comments

Comments
 (0)