From 419ffe42b8cf3a37a938c7a0e0cecc6ffcc25dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Sat, 24 Oct 2026 14:44:08 +0200 Subject: [PATCH] fix: TYPO3 caches are flushed after a rollback too Pages cached while the other release was live survived the switch (seen after the rollback test: alvac served old favicon paths until a manual cache:flush). The flush task runs in current_path, which is the new release after a deploy and the previous one after a rollback. Co-Authored-By: Claude Opus 5.5 --- deploy.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy.php b/deploy.php index 96dc7f2..68b3d06 100644 --- a/deploy.php +++ b/deploy.php @@ -154,7 +154,7 @@ task('typo3:extension:setup', function () { desc('TYPO3 - Clear all caches'); task('typo3:cache:flush', function () { - run('{{bin/php}} {{release_path}}/{{bin/typo3}} cache:flush'); + run('{{bin/php}} {{current_path}}/{{bin/typo3}} cache:flush'); }); desc('Link the production fileadmin into the release'); @@ -192,5 +192,7 @@ task('deploy', [ // is the static docroot. Not needed either: the front controller stubs in the static docroots resolve // "current" with readlink() on every request, so a new release is always loaded under new paths. after('deploy:symlink', 'typo3:cache:flush'); +// A rollback switches the code back; pages cached by the other release must not survive it +after('rollback', 'typo3:cache:flush'); after('deploy:failed', 'deploy:unlock');