diff --git a/.devbox/.ddev/.gitignore b/.devbox/.ddev/.gitignore index fa06341d4..e96ad4f4f 100644 --- a/.devbox/.ddev/.gitignore +++ b/.devbox/.ddev/.gitignore @@ -28,7 +28,10 @@ /mutagen/.start-synced /nginx_full/nginx-site.conf /postgres/postgresql.conf +/providers/acquia.yaml +/providers/lagoon.yaml /providers/platform.yaml +/providers/upsun.yaml /sequelpro.spf /settings/settings.ddev.py /traefik/config/crawler-devbox.yaml diff --git a/.devbox/config/system/additional.php b/.devbox/config/system/additional.php index 0b2b19165..6cbe0161e 100644 --- a/.devbox/config/system/additional.php +++ b/.devbox/config/system/additional.php @@ -28,7 +28,7 @@ 'processor_path' => '/usr/bin/', 'processor_path_lzw' => '/usr/bin/', ], - // This mail configuration sends all emails to mailhog + // This mail configuration sends all emails to mailpit 'MAIL' => [ 'transport' => 'smtp', 'transport_smtp_encrypt' => false, diff --git a/Classes/Utility/HookUtility.php b/Classes/Utility/HookUtility.php index be5a9da34..d25458f01 100644 --- a/Classes/Utility/HookUtility.php +++ b/Classes/Utility/HookUtility.php @@ -20,6 +20,8 @@ */ use AOE\Crawler\Hooks\ProcessCleanUpHook; +use Psr\Http\Message\ServerRequestInterface; +use TYPO3\CMS\Core\Http\ApplicationType; /** * @codeCoverageIgnore @@ -42,7 +44,12 @@ public static function registerHooks($extKey): void $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$extKey]['refresh_hooks'][] = ProcessCleanUpHook::class; - self::registerBackendHooks(); + // Env-dependent + if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface + && ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend() + ) { + self::registerBackendHooks($extKey); + } } private static function registerBackendHooks(): void