first commit symfony 6
This commit is contained in:
19
config/packages/cache.yaml
Normal file
19
config/packages/cache.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
framework:
|
||||
cache:
|
||||
# Unique name of your app: used to compute stable namespaces for cache keys.
|
||||
#prefix_seed: your_vendor_name/app_name
|
||||
|
||||
# The "app" cache stores to the filesystem by default.
|
||||
# The data in this cache should persist between deploys.
|
||||
# Other options include:
|
||||
|
||||
# Redis
|
||||
#app: cache.adapter.redis
|
||||
#default_redis_provider: redis://localhost
|
||||
|
||||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
|
||||
#app: cache.adapter.apcu
|
||||
|
||||
# Namespaced pools use the above "app" backend by default
|
||||
#pools:
|
||||
#my.dedicated.cache: null
|
5
config/packages/debug.yaml
Normal file
5
config/packages/debug.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
when@dev:
|
||||
debug:
|
||||
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
|
||||
# See the "server:dump" command to start a new server.
|
||||
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
|
42
config/packages/doctrine.yaml
Normal file
42
config/packages/doctrine.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
doctrine:
|
||||
dbal:
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
||||
# IMPORTANT: You MUST configure your server version,
|
||||
# either here or in the DATABASE_URL env var (see .env file)
|
||||
#server_version: '13'
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App
|
||||
|
||||
when@test:
|
||||
doctrine:
|
||||
dbal:
|
||||
# "TEST_TOKEN" is typically set by ParaTest
|
||||
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
||||
|
||||
when@prod:
|
||||
doctrine:
|
||||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
query_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
result_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.result_cache_pool
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine.result_cache_pool:
|
||||
adapter: cache.app
|
||||
doctrine.system_cache_pool:
|
||||
adapter: cache.system
|
6
config/packages/doctrine_migrations.yaml
Normal file
6
config/packages/doctrine_migrations.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
doctrine_migrations:
|
||||
migrations_paths:
|
||||
# namespace is arbitrary but should be different from App\Migrations
|
||||
# as migrations classes should NOT be autoloaded
|
||||
'DoctrineMigrations': '%kernel.project_dir%/migrations'
|
||||
enable_profiler: '%kernel.debug%'
|
37
config/packages/fos_ckeditor.yaml
Normal file
37
config/packages/fos_ckeditor.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
# Read the documentation: https://symfony.com/doc/current/bundles/FOSCKEditorBundle/index.html
|
||||
|
||||
twig:
|
||||
form_themes:
|
||||
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
|
||||
|
||||
fos_ck_editor:
|
||||
base_path: "build/ckeditor"
|
||||
js_path: "build/ckeditor/ckeditor.js"
|
||||
configs:
|
||||
full_config:
|
||||
language: fr
|
||||
toolbar: "my_full_toolbar"
|
||||
extraPlugins: ["html5video","youtube","justify","templates","iframe","colorbutton"]
|
||||
small_config:
|
||||
language: fr
|
||||
toolbar: "my_small_toolbar"
|
||||
removePlugins: 'elementspath'
|
||||
toolbars:
|
||||
configs:
|
||||
my_full_toolbar: [ "@document1", "-", "@clipboard1", "-", "@basicstyles1", "-", "@paragraph1", "/", "@links1", "-", "@insert1", "-", "@styles1", "-" , "@colors1", "-" , "@tools1" ]
|
||||
my_small_toolbar: [ "@basicstyles1", "-", "@paragraph3", "-", "@insert3"]
|
||||
|
||||
items:
|
||||
document1: [ 'Source','-','NewPage','DocProps','Preview','Print','-','Templates' ]
|
||||
clipboard1: [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ]
|
||||
basicstyles1: [ 'Bold','Italic','Underline','RemoveFormat' ]
|
||||
paragraph1: [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ]
|
||||
paragraph2: [ 'JustifyLeft','JustifyCenter','JustifyRight','NumberedList','BulletedList' ]
|
||||
paragraph3: [ 'NumberedList','BulletedList' ]
|
||||
links1: [ 'Link','Unlink','Anchor' ]
|
||||
insert1: [ 'Image','Html5video','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ]
|
||||
insert2: [ 'Image','Table','Smiley','Link','Unlink' ]
|
||||
insert3: [ 'Smiley','Link','Unlink' ]
|
||||
styles1: [ 'Styles','Format','Font','FontSize' ]
|
||||
colors1: [ 'TextColor','BGColor' ]
|
||||
tools1: [ 'Maximize', 'ShowBlocks','-','About' ]
|
11
config/packages/fos_rest.yaml
Normal file
11
config/packages/fos_rest.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
|
||||
fos_rest:
|
||||
param_fetcher_listener: true
|
||||
body_listener: true
|
||||
|
||||
format_listener:
|
||||
enabled: true
|
||||
rules:
|
||||
- { path: '/rest', priorities: ['json', 'xml'], fallback_format: 'html' }
|
||||
- { path: '/', fallback_format: 'html' }
|
||||
|
26
config/packages/framework.yaml
Normal file
26
config/packages/framework.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
#csrf_protection: true
|
||||
http_method_override: false
|
||||
|
||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||
# Remove or comment this section to explicitly disable session support.
|
||||
session:
|
||||
handler_id: null
|
||||
name: '%env(APP_ALIAS)%'
|
||||
gc_probability: null
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
storage_factory_id: session.storage.factory.native
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
php_errors:
|
||||
log: true
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
test: true
|
||||
session:
|
||||
storage_factory_id: session.storage.factory.mock_file
|
2
config/packages/lock.yaml
Normal file
2
config/packages/lock.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
framework:
|
||||
lock: '%env(LOCK_DSN)%'
|
3
config/packages/mailer.yaml
Normal file
3
config/packages/mailer.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
framework:
|
||||
mailer:
|
||||
dsn: '%env(MAILER_DSN)%'
|
8
config/packages/mercure.yaml
Normal file
8
config/packages/mercure.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
mercure:
|
||||
hubs:
|
||||
default:
|
||||
url: '%env(MERCURE_URL)%'
|
||||
public_url: '%env(MERCURE_PUBLIC_URL)%'
|
||||
jwt:
|
||||
secret: '%env(MERCURE_JWT_SECRET)%'
|
||||
publish: '*'
|
24
config/packages/messenger.yaml
Normal file
24
config/packages/messenger.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
framework:
|
||||
messenger:
|
||||
failure_transport: failed
|
||||
|
||||
transports:
|
||||
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
||||
async:
|
||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
||||
options:
|
||||
use_notify: true
|
||||
check_delayed_interval: 60000
|
||||
retry_strategy:
|
||||
max_retries: 3
|
||||
multiplier: 2
|
||||
failed: 'doctrine://default?queue_name=failed'
|
||||
# sync: 'sync://'
|
||||
|
||||
routing:
|
||||
Symfony\Component\Mailer\Messenger\SendEmailMessage: async
|
||||
Symfony\Component\Notifier\Message\ChatMessage: async
|
||||
Symfony\Component\Notifier\Message\SmsMessage: async
|
||||
|
||||
# Route your messages to the transports
|
||||
# 'App\Message\YourMessage': async
|
61
config/packages/monolog.yaml
Normal file
61
config/packages/monolog.yaml
Normal file
@ -0,0 +1,61 @@
|
||||
monolog:
|
||||
channels:
|
||||
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||
|
||||
when@dev:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: ["!event"]
|
||||
# uncomment to get logging in your browser
|
||||
# you may have to allow bigger header sizes in your Web server configuration
|
||||
#firephp:
|
||||
# type: firephp
|
||||
# level: info
|
||||
#chromephp:
|
||||
# type: chromephp
|
||||
# level: info
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine", "!console"]
|
||||
|
||||
when@test:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
channels: ["!event"]
|
||||
nested:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
|
||||
when@prod:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
||||
nested:
|
||||
type: stream
|
||||
path: php://stderr
|
||||
level: debug
|
||||
formatter: monolog.formatter.json
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine"]
|
||||
deprecation:
|
||||
type: stream
|
||||
channels: [deprecation]
|
||||
path: php://stderr
|
9
config/packages/nelmio_api_doc.yaml
Normal file
9
config/packages/nelmio_api_doc.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
nelmio_api_doc:
|
||||
documentation:
|
||||
info:
|
||||
title: '%appName%'
|
||||
description:
|
||||
version: 1.0.0
|
||||
areas: # to filter documented areas
|
||||
path_patterns:
|
||||
- /rest # Accepts routes under /rest except /rest/doc
|
16
config/packages/notifier.yaml
Normal file
16
config/packages/notifier.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
framework:
|
||||
notifier:
|
||||
#chatter_transports:
|
||||
# slack: '%env(SLACK_DSN)%'
|
||||
# telegram: '%env(TELEGRAM_DSN)%'
|
||||
#texter_transports:
|
||||
# twilio: '%env(TWILIO_DSN)%'
|
||||
# nexmo: '%env(NEXMO_DSN)%'
|
||||
channel_policy:
|
||||
# use chat/slack, chat/telegram, sms/twilio or sms/nexmo
|
||||
urgent: ['email']
|
||||
high: ['email']
|
||||
medium: ['email']
|
||||
low: ['email']
|
||||
admin_recipients:
|
||||
- { email: admin@example.com }
|
17
config/packages/oneup_uploader.yaml
Normal file
17
config/packages/oneup_uploader.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
oneup_uploader:
|
||||
mappings:
|
||||
avatar:
|
||||
frontend: dropzone
|
||||
logo:
|
||||
frontend: dropzone
|
||||
header:
|
||||
frontend: dropzone
|
||||
niveau01:
|
||||
frontend: dropzone
|
||||
icon:
|
||||
frontend: dropzone
|
||||
file:
|
||||
frontend: dropzone
|
||||
namer: app.upload.samename
|
||||
storage:
|
||||
directory: "%kernel.project_dir%/uploads/file"
|
12
config/packages/routing.yaml
Normal file
12
config/packages/routing.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
framework:
|
||||
router:
|
||||
utf8: true
|
||||
|
||||
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
||||
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
||||
#default_uri: http://localhost
|
||||
|
||||
when@prod:
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: null
|
50
config/packages/security.yaml
Normal file
50
config/packages/security.yaml
Normal file
@ -0,0 +1,50 @@
|
||||
security:
|
||||
password_hashers:
|
||||
Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface:
|
||||
id: 'App\Service\PasswordEncoder'
|
||||
|
||||
providers:
|
||||
main:
|
||||
entity:
|
||||
class: App\Entity\User
|
||||
property: username
|
||||
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
|
||||
main:
|
||||
pattern: ^/
|
||||
provider: main
|
||||
context: maincontext
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
default_target_path: app_home
|
||||
use_referer: true
|
||||
csrf_parameter: _csrf_security_token
|
||||
csrf_token_id: a_private_string
|
||||
|
||||
logout:
|
||||
invalidate_session: true
|
||||
path: app_kill
|
||||
target: app_home
|
||||
|
||||
access_control:
|
||||
- { path: ^/user, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_ANIM, ROLE_USER] }
|
||||
- { path: ^/modo, roles: [ROLE_ADMIN, ROLE_MODO] }
|
||||
- { path: ^/admin, roles: [ROLE_ADMIN] }
|
||||
|
||||
when@test:
|
||||
security:
|
||||
password_hashers:
|
||||
# By default, password hashers are resource intensive and take time. This is
|
||||
# important to generate secure password hashes. In tests however, secure hashes
|
||||
# are not important, waste resources and increase test times. The following
|
||||
# reduces the work factor to the lowest possible values.
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
||||
algorithm: auto
|
||||
cost: 4 # Lowest possible value for bcrypt
|
||||
time_cost: 3 # Lowest possible value for argon
|
||||
memory_cost: 10 # Lowest possible value for argon
|
3
config/packages/sensio_framework_extra.yaml
Normal file
3
config/packages/sensio_framework_extra.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
sensio_framework_extra:
|
||||
router:
|
||||
annotations: false
|
20
config/packages/sentry.yaml
Normal file
20
config/packages/sentry.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
when@prod:
|
||||
sentry:
|
||||
dsn: '%env(SENTRY_DSN)%'
|
||||
|
||||
# If you are using Monolog, you also need these additional configuration and services to log the errors correctly:
|
||||
# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration
|
||||
# register_error_listener: false
|
||||
|
||||
# monolog:
|
||||
# handlers:
|
||||
# sentry:
|
||||
# type: service
|
||||
# id: Sentry\Monolog\Handler
|
||||
|
||||
# services:
|
||||
# Sentry\Monolog\Handler:
|
||||
# arguments:
|
||||
# $hub: '@Sentry\State\HubInterface'
|
||||
# $level: !php/const Monolog\Logger::ERROR
|
||||
# $bubble: false
|
13
config/packages/translation.yaml
Normal file
13
config/packages/translation.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
framework:
|
||||
default_locale: en
|
||||
translator:
|
||||
default_path: '%kernel.project_dir%/translations'
|
||||
fallbacks:
|
||||
- en
|
||||
# providers:
|
||||
# crowdin:
|
||||
# dsn: '%env(CROWDIN_DSN)%'
|
||||
# loco:
|
||||
# dsn: '%env(LOCO_DSN)%'
|
||||
# lokalise:
|
||||
# dsn: '%env(LOKALISE_DSN)%'
|
21
config/packages/twig.yaml
Normal file
21
config/packages/twig.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
form_themes:
|
||||
- 'Form/fields.html.twig'
|
||||
- '@TetranzSelect2Entity/Form/fields.html.twig'
|
||||
globals:
|
||||
appAlias: '%appAlias%'
|
||||
appName: '%appName%'
|
||||
appMasteridentity: '%appMasteridentity%'
|
||||
appAuth: '%appAuth%'
|
||||
appModeregistration: '%appModeregistration%'
|
||||
appSynchro: '%appSynchro%'
|
||||
appSynchroPurgeUser: '%appSynchroPurgeUser%'
|
||||
appNiveau01label: '%appNiveau01label%'
|
||||
appNiveau02label: '%appNiveau02label%'
|
||||
sondeUse: '%sondeUse%'
|
||||
sondeUrl: '%sondeUrl%'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
strict_variables: true
|
13
config/packages/validator.yaml
Normal file
13
config/packages/validator.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
framework:
|
||||
validation:
|
||||
email_validation_mode: html5
|
||||
|
||||
# Enables validator auto-mapping support.
|
||||
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
||||
#auto_mapping:
|
||||
# App\Entity\: []
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
validation:
|
||||
not_compromised_password: false
|
15
config/packages/web_profiler.yaml
Normal file
15
config/packages/web_profiler.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
when@dev:
|
||||
web_profiler:
|
||||
toolbar: true
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { only_exceptions: false }
|
||||
|
||||
when@test:
|
||||
web_profiler:
|
||||
toolbar: false
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { collect: false }
|
49
config/packages/webpack_encore.yaml
Normal file
49
config/packages/webpack_encore.yaml
Normal file
@ -0,0 +1,49 @@
|
||||
webpack_encore:
|
||||
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
||||
output_path: '%kernel.project_dir%/public/build'
|
||||
# If multiple builds are defined (as shown below), you can disable the default build:
|
||||
# output_path: false
|
||||
|
||||
# Set attributes that will be rendered on all script and link tags
|
||||
script_attributes:
|
||||
defer: false
|
||||
# Uncomment (also under link_attributes) if using Turbo Drive
|
||||
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
|
||||
# 'data-turbo-track': reload
|
||||
# link_attributes:
|
||||
# Uncomment if using Turbo Drive
|
||||
# 'data-turbo-track': reload
|
||||
|
||||
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
|
||||
# crossorigin: 'anonymous'
|
||||
|
||||
# Preload all rendered script and link tags automatically via the HTTP/2 Link header
|
||||
# preload: true
|
||||
|
||||
# Set to true to throw an exception if the entrypoints.json file is missing or an entry is missing from the data
|
||||
strict_mode: false
|
||||
|
||||
# If you have multiple builds:
|
||||
# builds:
|
||||
# pass "frontend" as the 3rg arg to the Twig functions
|
||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
||||
|
||||
# frontend: '%kernel.project_dir%/public/frontend/build'
|
||||
|
||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||
# Put in config/packages/prod/webpack_encore.yaml
|
||||
# cache: true
|
||||
|
||||
framework:
|
||||
assets:
|
||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
||||
|
||||
#when@prod:
|
||||
# webpack_encore:
|
||||
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||
# # Available in version 1.2
|
||||
# cache: true
|
||||
|
||||
#when@test:
|
||||
# webpack_encore:
|
||||
# strict_mode: false
|
Reference in New Issue
Block a user