Last active
June 19, 2018 07:14
-
-
Save josefglatz/cd75ce4d48bb06c5f3d4c37442a08dfb to your computer and use it in GitHub Desktop.
TYPO3/surf snippets for TYPO3 CMS deployments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
/** | |
* Set custom symlinks (in addition to fileadmin and uploads) | |
*/ | |
$application->setSymlinks([ | |
'web/typo3conf/l10n' => '../../../../shared/Data/l10n' | |
]); | |
// ... | |
/** | |
* Define task to generate the shared target folder "l10n" | |
* and execute the task right after task "TYPO3\\Surf\\Task\\Generic\\CreateSymlinksTask" | |
*/ | |
$workflow->defineTask('JosefGlatz\\TYPO3\\Distribution\\DefinedTask\\L10nShared', 'TYPO3\\Surf\\Task\\TYPO3\\CMS\\SymlinkDataTask', [ | |
'directories' => [ | |
'l10n' | |
], | |
]); | |
$workflow->afterTask('TYPO3\\Surf\\Task\\Generic\\CreateSymlinksTask', 'JosefGlatz\\TYPO3\\Distribution\\DefinedTask\\L10nShared', $application); | |
// ... | |
// If you want, you can add a language:update task for every deployment. | |
// You can run the language:update task also via scheduler on a regular basis if it takes to much time. | |
$workflow->defineTask('JosefGlatz\\TYPO3\\Distribution\\DefinedTask\\UpdateLanguages', RunCommandTask::class, [ | |
'command' => 'language:update', | |
]); | |
$workflow->afterTask('TYPO3\\Surf\\Task\\TYPO3\\CMS\\FlushCachesTask', 'JosefGlatz\\TYPO3\\Distribution\\DefinedTask\\UpdateLanguages', $application); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The SymlinkDataTask also creates the directory for you and symlinks it, you don't need
$application->setSymlinks
, but you have to use the full path:So if you set
$application->setOption(\TYPO3\Surf\Task\TYPO3\CMS\SymlinkDataTask::class . '[directories]', ['web/typo3conf/l10n']);
you get a folder
shared/Data/web/typo3conf/l10n
that is symlinked toweb/typo3conf/l10n
See TYPO3/Surf#84