Files
typo3-13/config/system/additional.php
T
frommeandClaude Opus 5.5 f6307d7552 fix: hybrid deploy without OPcache tool, tolerant of missing secrets
- No cachetool: its web adapter needs PHP below www.ep-reisen.de/typo3temp,
  which is the static docroot in the hybrid setup (blocked, and not the
  release's typo3temp). Not needed: the exporter's front controller stubs
  resolve the "current" symlink with readlink() on every request.
- additional.php only merges secrets.php when it returns an array:
  Deployer creates an empty shared file on the first deploy.
- public/.htaccess sets TYPO3_CONTEXT=Production/Staging for
  staging.ep-reisen.de, the smoke-test vhost.
- dep host:check: read-only checks of the host before the first deploy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 18:08:17 +02:00

84 lines
2.9 KiB
PHP

<?php
// Maintained in Git (taken over from DDEV's generated file): DDEV settings locally, secrets
// from secrets.php everywhere. Empty secret values leave settings.php untouched.
if (getenv('IS_DDEV_PROJECT') == 'true') {
$GLOBALS['TYPO3_CONF_VARS'] = array_replace_recursive(
$GLOBALS['TYPO3_CONF_VARS'],
[
'DB' => [
'Connections' => [
'Default' => [
'dbname' => 'db',
'driver' => 'mysqli',
'host' => 'db',
'password' => 'db',
'port' => '3306',
'user' => 'db',
],
],
],
// This GFX configuration allows processing by installed ImageMagick 6
'GFX' => [
'processor' => 'ImageMagick',
'processor_path' => '/usr/bin/',
'processor_path_lzw' => '/usr/bin/',
],
// This mail configuration sends all emails to mailpit
'MAIL' => [
'transport' => 'smtp',
'transport_smtp_encrypt' => false,
'transport_smtp_server' => 'localhost:1025',
],
'SYS' => [
'trustedHostsPattern' => '.*.*',
'devIPmask' => '*',
'displayErrors' => 1,
// Warnings and deprecations are exceptions locally: they are how PHP 7.4 leftovers show up
'exceptionalErrors' => 12290,
],
'BE' => [
'debug' => true,
],
'FE' => [
'debug' => true,
],
'LOG' => [
'TYPO3' => [
'CMS' => [
'deprecations' => [
'writerConfiguration' => [
'notice' => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => ['disabled' => false],
],
],
],
],
],
],
]
);
}
// Deployer creates an empty secrets.php if none exists yet: only an array counts
$secrets = is_file(__DIR__ . '/secrets.php') ? require __DIR__ . '/secrets.php' : null;
if (is_array($secrets)) {
$withoutEmptyValues = static function (array $values) use (&$withoutEmptyValues): array {
foreach ($values as $key => $value) {
if (is_array($value)) {
$values[$key] = $withoutEmptyValues($value);
} elseif ($value === '' || $value === null) {
unset($values[$key]);
}
}
return $values;
};
$GLOBALS['TYPO3_CONF_VARS'] = array_replace_recursive(
$GLOBALS['TYPO3_CONF_VARS'],
$withoutEmptyValues($secrets)
);
unset($withoutEmptyValues);
}
unset($secrets);