task('contao:maintenance:enable', function () {
    // Enable maintenance mode in both the current and release build, so that the maintenance mode will be enabled
    // for the current installation before the symlink changes and the new installation after the symlink changed.
    foreach (array_unique([parse('{{current_path}}'), parse('{{release_or_current_path}}')]) as $path) {
        // The current path might not be present during first deploy.