Add webapp packages
This commit is contained in:
		
							
								
								
									
										11
									
								
								config/packages/asset_mapper.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								config/packages/asset_mapper.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
framework:
 | 
			
		||||
    asset_mapper:
 | 
			
		||||
        # The paths to make available to the asset mapper.
 | 
			
		||||
        paths:
 | 
			
		||||
            - assets/
 | 
			
		||||
        missing_import_mode: strict
 | 
			
		||||
 | 
			
		||||
when@prod:
 | 
			
		||||
    framework:
 | 
			
		||||
        asset_mapper:
 | 
			
		||||
            missing_import_mode: warn
 | 
			
		||||
							
								
								
									
										11
									
								
								config/packages/csrf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								config/packages/csrf.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
# Enable stateless CSRF protection for forms and logins/logouts
 | 
			
		||||
framework:
 | 
			
		||||
    form:
 | 
			
		||||
        csrf_protection:
 | 
			
		||||
            token_id: submit
 | 
			
		||||
 | 
			
		||||
    csrf_protection:
 | 
			
		||||
        stateless_token_ids:
 | 
			
		||||
            - submit
 | 
			
		||||
            - authenticate
 | 
			
		||||
            - logout
 | 
			
		||||
							
								
								
									
										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)%"
 | 
			
		||||
							
								
								
									
										54
									
								
								config/packages/doctrine.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								config/packages/doctrine.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
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: '16'
 | 
			
		||||
 | 
			
		||||
        profiling_collect_backtrace: '%kernel.debug%'
 | 
			
		||||
        use_savepoints: true
 | 
			
		||||
    orm:
 | 
			
		||||
        auto_generate_proxy_classes: true
 | 
			
		||||
        enable_lazy_ghost_objects: true
 | 
			
		||||
        report_fields_where_declared: true
 | 
			
		||||
        validate_xml_mapping: true
 | 
			
		||||
        naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
 | 
			
		||||
        identity_generation_preferences:
 | 
			
		||||
            Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
 | 
			
		||||
        auto_mapping: true
 | 
			
		||||
        mappings:
 | 
			
		||||
            App:
 | 
			
		||||
                type: attribute
 | 
			
		||||
                is_bundle: false
 | 
			
		||||
                dir: '%kernel.project_dir%/src/Entity'
 | 
			
		||||
                prefix: 'App\Entity'
 | 
			
		||||
                alias: App
 | 
			
		||||
        controller_resolver:
 | 
			
		||||
            auto_mapping: false
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
            proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
 | 
			
		||||
            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: false
 | 
			
		||||
							
								
								
									
										3
									
								
								config/packages/mailer.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								config/packages/mailer.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
framework:
 | 
			
		||||
    mailer:
 | 
			
		||||
        dsn: '%env(MAILER_DSN)%'
 | 
			
		||||
							
								
								
									
										29
									
								
								config/packages/messenger.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								config/packages/messenger.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
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://'
 | 
			
		||||
 | 
			
		||||
        default_bus: messenger.bus.default
 | 
			
		||||
 | 
			
		||||
        buses:
 | 
			
		||||
            messenger.bus.default: []
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
							
								
								
									
										62
									
								
								config/packages/monolog.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								config/packages/monolog.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
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
 | 
			
		||||
                formatter: monolog.formatter.json
 | 
			
		||||
							
								
								
									
										12
									
								
								config/packages/notifier.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								config/packages/notifier.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
framework:
 | 
			
		||||
    notifier:
 | 
			
		||||
        chatter_transports:
 | 
			
		||||
        texter_transports:
 | 
			
		||||
        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 }
 | 
			
		||||
							
								
								
									
										3
									
								
								config/packages/property_info.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								config/packages/property_info.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
framework:
 | 
			
		||||
    property_info:
 | 
			
		||||
        with_constructor_extractor: true
 | 
			
		||||
							
								
								
									
										39
									
								
								config/packages/security.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								config/packages/security.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
security:
 | 
			
		||||
    # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
 | 
			
		||||
    password_hashers:
 | 
			
		||||
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
 | 
			
		||||
    # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
 | 
			
		||||
    providers:
 | 
			
		||||
        users_in_memory: { memory: null }
 | 
			
		||||
    firewalls:
 | 
			
		||||
        dev:
 | 
			
		||||
            pattern: ^/(_(profiler|wdt)|css|images|js)/
 | 
			
		||||
            security: false
 | 
			
		||||
        main:
 | 
			
		||||
            lazy: true
 | 
			
		||||
            provider: users_in_memory
 | 
			
		||||
 | 
			
		||||
            # activate different ways to authenticate
 | 
			
		||||
            # https://symfony.com/doc/current/security.html#the-firewall
 | 
			
		||||
 | 
			
		||||
            # https://symfony.com/doc/current/security/impersonating_user.html
 | 
			
		||||
            # switch_user: true
 | 
			
		||||
 | 
			
		||||
    # Easy way to control access for large sections of your site
 | 
			
		||||
    # Note: Only the *first* access control that matches will be used
 | 
			
		||||
    access_control:
 | 
			
		||||
        # - { path: ^/admin, roles: ROLE_ADMIN }
 | 
			
		||||
        # - { path: ^/profile, roles: ROLE_USER }
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
							
								
								
									
										5
									
								
								config/packages/translation.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								config/packages/translation.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
framework:
 | 
			
		||||
    default_locale: en
 | 
			
		||||
    translator:
 | 
			
		||||
        default_path: '%kernel.project_dir%/translations'
 | 
			
		||||
        providers:
 | 
			
		||||
							
								
								
									
										6
									
								
								config/packages/twig.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								config/packages/twig.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
twig:
 | 
			
		||||
    file_name_pattern: '*.twig'
 | 
			
		||||
 | 
			
		||||
when@test:
 | 
			
		||||
    twig:
 | 
			
		||||
        strict_variables: true
 | 
			
		||||
							
								
								
									
										4
									
								
								config/packages/ux_turbo.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								config/packages/ux_turbo.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
# Enable stateless CSRF protection for forms and logins/logouts
 | 
			
		||||
framework:
 | 
			
		||||
    csrf_protection:
 | 
			
		||||
        check_header: true
 | 
			
		||||
							
								
								
									
										11
									
								
								config/packages/validator.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								config/packages/validator.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
framework:
 | 
			
		||||
    validation:
 | 
			
		||||
        # 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
 | 
			
		||||
							
								
								
									
										13
									
								
								config/packages/web_profiler.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								config/packages/web_profiler.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
when@dev:
 | 
			
		||||
    web_profiler:
 | 
			
		||||
        toolbar: true
 | 
			
		||||
 | 
			
		||||
    framework:
 | 
			
		||||
        profiler:
 | 
			
		||||
            collect_serializer_data: true
 | 
			
		||||
 | 
			
		||||
when@test:
 | 
			
		||||
    framework:
 | 
			
		||||
        profiler:
 | 
			
		||||
            collect: false
 | 
			
		||||
            collect_serializer_data: true
 | 
			
		||||
		Reference in New Issue
	
	Block a user