[TASK] Clear opcode cache on Core update
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Classes / Service / CoreUpdateService.php
index 38fef8c..afca791 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Install\Service;
  */
 
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\OpcodeCacheUtility;
 
 /**
  * Core update service.
@@ -431,7 +432,9 @@ class CoreUpdateService {
                                $messages[] = $message;
                        } else {
                                $symlinkResult = symlink($newCoreLocation, $this->currentCoreLocation);
-                               if (!$symlinkResult) {
+                               if ($symlinkResult) {
+                                       OpcodeCacheUtility::clearAllActive();
+                               } else {
                                        $success = FALSE;
                                        /** @var $message \TYPO3\CMS\Install\Status\StatusInterface */
                                        $message = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
@@ -454,4 +457,4 @@ class CoreUpdateService {
        protected function getDownloadTarGzTargetPath($version) {
                return $this->downloadTargetPath . $version . '.tar.gz';
        }
-}
\ No newline at end of file
+}