This commit is contained in:
team3
2026-06-03 22:05:20 +02:00
parent d7e8df6876
commit 40de56c27b
5119 changed files with 552560 additions and 24 deletions

View File

@@ -0,0 +1,10 @@
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
];

View File

@@ -0,0 +1,25 @@
parameters:
mitho:
api:
expiredMaxTime: 3600
maxPriceAge: 300
priceListLimit: 2500
cacheExpTime: 300
cacheIsActive: true
cacheNamespaces:
rawData: 'price.data.raw'
rawDataDiffSteps: 'price.data.diffSteps'
rawDataWithArticle: 'price.data.withArticle'
import:
orm:
url: '%env(MTO_ORM_IMPORT_ENDPOINT_URL)%'
urlBckp1: '%env(MTO_ORM_IMPORT_ENDPOINT_URL_BACKUP1)%'
urlBckp2: '%env(MTO_ORM_IMPORT_ENDPOINT_URL_BACKUP2)%'
user: '%env(MTO_ORM_IMPORT_USER)%'
pwd: '%env(MTO_ORM_IMPORT_PWD)%'
shopIds: [ 1,3,4,8 ]
chunksize: 500
maxPriceAge: 240
maxTimeStampAgeSpan: 360
cashPriceStep: 13

View File

@@ -0,0 +1,6 @@
framework:
cache:
pools:
cache.rate_limiter:
adapter: cache.adapter.redis
provider: '%env(REDIS_CACHE_URL)%'

View File

@@ -0,0 +1,61 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
server_version: '8.0' # oder 'mariadb-10.5' je nach verwendeter DB
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
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
controller_resolver:
auto_mapping: false
mappings:
App:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
when@test:
doctrine:
dbal:
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod:
doctrine:
dbal:
server_version: '8.0' # Prod explizit deklarieren
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
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

View 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

View File

@@ -0,0 +1,25 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
annotations: false
http_method_override: false
handle_all_throwables: true
# 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
cookie_secure: auto
cookie_samesite: lax
#esi: true
#fragments: true
php_errors:
log: true
when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file

View File

@@ -0,0 +1,2 @@
framework:
lock: '%env(LOCK_DSN)%'

View File

@@ -0,0 +1,13 @@
framework:
messenger:
default_bus: messenger.bus.default
transports:
async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
stream: messages
stream_max_entries: 100
retry_strategy:
max_retries: 3
routing:
'App\Message\TriggerPriceImport': async

View File

@@ -0,0 +1,48 @@
monolog:
channels:
- deprecation
handlers:
file_log:
type: rotating_file
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: error
when@dev:
monolog:
handlers:
main:
type: stream
path: '%kernel.logs_dir%/dev.log'
level: debug
channels: ['!event']
deprecation:
type: stream
path: '%kernel.logs_dir%/deprecations.log'
level: info
channels: [deprecation]
stdout:
type: stream
path: php://stdout
level: debug
channels: ['!event']
when@prod:
monolog:
handlers:
file:
type: rotating_file
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: info
channels: ['!event']
formatter: monolog.formatter.line
deprecation:
type: rotating_file
path: '%kernel.logs_dir%/deprecations.log'
level: warning
channels: [deprecation]

View File

@@ -0,0 +1,6 @@
framework:
rate_limiter:
price_import:
policy: fixed_window
limit: 1
interval: '10 seconds'

View 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

View File

@@ -0,0 +1,15 @@
security:
role_hierarchy:
ROLE_ADMIN: [ ROLE_PRICES, ROLE_USER ]
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
firewalls:
dev:
main:
access_control:
# api
- { path: ^/api/prices, roles: [ PUBLIC_ACCESS ], ips: '%env(MTO_ALLOWED_API_IPS)%' }
- { path: ^/api/prices, roles: [ ROLE_NO_ACCESS ] }
#- { path: ^/trigger-import, roles: [ PUBLIC_ACCESS ], ips: '%env(MTO_ALLOWED_IMPORT_TRIGGER_IPS)%'}
#- { path: ^/trigger-import, roles: [ ROLE_NO_ACCESS ]}

View File

@@ -0,0 +1,4 @@
framework:
uid:
default_uuid_version: 7
time_based_uuid_version: 7

View File

@@ -0,0 +1,5 @@
<?php
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
}

View File

@@ -0,0 +1,5 @@
controllers:
resource:
path: ../src/Controller/
namespace: App\Controller
type: attribute

View File

@@ -0,0 +1,4 @@
when@dev:
_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error

View File

@@ -0,0 +1,3 @@
_security_logout:
resource: security.route_loader.logout
type: service

View File

@@ -0,0 +1,32 @@
# 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.html#use-parameters-for-application-configuration
parameters:
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.
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
App\Service\Prices\RedisImportService:
arguments:
$calledShopIds: '%mitho.import.orm.shopIds%'
$cashPriceStep: '%mitho.import.orm.cashPriceStep%'
App\MessageHandler\TriggerPriceImportHandler:
public: true
arguments:
$importService: '@App\Service\Prices\RedisImportService'
tags:
- name: 'messenger.message_handler'
handles: 'App\Message\TriggerPriceImport'