Files
KantSites/config/services.yaml
T
kantarciandClaude Opus 5.5 d313156c73 Send a test mail from the admin and log why delivery failed
Form submissions marked as not sent gave no reason: the transport
exception was swallowed. Every send now goes through MailCheck, which
logs the server's answer and a hint in German to var/log/mail.log
(server lines only, no credentials). The system screen shows the mail
route, sends a test mail to any address and lists recent attempts
(ADR 121).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:29:36 +02:00

177 lines
7.2 KiB
YAML

parameters:
# Die Adresse der Verwaltung. Standard bleibt /admin; wer sie aendert, nimmt Scannern und
# Anmeldeversuchen das Ziel - erraten laesst sie sich nicht mehr. Sie steht in der Umgebung und
# nicht in der Datenbank, weil die Routen beim Start feststehen muessen. Geaendert wird sie
# ueber `php bin/console cms:admin:path <neu>`; der Befehl prueft und raeumt den Cache auf.
kant.admin_path: '%env(string:default:kant.admin_path_default:ADMIN_PATH)%'
kant.admin_path_default: 'admin'
# Wo Schriften und Stylesheets liegen. Im Normalfall im oeffentlichen Ordner; ueber
# FONT_DIRECTORY und ASSET_DIRECTORY umstellbar - die Tests nutzen das, damit sie nicht in
# das Projekt schreiben, und eine Installation mit schreibgeschuetztem public/ ebenfalls.
kant.fonts_dir: '%kernel.project_dir%/public/assets/fonts'
kant.asset_dir: '%kernel.project_dir%/public/assets'
kant.mail_log: '%kernel.project_dir%/var/log/mail.log'
kant.mailer_dsn: 'sendmail://default'
services:
_defaults:
autowire: true
autoconfigure: true
# Jede Aufgabe traegt sich selbst in den Plan ein: eine Klasse, die App\Ops\Tasks\Task
# implementiert, bekommt das Etikett und liegt beim naechsten Abgleich in der Tabelle. Eine
# neue Aufgabe ist damit eine Datei und keine Liste, die man an drei Stellen nachfuehrt.
_instanceof:
App\Ops\Tasks\Task:
tags: ['kant.task']
App\:
resource: '../src/'
exclude: '../src/{Kernel.php,Domain/}'
Doctrine\DBAL\Connection:
factory: ['App\Infrastructure\ConnectionFactory', 'create']
arguments: ['%env(projectdir:DATABASE_URL)%', '@App\Infrastructure\QueryCounter']
App\Controller\PageController:
arguments:
$secret: '%kernel.secret%'
$siteOrigin: '%env(SITE_ORIGIN)%'
# Mit oder ohne www entscheidet SITE_ORIGIN; die andere Schreibweise leitet dorthin um.
App\EventSubscriber\CanonicalHostSubscriber:
arguments:
$siteOrigin: '%env(SITE_ORIGIN)%'
App\Content\MediaLibrary:
arguments:
$directory: '%env(projectdir:MEDIA_DIRECTORY)%'
App\Content\DocumentLibrary:
arguments:
$directory: '%env(projectdir:MEDIA_DIRECTORY)%'
# Die Schriften liegen im oeffentlichen Ordner: sie sollen vom Webserver direkt ausgeliefert
# werden, ohne PHP dazwischen - das ist der Punkt der Uebung.
# Die Stellen, die wissen muessen, wie die Verwaltung heisst.
App\EventSubscriber\AdminHeadersSubscriber:
arguments:
$adminPath: '%kant.admin_path%'
App\EventSubscriber\PublicNotFoundSubscriber:
arguments:
$adminPath: '%kant.admin_path%'
App\Content\Statistics:
arguments:
$adminPath: '%kant.admin_path%'
App\Content\FontLibrary:
arguments:
$directory: '%env(default:kant.fonts_dir:FONT_DIRECTORY)%'
App\Content\StyleBundle:
arguments:
$assetDirectory: '%env(default:kant.asset_dir:ASSET_DIRECTORY)%'
# Versand und Protokoll (ADR 121). MAIL_LOG nur fuer Tests, damit sie nicht ins echte var/log
# schreiben.
App\Ops\MailCheck:
arguments:
$dsn: '%env(default:kant.mailer_dsn:MAILER_DSN)%'
$logFile: '%env(default:kant.mail_log:MAIL_LOG)%'
App\Controller\FormController:
arguments:
$secret: '%kernel.secret%'
$siteOrigin: '%env(SITE_ORIGIN)%'
App\EventSubscriber\ErrorLogSubscriber:
arguments:
$debug: '%kernel.debug%'
App\Controller\SeoController:
arguments:
$siteOrigin: '%env(SITE_ORIGIN)%'
$adminPath: '%kant.admin_path%'
App\Command\HealthCommand:
arguments:
$projectDir: '%kernel.project_dir%'
App\Controller\SystemController:
arguments:
$adminPath: '%kant.admin_path%'
$databaseUrl: '%env(DATABASE_URL)%'
$siteOrigin: '%env(SITE_ORIGIN)%'
$mediaDirectory: '%env(projectdir:MEDIA_DIRECTORY)%'
$projectDir: '%kernel.project_dir%'
App\Command\AdminPathCommand:
arguments:
$projectDir: '%kernel.project_dir%'
$adminPath: '%kant.admin_path%'
$environment: '%kernel.environment%'
# Eigene kurze Zeitgrenzen statt des Download-Dienstes mit denen fuer Releasearchive.
App\Ops\OriginCheck:
arguments:
$secret: '%kernel.secret%'
$download: null
# HTTPS erzwingen und HSTS (ADR 120); die Probe ueber http kommt im Test als Closure herein.
App\Ops\HttpsRedirect:
arguments:
$projectDir: '%kernel.project_dir%'
$httpProbe: null
App\Command\HttpsCommand:
arguments:
$siteOrigin: '%env(SITE_ORIGIN)%'
App\Command\SiteOriginCommand:
arguments:
$projectDir: '%kernel.project_dir%'
$siteOrigin: '%env(SITE_ORIGIN)%'
App\Ops\ArchiveUpdate:
arguments:
$root: '%kernel.project_dir%'
App\Ops\Updater:
arguments:
$root: '%kernel.project_dir%'
$databaseUrl: '%env(projectdir:DATABASE_URL)%'
App\EventSubscriber\InstallSubscriber:
arguments:
$projectDir: '%kernel.project_dir%'
App\EventSubscriber\MaintenanceSubscriber:
arguments:
$projectDir: '%kernel.project_dir%'
$adminPath: '%kant.admin_path%'
App\Ops\Installation:
arguments:
$root: '%kernel.project_dir%'
$mediaDirectory: '%env(projectdir:MEDIA_DIRECTORY)%'
$secret: '%kernel.secret%'
App\Ops\Backup:
arguments:
$root: '%kernel.project_dir%'
$databaseUrl: '%env(projectdir:DATABASE_URL)%'
$mediaDirectory: '%env(projectdir:MEDIA_DIRECTORY)%'
App\Ops\SitePackage:
arguments:
$root: '%kernel.project_dir%'
$mediaDirectory: '%env(projectdir:MEDIA_DIRECTORY)%'
# Der Aufgabenplan. Die Aufgaben kommen ueber ihr Etikett herein, damit diese Stelle nicht
# jedes Mal mitwaechst.
App\Ops\Scheduler:
arguments:
$tasks: !tagged_iterator kant.task
$projectDir: '%kernel.project_dir%'
App\Ops\Tasks\CleanupTask:
arguments:
$projectDir: '%kernel.project_dir%'
App\EventSubscriber\TaskWorkerSubscriber:
arguments:
$projectDir: '%kernel.project_dir%'
$adminPath: '%kant.admin_path%'
App\Controller\TaskController:
arguments:
$secret: '%kernel.secret%'
App\Controller\CronController:
arguments:
$secret: '%kernel.secret%'
App\Infrastructure\QueryCounter: ~
# `%env(projectdir:...)%`: ersetzt nur %kernel.project_dir%. Symfonys `resolve:` laese ein
# prozentkodiertes MySQL-Passwort (`p%40ss`) als Parameter und brauche den Container.
App\Infrastructure\ProjectDirEnvProcessor:
arguments:
$projectDir: '%kernel.project_dir%'
App\EventSubscriber\QueryHeaderSubscriber:
arguments:
$environment: '%kernel.environment%'
App\Plugin\PluginRegistry:
arguments:
$projectDir: '%kernel.project_dir%'
App\Twig\PluginExtension:
arguments:
$loader: '@twig.loader.native_filesystem'