2019-02-23 16:49:38 +01:00
|
|
|
# This file is the entry point to configure your own services.
|
|
|
|
# Files in the packages/ subdirectory configure your dependencies.
|
|
|
|
|
|
|
|
# Put parameters here that don't need to change on each machine where the app is deployed
|
|
|
|
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
2019-03-12 13:34:33 +01:00
|
|
|
|
2019-02-23 16:49:38 +01:00
|
|
|
services:
|
|
|
|
# default configuration for services in *this* file
|
|
|
|
_defaults:
|
|
|
|
autowire: true # Automatically injects dependencies in your services.
|
|
|
|
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
2019-12-31 18:12:15 +01:00
|
|
|
bind:
|
2020-05-12 22:53:42 +02:00
|
|
|
bool $demo_mode: '%partdb.demo_mode%'
|
|
|
|
bool $gpdr_compliance : '%partdb.gpdr_compliance%'
|
2020-03-29 23:36:53 +02:00
|
|
|
bool $kernel_debug: '%kernel.debug%'
|
|
|
|
string $kernel_cache_dir: '%kernel.cache_dir%'
|
2020-05-12 22:53:42 +02:00
|
|
|
string $partdb_title: '%partdb.title%'
|
|
|
|
string $default_currency: '%partdb.default_currency%'
|
2020-04-14 17:21:30 +02:00
|
|
|
|
|
|
|
_instanceof:
|
|
|
|
App\Services\LabelSystem\PlaceholderProviders\PlaceholderProviderInterface:
|
|
|
|
tags: ['app.label_placeholder_provider']
|
2019-02-23 16:49:38 +01:00
|
|
|
|
|
|
|
# makes classes in src/ available to be used as services
|
|
|
|
# this creates a service per class whose id is the fully-qualified class name
|
|
|
|
App\:
|
|
|
|
resource: '../src/*'
|
|
|
|
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
|
|
|
|
|
|
|
|
# controllers are imported separately to make sure services can be injected
|
|
|
|
# as action arguments even if you don't extend any base controller class
|
|
|
|
App\Controller\:
|
|
|
|
resource: '../src/Controller'
|
|
|
|
tags: ['controller.service_arguments']
|
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
####################################################################################################################
|
|
|
|
# Email
|
|
|
|
####################################################################################################################
|
|
|
|
|
2020-04-09 17:24:16 +02:00
|
|
|
App\EventSubscriber\SetMailFromSubscriber:
|
2019-11-24 22:49:22 +01:00
|
|
|
tags: ['kernel.event_subscriber']
|
|
|
|
arguments:
|
2020-05-12 22:53:42 +02:00
|
|
|
$email: '%partdb.mail.sender_email%'
|
|
|
|
$name: '%partdb.mail.sender_name%'
|
2019-11-24 22:49:22 +01:00
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
####################################################################################################################
|
|
|
|
# Log System
|
|
|
|
####################################################################################################################
|
|
|
|
|
2020-01-26 13:59:30 +01:00
|
|
|
App\Services\LogSystem\EventLogger:
|
|
|
|
arguments:
|
|
|
|
# By default only log events which has minimum info level (debug levels are not logged)
|
|
|
|
# 7 is lowest level (debug), 0 highest (emergency
|
|
|
|
$minimum_log_level: 6
|
|
|
|
# Event classes specified here are not saved to DB
|
|
|
|
$blacklist: []
|
|
|
|
# Only the event classes specified here are saved to DB (set to []) to log all events
|
|
|
|
$whitelist: []
|
|
|
|
|
2020-04-09 17:24:16 +02:00
|
|
|
App\EventSubscriber\LogSystem\EventLoggerSubscriber:
|
2020-02-23 21:04:16 +01:00
|
|
|
arguments:
|
|
|
|
$save_changed_fields: '%env(bool:HISTORY_SAVE_CHANGED_FIELDS)%'
|
|
|
|
$save_changed_data: '%env(bool:HISTORY_SAVE_CHANGED_DATA)%'
|
|
|
|
$save_removed_data: '%env(bool:HISTORY_SAVE_REMOVED_DATA)%'
|
2020-02-02 21:24:29 +01:00
|
|
|
tags:
|
|
|
|
- { name: 'doctrine.event_subscriber' }
|
|
|
|
|
2020-04-09 17:24:16 +02:00
|
|
|
App\EventSubscriber\LogSystem\LogDBMigrationSubscriber:
|
2020-01-26 21:31:48 +01:00
|
|
|
tags:
|
|
|
|
- { name: 'doctrine.event_subscriber' }
|
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
App\Form\AttachmentFormType:
|
|
|
|
arguments:
|
|
|
|
$allow_attachments_downloads: '%partdb.attachments.allow_downloads%'
|
2020-01-26 21:31:48 +01:00
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
App\Services\Attachments\AttachmentSubmitHandler:
|
|
|
|
arguments:
|
|
|
|
$allow_attachments_downloads: '%partdb.attachments.allow_downloads%'
|
|
|
|
$mimeTypes: '@mime_types'
|
2019-08-20 12:34:43 +02:00
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
####################################################################################################################
|
|
|
|
# Attachment system
|
|
|
|
####################################################################################################################
|
|
|
|
|
|
|
|
Liip\ImagineBundle\Service\FilterService:
|
|
|
|
alias: 'liip_imagine.service.filter'
|
|
|
|
|
|
|
|
App\EntityListeners\AttachmentDeleteListener:
|
2019-08-27 22:24:56 +02:00
|
|
|
tags:
|
|
|
|
- name: doctrine.orm.entity_listener
|
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
App\Services\Attachments\AttachmentPathResolver:
|
|
|
|
arguments:
|
|
|
|
$project_dir: '%kernel.project_dir%'
|
|
|
|
$media_path: '%partdb.attachments.dir.media%'
|
|
|
|
$secure_path: '%partdb.attachments.dir.secure%'
|
|
|
|
$footprints_path: 'public/img/footprints'
|
|
|
|
$models_path: null
|
2019-08-20 12:34:43 +02:00
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
App\Services\Attachments\FileTypeFilterTools:
|
2019-09-12 17:50:33 +02:00
|
|
|
arguments:
|
2020-05-12 23:05:59 +02:00
|
|
|
$mimeTypes: '@mime_types'
|
|
|
|
|
|
|
|
####################################################################################################################
|
|
|
|
# Security
|
|
|
|
####################################################################################################################
|
|
|
|
|
|
|
|
App\Security\EntityListeners\ElementPermissionListener:
|
|
|
|
tags:
|
|
|
|
- { name: "doctrine.orm.entity_listener" }
|
|
|
|
|
|
|
|
####################################################################################################################
|
|
|
|
# Cache
|
|
|
|
####################################################################################################################
|
|
|
|
|
|
|
|
App\EntityListeners\TreeCacheInvalidationListener:
|
|
|
|
tags:
|
|
|
|
- { name: doctrine.orm.entity_listener }
|
2019-09-12 17:50:33 +02:00
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
####################################################################################################################
|
|
|
|
# Price system
|
|
|
|
####################################################################################################################
|
2019-08-13 13:04:31 +02:00
|
|
|
App\Command\UpdateExchangeRatesCommand:
|
|
|
|
arguments:
|
2020-05-12 22:53:42 +02:00
|
|
|
$base_current: '%partdb.default_currency%'
|
2019-08-13 13:04:31 +02:00
|
|
|
|
2019-08-30 14:25:05 +02:00
|
|
|
App\Form\Type\CurrencyEntityType:
|
|
|
|
arguments:
|
2020-05-12 22:53:42 +02:00
|
|
|
$base_currency: '%partdb.default_currency%'
|
2019-08-30 14:25:05 +02:00
|
|
|
|
2019-09-01 14:37:53 +02:00
|
|
|
App\Services\PricedetailHelper:
|
|
|
|
arguments:
|
2020-05-12 22:53:42 +02:00
|
|
|
$base_currency: '%partdb.default_currency%'
|
2019-09-01 14:37:53 +02:00
|
|
|
|
2019-09-01 13:56:14 +02:00
|
|
|
App\Services\MoneyFormatter:
|
2019-10-19 17:13:13 +02:00
|
|
|
arguments:
|
2020-05-12 23:05:59 +02:00
|
|
|
$base_currency: '%partdb.default_currency%'
|
2019-10-19 17:13:13 +02:00
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
###################################################################################################################
|
|
|
|
# User system
|
|
|
|
####################################################################################################################
|
2019-10-20 00:01:06 +02:00
|
|
|
App\Form\UserSettingsType:
|
|
|
|
arguments:
|
2020-05-12 22:53:42 +02:00
|
|
|
$demo_mode: '%partdb.demo_mode%'
|
2019-10-19 17:13:13 +02:00
|
|
|
|
2020-04-09 17:24:16 +02:00
|
|
|
App\EventSubscriber\UserSystem\SetUserTimezoneSubscriber:
|
2019-09-12 22:16:33 +02:00
|
|
|
arguments:
|
2020-05-12 22:53:42 +02:00
|
|
|
$timezone: '%partdb.timezone%'
|
2019-09-12 22:16:33 +02:00
|
|
|
|
2019-12-01 12:48:59 +01:00
|
|
|
App\Controller\SecurityController:
|
|
|
|
arguments:
|
2020-05-12 22:53:42 +02:00
|
|
|
$allow_email_pw_reset: '%partdb.users.email_pw_reset%'
|
2019-12-01 12:48:59 +01:00
|
|
|
|
2019-12-27 15:20:06 +01:00
|
|
|
App\Services\TFA\BackupCodeGenerator:
|
|
|
|
arguments:
|
|
|
|
$code_length: 8
|
2019-12-27 18:21:12 +01:00
|
|
|
$code_count: 15
|
2019-12-27 15:20:06 +01:00
|
|
|
|
2019-09-10 22:48:17 +02:00
|
|
|
App\Services\TranslationExtractor\PermissionExtractor:
|
|
|
|
tags:
|
2020-04-17 21:10:08 +02:00
|
|
|
- { name: 'translation.extractor', alias: 'permissionExtractor'}
|
|
|
|
|
2020-05-12 23:05:59 +02:00
|
|
|
|
|
|
|
####################################################################################################################
|
|
|
|
# Label system
|
|
|
|
####################################################################################################################
|
|
|
|
App\Services\LabelSystem\LabelTextReplacer:
|
|
|
|
arguments:
|
|
|
|
$providers: !tagged_iterator 'app.label_placeholder_provider'
|
|
|
|
|
2020-04-17 21:10:08 +02:00
|
|
|
# PartLotProvider must be invoked before all other providers, so it can override %%NAME%% placeholder
|
|
|
|
App\Services\LabelSystem\PlaceholderProviders\PartLotProvider:
|
|
|
|
tags:
|
2020-05-12 23:05:59 +02:00
|
|
|
- { name: 'app.label_placeholder_provider', priority: 10}
|
|
|
|
|
|
|
|
####################################################################################################################
|
|
|
|
# Symfony overrides
|
|
|
|
####################################################################################################################
|
|
|
|
|
|
|
|
# Dont use JSONSerializable Interface,
|
|
|
|
serializer.normalizer.json_serializable:
|
|
|
|
class: Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer
|
|
|
|
tags:
|
|
|
|
- {name: serializer.normalizer, priority: -9000}
|
|
|
|
|
|
|
|
|
|
|
|
####################################################################################################################
|
|
|
|
# Miscellaneous
|
|
|
|
####################################################################################################################
|
|
|
|
App\Controller\RedirectController:
|
|
|
|
arguments:
|
|
|
|
$default_locale: '%partdb.locale%'
|
|
|
|
$enforce_index_php: '%env(bool:NO_URL_REWRITE_AVAILABLE)%'
|