‪TYPO3CMS  10.4
UpgradeController.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use PhpParser\NodeTraverser;
21 use PhpParser\NodeVisitor\NameResolver;
22 use PhpParser\ParserFactory;
23 use Psr\Http\Message\ResponseInterface;
24 use Psr\Http\Message\ServerRequestInterface;
25 use Symfony\Component\Finder\Finder;
26 use Symfony\Component\Finder\SplFileInfo;
37 use TYPO3\CMS\Core\Package\PackageManager;
69 use TYPO3\CMS\Install\Service\CoreVersionService;
74 
80 {
84  protected ‪$coreUpdateService;
85 
89  protected ‪$coreVersionService;
90 
95 
99  protected ‪$packageManager;
100 
104  private ‪$lateBootService;
105 
106  public function ‪__construct(
107  PackageManager ‪$packageManager,
110  ) {
111  $this->packageManager = ‪$packageManager;
112  $this->lateBootService = ‪$lateBootService;
113  $this->upgradeWizardsService = ‪$upgradeWizardsService;
114  }
115 
122  protected ‪$matchers = [
123  [
124  'class' => ArrayDimensionMatcher::class,
125  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php',
126  ],
127  [
128  'class' => ArrayGlobalMatcher::class,
129  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php',
130  ],
131  [
132  'class' => ClassConstantMatcher::class,
133  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ClassConstantMatcher.php',
134  ],
135  [
136  'class' => ClassNameMatcher::class,
137  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php',
138  ],
139  [
140  'class' => ConstantMatcher::class,
141  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ConstantMatcher.php',
142  ],
143  [
144  'class' => ConstructorArgumentMatcher::class,
145  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ConstructorArgumentMatcher.php',
146  ],
147  [
148  'class' => PropertyAnnotationMatcher::class,
149  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyAnnotationMatcher.php',
150  ],
151  [
152  'class' => MethodAnnotationMatcher::class,
153  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodAnnotationMatcher.php',
154  ],
155  [
156  'class' => FunctionCallMatcher::class,
157  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/FunctionCallMatcher.php',
158  ],
159  [
160  'class' => InterfaceMethodChangedMatcher::class,
161  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/InterfaceMethodChangedMatcher.php',
162  ],
163  [
164  'class' => MethodArgumentDroppedMatcher::class,
165  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedMatcher.php',
166  ],
167  [
168  'class' => MethodArgumentDroppedStaticMatcher::class,
169  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedStaticMatcher.php',
170  ],
171  [
172  'class' => MethodArgumentRequiredMatcher::class,
173  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredMatcher.php',
174  ],
175  [
176  'class' => MethodArgumentRequiredStaticMatcher::class,
177  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredStaticMatcher.php',
178  ],
179  [
180  'class' => MethodArgumentUnusedMatcher::class,
181  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentUnusedMatcher.php',
182  ],
183  [
184  'class' => MethodCallMatcher::class,
185  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php',
186  ],
187  [
188  'class' => MethodCallStaticMatcher::class,
189  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php',
190  ],
191  [
192  'class' => PropertyExistsStaticMatcher::class,
193  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyExistsStaticMatcher.php'
194  ],
195  [
196  'class' => PropertyProtectedMatcher::class,
197  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php',
198  ],
199  [
200  'class' => PropertyPublicMatcher::class,
201  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php',
202  ],
203  ];
204 
211  public function ‪cardsAction(ServerRequestInterface $request): ResponseInterface
212  {
213  $view = $this->‪initializeStandaloneView($request, 'Upgrade/Cards.html');
214  $view->assign('extensionFoldersInTypo3conf', (new Finder())->directories()->in(‪Environment::getExtensionsPath())->depth(0)->count());
215  return new ‪JsonResponse([
216  'success' => true,
217  'html' => $view->render(),
218  ]);
219  }
220 
227  public function ‪coreUpdateActivateAction(ServerRequestInterface $request): ResponseInterface
228  {
229  $this->‪coreUpdateInitialize();
230  return new JsonResponse([
231  'success' => $this->coreUpdateService->activateVersion($this->coreUpdateGetVersionToHandle($request)),
232  'status' => $this->coreUpdateService->getMessages(),
233  ]);
234  }
235 
242  public function ‪coreUpdateCheckPreConditionsAction(ServerRequestInterface $request): ResponseInterface
243  {
244  $this->‪coreUpdateInitialize();
245  return new JsonResponse([
246  'success' => $this->coreUpdateService->checkPreConditions($this->coreUpdateGetVersionToHandle($request)),
247  'status' => $this->coreUpdateService->getMessages(),
248  ]);
249  }
250 
257  public function ‪coreUpdateDownloadAction(ServerRequestInterface $request): ResponseInterface
258  {
259  $this->‪coreUpdateInitialize();
260  return new JsonResponse([
261  'success' => $this->coreUpdateService->downloadVersion($this->coreUpdateGetVersionToHandle($request)),
262  'status' => $this->coreUpdateService->getMessages(),
263  ]);
264  }
265 
272  public function ‪coreUpdateGetDataAction(ServerRequestInterface $request): ResponseInterface
273  {
274  $view = $this->‪initializeStandaloneView($request, 'Upgrade/CoreUpdate.html');
275  ‪$coreUpdateService = GeneralUtility::makeInstance(CoreUpdateService::class);
276  ‪$coreVersionService = GeneralUtility::makeInstance(CoreVersionService::class);
277 
278  $coreUpdateEnabled = ‪$coreUpdateService->‪isCoreUpdateEnabled();
279  $coreUpdateComposerMode = ‪Environment::isComposerMode();
280  $coreUpdateIsReleasedVersion = ‪$coreVersionService->isInstalledVersionAReleasedVersion();
281  $coreUpdateIsSymLinkedCore = is_link(‪Environment::getPublicPath() . '/typo3_src');
282  $isUpdatable = !$coreUpdateComposerMode && $coreUpdateEnabled && $coreUpdateIsReleasedVersion && $coreUpdateIsSymLinkedCore;
283 
284  $view->assignMultiple([
285  'coreIsUpdatable' => $isUpdatable,
286  'coreUpdateEnabled' => $coreUpdateEnabled,
287  'coreUpdateComposerMode' => $coreUpdateComposerMode,
288  'coreUpdateIsReleasedVersion' => $coreUpdateIsReleasedVersion,
289  'coreUpdateIsSymLinkedCore' => $coreUpdateIsSymLinkedCore,
290  ]);
291 
292  $buttons = [];
293  if ($isUpdatable) {
294  $buttons[] = [
295  'btnClass' => 'btn-warning t3js-coreUpdate-button t3js-coreUpdate-init',
296  'name' => 'coreUpdateCheckForUpdate',
297  'text' => 'Check for core updates',
298  'dataAttributes' => [
299  'action' => 'checkForUpdate',
300  ],
301  ];
302  }
303 
304  return new JsonResponse([
305  'success' => true,
306  'html' => $view->render(),
307  'buttons' => $buttons,
308  ]);
309  }
310 
316  public function ‪coreUpdateIsUpdateAvailableAction(): ResponseInterface
317  {
318  $action = null;
319  $this->‪coreUpdateInitialize();
320  $messageQueue = new ‪FlashMessageQueue('install');
321 
322  $messages = [];
323 
324  if ($this->coreVersionService->isInstalledVersionAReleasedVersion()) {
325  $versionMaintenanceWindow = $this->coreVersionService->getMaintenanceWindow();
326  $renderVersionInformation = false;
327 
328  if (!$versionMaintenanceWindow->isSupportedByCommunity() && !$versionMaintenanceWindow->isSupportedByElts()) {
329  $messages[] = [
330  'title' => 'Outdated version',
331  'message' => 'The currently installed TYPO3 version ' . $this->coreVersionService->getInstalledVersion() . ' does not receive any further updates, please consider upgrading to a supported version!',
332  'severity' => ‪FlashMessage::ERROR,
333  ];
334  $renderVersionInformation = true;
335  } else {
336  $currentVersion = $this->coreVersionService->getInstalledVersion();
337  $isCurrentVersionElts = $this->coreVersionService->isCurrentInstalledVersionElts();
338  $latestRelease = $this->coreVersionService->getYoungestPatchRelease();
339 
340  $availableReleases = [];
341  if ($this->coreVersionService->isPatchReleaseSuitableForUpdate($latestRelease)) {
342  $availableReleases[] = $latestRelease;
343 
344  if (!$latestRelease->isElts()) {
345  $action = ['title' => 'Update now to version ' . $latestRelease->getVersion(), 'action' => 'updateRegular'];
346  }
347  }
348  if (!$versionMaintenanceWindow->isSupportedByCommunity()) {
349  if ($latestRelease->isElts()) {
350  // Check if there's a public release left that's not installed yet
351  $latestCommunityDrivenRelease = $this->coreVersionService->getYoungestCommunityPatchRelease();
352  if ($this->coreVersionService->isPatchReleaseSuitableForUpdate($latestCommunityDrivenRelease)) {
353  $availableReleases[] = $latestCommunityDrivenRelease;
354  $action = ['title' => 'Update now to version ' . $latestCommunityDrivenRelease->getVersion(), 'action' => 'updateRegular'];
355  }
356  } elseif (!$isCurrentVersionElts) {
357  // Inform user about ELTS being available soon if:
358  // - regular support ran out
359  // - the current installed version is no ELTS
360  // - no ELTS update was released, yet
361  $messages[] = [
362  'title' => 'ELTS will be available soon',
363  'message' => sprintf('The currently installed TYPO3 version %s doesn\'t receive any community-driven updates anymore, consider subscribing to Extended Long Term Support (ELTS) releases. Please read the information below.', $currentVersion),
364  'severity' => ‪FlashMessage::WARNING,
365  ];
366  $renderVersionInformation = true;
367  }
368  }
369 
370  if ($availableReleases === []) {
371  $messages[] = [
372  'title' => 'Up to date',
373  'message' => 'There are no TYPO3 updates available.',
374  'severity' => ‪FlashMessage::NOTICE,
375  ];
376  } else {
377  foreach ($availableReleases as $availableRelease) {
378  $isUpdateSecurityRelevant = $this->coreVersionService->isUpdateSecurityRelevant($availableRelease);
379  $versionString = $availableRelease->getVersion();
380  if ($availableRelease->isElts()) {
381  $versionString .= ' ELTS';
382  }
383 
384  if ($isUpdateSecurityRelevant) {
385  $title = ($availableRelease->isElts() ? 'ELTS ' : '') . 'Security update available!';
386  $message = sprintf('The currently installed version is %s, update to security relevant released version %s is available.', $currentVersion, $versionString);
387  $severity = ‪FlashMessage::ERROR;
388  } else {
389  $title = ($availableRelease->isElts() ? 'ELTS ' : '') . 'Update available!';
390  $message = sprintf('Currently installed version is %s, update to regular released version %s is available.', $currentVersion, $versionString);
391  $severity = ‪FlashMessage::WARNING;
392  }
393 
394  if ($availableRelease->isElts()) {
395  if ($isCurrentVersionElts) {
396  $message .= ' Please visit my.typo3.org to download the release in your ELTS area.';
397  } else {
398  $message .= ' ' . sprintf('The currently installed TYPO3 version %s doesn\'t receive any community-driven updates anymore, consider subscribing to Extended Long Term Support (ELTS) releases. Please read the information below.', $currentVersion);
399  }
400 
401  $renderVersionInformation = true;
402  }
403 
404  $messages[] = [
405  'title' => $title,
406  'message' => $message,
407  'severity' => $severity,
408  ];
409  }
410  }
411  }
412 
413  if ($renderVersionInformation) {
414  $supportedMajorReleases = $this->coreVersionService->getSupportedMajorReleases();
415  $supportMessages = [];
416  if (!empty($supportedMajorReleases['community'])) {
417  $supportMessages[] = sprintf('Currently community-supported TYPO3 versions: %s (more information at https://get.typo3.org).', implode(', ', $supportedMajorReleases['community']));
418  }
419  if (!empty($supportedMajorReleases['elts'])) {
420  $supportMessages[] = sprintf('Currently supported TYPO3 ELTS versions: %s (more information at https://typo3.com/elts).', implode(', ', $supportedMajorReleases['elts']));
421  }
422 
423  $messages[] = [
424  'title' => 'TYPO3 Version information',
425  'message' => implode(' ', $supportMessages),
426  'severity' => ‪FlashMessage::INFO,
427  ];
428  }
429 
430  foreach ($messages as $message) {
431  $messageQueue->enqueue(new ‪FlashMessage($message['message'], $message['title'], $message['severity']));
432  }
433  } else {
434  $messageQueue->enqueue(new ‪FlashMessage(
435  '',
436  'Current version is a development version and can not be updated',
438  ));
439  }
440  $responseData = [
441  'success' => true,
442  'status' => $messageQueue,
443  ];
444  if (isset($action)) {
445  $responseData['action'] = $action;
446  }
447  return new ‪JsonResponse($responseData);
448  }
449 
456  public function ‪coreUpdateMoveAction(ServerRequestInterface $request): ResponseInterface
457  {
458  $this->‪coreUpdateInitialize();
459  return new ‪JsonResponse([
460  'success' => $this->coreUpdateService->moveVersion($this->coreUpdateGetVersionToHandle($request)),
461  'status' => $this->coreUpdateService->getMessages(),
462  ]);
463  }
464 
471  public function ‪coreUpdateUnpackAction(ServerRequestInterface $request): ResponseInterface
472  {
473  $this->‪coreUpdateInitialize();
474  return new JsonResponse([
475  'success' => $this->coreUpdateService->unpackVersion($this->coreUpdateGetVersionToHandle($request)),
476  'status' => $this->coreUpdateService->getMessages(),
477  ]);
478  }
479 
486  public function ‪coreUpdateVerifyChecksumAction(ServerRequestInterface $request): ResponseInterface
487  {
488  $this->‪coreUpdateInitialize();
489  return new JsonResponse([
490  'success' => $this->coreUpdateService->verifyFileChecksum($this->coreUpdateGetVersionToHandle($request)),
491  'status' => $this->coreUpdateService->getMessages(),
492  ]);
493  }
494 
501  public function ‪extensionCompatTesterLoadedExtensionListAction(ServerRequestInterface $request): ResponseInterface
502  {
503  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
504  $view = $this->‪initializeStandaloneView($request, 'Upgrade/ExtensionCompatTester.html');
505  $view->assignMultiple([
506  'extensionCompatTesterLoadExtLocalconfToken' => $formProtection->generateToken('installTool', 'extensionCompatTesterLoadExtLocalconf'),
507  'extensionCompatTesterLoadExtTablesToken' => $formProtection->generateToken('installTool', 'extensionCompatTesterLoadExtTables'),
508  'extensionCompatTesterUninstallToken' => $formProtection->generateToken('installTool', 'extensionCompatTesterUninstallExtension'),
509  ]);
510 
511  return new JsonResponse([
512  'success' => true,
513  'html' => $view->render(),
514  'buttons' => [
515  [
516  'btnClass' => 'btn-default disabled t3js-extensionCompatTester-check',
517  'text' => 'Check extensions',
518  ],
519  ],
520  ]);
521  }
522 
529  public function ‪extensionCompatTesterLoadExtLocalconfAction(ServerRequestInterface $request): ResponseInterface
530  {
531  $brokenExtensions = [];
532  $container = $this->lateBootService->getContainer();
533  $backup = $this->lateBootService->makeCurrent($container);
534 
535  foreach ($this->packageManager->getActivePackages() as $package) {
536  try {
538  } catch (\Throwable $e) {
539  $brokenExtensions[] = [
540  'name' => $package->getPackageKey(),
541  'isProtected' => $package->isProtected()
542  ];
543  }
544  }
545 
546  $this->lateBootService->makeCurrent(null, $backup);
547 
548  return new JsonResponse([
549  'brokenExtensions' => $brokenExtensions,
550  ], empty($brokenExtensions) ? 200 : 500);
551  }
552 
559  public function ‪extensionCompatTesterLoadExtTablesAction(ServerRequestInterface $request): ResponseInterface
560  {
561  $brokenExtensions = [];
562  $container = $this->lateBootService->getContainer();
563  $backup = $this->lateBootService->makeCurrent($container);
564 
565  $activePackages = $this->packageManager->getActivePackages();
566  foreach ($activePackages as $package) {
567  // Load all ext_localconf files first
569  }
570  foreach ($activePackages as $package) {
571  try {
573  } catch (\Throwable $e) {
574  $brokenExtensions[] = [
575  'name' => $package->getPackageKey(),
576  'isProtected' => $package->isProtected()
577  ];
578  }
579  }
580 
581  $this->lateBootService->makeCurrent(null, $backup);
582 
583  return new JsonResponse([
584  'brokenExtensions' => $brokenExtensions,
585  ], empty($brokenExtensions) ? 200 : 500);
586  }
587 
595  public function ‪extensionCompatTesterUninstallExtensionAction(ServerRequestInterface $request): ResponseInterface
596  {
597  $extension = $request->getParsedBody()['install']['extension'];
598  if (empty($extension)) {
599  throw new \RuntimeException(
600  'No extension given',
601  1505407269
602  );
603  }
604  $messageQueue = new FlashMessageQueue('install');
605  if (‪ExtensionManagementUtility::isLoaded($extension)) {
606  try {
608  GeneralUtility::makeInstance(ClearCacheService::class)->clearAll();
609  GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive();
610 
611  $messageQueue->enqueue(new FlashMessage(
612  'Extension "' . $extension . '" unloaded.',
613  '',
615  ));
616  } catch (\Exception $e) {
617  $messageQueue->enqueue(new FlashMessage(
618  $e->getMessage(),
619  '',
621  ));
622  }
623  }
624  return new JsonResponse([
625  'success' => true,
626  'status' => $messageQueue,
627  ]);
628  }
629 
636  public function ‪extensionScannerGetDataAction(ServerRequestInterface $request): ResponseInterface
637  {
638  $extensionsInTypo3conf = (new Finder())->directories()->in(‪Environment::getExtensionsPath())->depth(0)->sortByName();
639  $view = $this->‪initializeStandaloneView($request, 'Upgrade/ExtensionScanner.html');
640  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
641  $view->assignMultiple([
642  'extensionScannerExtensionList' => $extensionsInTypo3conf,
643  'extensionScannerFilesToken' => $formProtection->generateToken('installTool', 'extensionScannerFiles'),
644  'extensionScannerScanFileToken' => $formProtection->generateToken('installTool', 'extensionScannerScanFile'),
645  'extensionScannerMarkFullyScannedRestFilesToken' => $formProtection->generateToken('installTool', 'extensionScannerMarkFullyScannedRestFiles'),
646  ]);
647  return new JsonResponse([
648  'success' => true,
649  'html' => $view->render(),
650  'buttons' => [
651  [
652  'btnClass' => 'btn-default t3js-extensionScanner-scan-all',
653  'text' => 'Scan all',
654  ],
655  ],
656  ]);
657  }
658 
665  public function ‪extensionScannerFilesAction(ServerRequestInterface $request): ResponseInterface
666  {
667  // Get and validate path
668  $extension = $request->getParsedBody()['install']['extension'];
669  $extensionBasePath = ‪Environment::getExtensionsPath() . '/' . $extension;
670  if (empty($extension) || !GeneralUtility::isAllowedAbsPath($extensionBasePath)) {
671  throw new \RuntimeException(
672  'Path to extension ' . $extension . ' not allowed.',
673  1499777261
674  );
675  }
676  if (!is_dir($extensionBasePath)) {
677  throw new \RuntimeException(
678  'Extension path ' . $extensionBasePath . ' does not exist or is no directory.',
679  1499777330
680  );
681  }
682 
683  ‪$finder = new Finder();
684  $files = ‪$finder->files()->in($extensionBasePath)->name('*.php')->sortByName();
685  // A list of file names relative to extension directory
686  $relativeFileNames = [];
687  foreach ($files as $file) {
689  $relativeFileNames[] = GeneralUtility::fixWindowsFilePath($file->getRelativePathname());
690  }
691  return new JsonResponse([
692  'success' => true,
693  'files' => $relativeFileNames,
694  ]);
695  }
696 
706  public function ‪extensionScannerMarkFullyScannedRestFilesAction(ServerRequestInterface $request): ResponseInterface
707  {
708  $foundRestFileHashes = (array)$request->getParsedBody()['install']['hashes'];
709  // First un-mark files marked as scanned-ok
710  $registry = new Registry();
711  $registry->removeAllByNamespace('extensionScannerNotAffected');
712  // Find all .rst files (except those from v8), see if they are tagged with "FullyScanned"
713  // and if their content is not in incoming "hashes" array, mark as "not affected"
714  $documentationFile = new DocumentationFile();
715  ‪$finder = new Finder();
716  $restFilesBasePath = ‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog';
717  $restFiles = ‪$finder->files()->in($restFilesBasePath);
718  $fullyScannedRestFilesNotAffected = [];
719  foreach ($restFiles as $restFile) {
720  // Skip files in "8.x" directory
722  if (strpos($restFile->getRelativePath(), '8') === 0) {
723  continue;
724  }
725 
726  // Build array of file (hashes) not affected by current scan, if they are tagged as "FullyScanned"
727  $listEntries = $documentationFile->getListEntry(str_replace(
728  '\\',
729  '/',
730  (string)realpath($restFile->getPathname())
731  ));
732  $parsedRestFile = array_pop($listEntries);
733  if (!in_array($parsedRestFile['file_hash'], $foundRestFileHashes, true)
734  && in_array('FullyScanned', $parsedRestFile['tags'], true)
735  ) {
736  $fullyScannedRestFilesNotAffected[] = $parsedRestFile['file_hash'];
737  }
738  }
739  foreach ($fullyScannedRestFilesNotAffected as $fileHash) {
740  $registry->set('extensionScannerNotAffected', $fileHash, $fileHash);
741  }
742  return new JsonResponse([
743  'success' => true,
744  'markedAsNotAffected' => count($fullyScannedRestFilesNotAffected),
745  ]);
746  }
747 
754  public function ‪extensionScannerScanFileAction(ServerRequestInterface $request): ResponseInterface
755  {
756  // Get and validate path and file
757  $extension = $request->getParsedBody()['install']['extension'];
758  $extensionBasePath = ‪Environment::getExtensionsPath() . '/' . $extension;
759  if (empty($extension) || !GeneralUtility::isAllowedAbsPath($extensionBasePath)) {
760  throw new \RuntimeException(
761  'Path to extension ' . $extension . ' not allowed.',
762  1499789246
763  );
764  }
765  if (!is_dir($extensionBasePath)) {
766  throw new \RuntimeException(
767  'Extension path ' . $extensionBasePath . ' does not exist or is no directory.',
768  1499789259
769  );
770  }
771  $file = $request->getParsedBody()['install']['file'];
772  $absoluteFilePath = $extensionBasePath . '/' . $file;
773  if (empty($file) || !GeneralUtility::isAllowedAbsPath($absoluteFilePath)) {
774  throw new \RuntimeException(
775  'Path to file ' . $file . ' of extension ' . $extension . ' not allowed.',
776  1499789384
777  );
778  }
779  if (!is_file($absoluteFilePath)) {
780  throw new \RuntimeException(
781  'File ' . $file . ' not found or is not a file.',
782  1499789433
783  );
784  }
785 
786  ‪$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
787  // Parse PHP file to AST and traverse tree calling visitors
788  $statements = ‪$parser->parse(file_get_contents($absoluteFilePath));
789 
790  // The built in NameResolver translates class names shortened with 'use' to fully qualified
791  // class names at all places. Incredibly useful for us and added as first visitor.
792  // IMPORTANT: first process completely to resolve fully qualified names of arguments
793  // (otherwise GeneratorClassesResolver will NOT get reliable results)
794  $traverser = new NodeTraverser();
795  $traverser->addVisitor(new NameResolver());
796  $statements = $traverser->traverse($statements);
797 
798  // IMPORTANT: second process to actually work on the pre-resolved statements
799  $traverser = new NodeTraverser();
800  // Understand GeneralUtility::makeInstance('My\\Package\\Foo\\Bar') as fqdn class name in first argument
801  $traverser->addVisitor(new GeneratorClassesResolver());
802  // Count ignored lines, effective code lines, ...
803  $statistics = new CodeStatistics();
804  $traverser->addVisitor($statistics);
805 
806  // Add all configured matcher classes
807  $matcherFactory = new MatcherFactory();
808  ‪$matchers = $matcherFactory->createAll($this->matchers);
809  foreach (‪$matchers as $matcher) {
810  $traverser->addVisitor($matcher);
811  }
812 
813  $traverser->traverse($statements);
814 
815  // Gather code matches
816  $matches = [[]];
817  foreach (‪$matchers as $matcher) {
819  $matches[] = $matcher->getMatches();
820  }
821  $matches = array_merge(...$matches);
822 
823  // Prepare match output
824  $restFilesBasePath = ‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog';
825  $documentationFile = new DocumentationFile();
826  $preparedMatches = [];
827  foreach ($matches as $match) {
828  $preparedHit = [];
829  $preparedHit['uniqueId'] = ‪StringUtility::getUniqueId();
830  $preparedHit['message'] = $match['message'];
831  $preparedHit['line'] = $match['line'];
832  $preparedHit['indicator'] = $match['indicator'];
833  $preparedHit['lineContent'] = $this->‪extensionScannerGetLineFromFile($absoluteFilePath, $match['line']);
834  $preparedHit['restFiles'] = [];
835  foreach ($match['restFiles'] as $fileName) {
836  ‪$finder = new Finder();
837  $restFileLocation = ‪$finder->files()->in($restFilesBasePath)->name($fileName);
838  if ($restFileLocation->count() !== 1) {
839  throw new \RuntimeException(
840  'ResT file ' . $fileName . ' not found or multiple files found.',
841  1499803909
842  );
843  }
844  foreach ($restFileLocation as $restFile) {
846  $restFileLocation = $restFile->getPathname();
847  break;
848  }
849  $listEntries = $documentationFile->getListEntry(str_replace(
850  '\\',
851  '/',
852  (string)realpath($restFileLocation)
853  ));
854  $parsedRestFile = array_pop($listEntries);
855  $version = ‪GeneralUtility::trimExplode(DIRECTORY_SEPARATOR, $restFileLocation);
856  array_pop($version);
857  // something like "8.2" .. "8.7" .. "master"
858  $parsedRestFile['version'] = array_pop($version);
859  $parsedRestFile['uniqueId'] = ‪StringUtility::getUniqueId();
860  $preparedHit['restFiles'][] = $parsedRestFile;
861  }
862  $preparedMatches[] = $preparedHit;
863  }
864  return new JsonResponse([
865  'success' => true,
866  'matches' => $preparedMatches,
867  'isFileIgnored' => $statistics->isFileIgnored(),
868  'effectiveCodeLines' => $statistics->getNumberOfEffectiveCodeLines(),
869  'ignoredLines' => $statistics->getNumberOfIgnoredLines(),
870  ]);
871  }
872 
879  public function ‪tcaExtTablesCheckAction(ServerRequestInterface $request): ResponseInterface
880  {
881  $view = $this->‪initializeStandaloneView($request, 'Upgrade/TcaExtTablesCheck.html');
882  $messageQueue = new FlashMessageQueue('install');
883  $loadTcaService = GeneralUtility::makeInstance(LoadTcaService::class);
884  $loadTcaService->loadExtensionTablesWithoutMigration();
885  $baseTca = ‪$GLOBALS['TCA'];
886  $container = $this->lateBootService->getContainer();
887  $backup = $this->lateBootService->makeCurrent($container);
888  foreach ($this->packageManager->getActivePackages() as $package) {
890 
891  $extensionKey = $package->getPackageKey();
892  $extTablesPath = $package->getPackagePath() . 'ext_tables.php';
893  if (@file_exists($extTablesPath)) {
894  $loadTcaService->loadSingleExtTablesFile($extensionKey);
895  $newTca = ‪$GLOBALS['TCA'];
896  if ($newTca !== $baseTca) {
897  $messageQueue->enqueue(new FlashMessage(
898  '',
899  $extensionKey,
901  ));
902  }
903  $baseTca = $newTca;
904  }
905  }
906  $this->lateBootService->makeCurrent(null, $backup);
907  return new JsonResponse([
908  'success' => true,
909  'status' => $messageQueue,
910  'html' => $view->render(),
911  'buttons' => [
912  [
913  'btnClass' => 'btn-default t3js-tcaExtTablesCheck-check',
914  'text' => 'Check loaded extensions',
915  ],
916  ],
917  ]);
918  }
919 
926  public function ‪tcaMigrationsCheckAction(ServerRequestInterface $request): ResponseInterface
927  {
928  $view = $this->‪initializeStandaloneView($request, 'Upgrade/TcaMigrationsCheck.html');
929  $messageQueue = new FlashMessageQueue('install');
930  GeneralUtility::makeInstance(LoadTcaService::class)->loadExtensionTablesWithoutMigration();
931  $tcaMigration = GeneralUtility::makeInstance(TcaMigration::class);
932  ‪$GLOBALS['TCA'] = $tcaMigration->migrate(‪$GLOBALS['TCA']);
933  $tcaMessages = $tcaMigration->getMessages();
934  foreach ($tcaMessages as $tcaMessage) {
935  $messageQueue->enqueue(new FlashMessage(
936  '',
937  $tcaMessage,
939  ));
940  }
941  return new JsonResponse([
942  'success' => true,
943  'status' => $messageQueue,
944  'html' => $view->render(),
945  'buttons' => [
946  [
947  'btnClass' => 'btn-default t3js-tcaMigrationsCheck-check',
948  'text' => 'Check TCA Migrations',
949  ],
950  ],
951  ]);
952  }
953 
960  public function ‪upgradeDocsGetContentAction(ServerRequestInterface $request): ResponseInterface
961  {
962  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
963  $documentationDirectories = $this->‪getDocumentationDirectories();
964  $view = $this->‪initializeStandaloneView($request, 'Upgrade/UpgradeDocsGetContent.html');
965  $view->assignMultiple([
966  'upgradeDocsMarkReadToken' => $formProtection->generateToken('installTool', 'upgradeDocsMarkRead'),
967  'upgradeDocsUnmarkReadToken' => $formProtection->generateToken('installTool', 'upgradeDocsUnmarkRead'),
968  'upgradeDocsVersions' => $documentationDirectories,
969  ]);
970  return new JsonResponse([
971  'success' => true,
972  'html' => $view->render(),
973  ]);
974  }
975 
982  public function ‪upgradeDocsGetChangelogForVersionAction(ServerRequestInterface $request): ResponseInterface
983  {
984  $version = $request->getQueryParams()['install']['version'] ?? '';
985  $this->‪assertValidVersion($version);
986 
987  $documentationFiles = $this->‪getDocumentationFiles($version);
988  $view = $this->‪initializeStandaloneView($request, 'Upgrade/UpgradeDocsGetChangelogForVersion.html');
989  $view->assignMultiple([
990  'upgradeDocsFiles' => $documentationFiles['normalFiles'],
991  'upgradeDocsReadFiles' => $documentationFiles['readFiles'],
992  'upgradeDocsNotAffectedFiles' => $documentationFiles['notAffectedFiles'],
993  ]);
994  return new JsonResponse([
995  'success' => true,
996  'html' => $view->render(),
997  ]);
998  }
999 
1006  public function ‪upgradeDocsMarkReadAction(ServerRequestInterface $request): ResponseInterface
1007  {
1008  $registry = new Registry();
1009  $filePath = $request->getParsedBody()['install']['ignoreFile'];
1010  $fileHash = md5_file($filePath);
1011  $registry->set('upgradeAnalysisIgnoredFiles', $fileHash, $filePath);
1012  return new JsonResponse([
1013  'success' => true,
1014  ]);
1015  }
1016 
1023  public function ‪upgradeDocsUnmarkReadAction(ServerRequestInterface $request): ResponseInterface
1024  {
1025  $registry = new Registry();
1026  $filePath = $request->getParsedBody()['install']['ignoreFile'];
1027  $fileHash = md5_file($filePath);
1028  $registry->remove('upgradeAnalysisIgnoredFiles', $fileHash);
1029  return new JsonResponse([
1030  'success' => true,
1031  ]);
1032  }
1039  public function ‪upgradeWizardsBlockingDatabaseAddsAction(): ResponseInterface
1040  {
1041  // ext_localconf, db and ext_tables must be loaded for the updates :(
1042  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
1043  $adds = [];
1044  $needsUpdate = false;
1045  try {
1046  $adds = $this->upgradeWizardsService->getBlockingDatabaseAdds();
1047  $this->lateBootService->resetGlobalContainer();
1048  if (!empty($adds)) {
1049  $needsUpdate = true;
1050  }
1051  } catch (‪StatementException $exception) {
1052  $needsUpdate = true;
1053  }
1054  return new ‪JsonResponse([
1055  'success' => true,
1056  'needsUpdate' => $needsUpdate,
1057  'adds' => $adds,
1058  ]);
1059  }
1066  public function ‪upgradeWizardsBlockingDatabaseExecuteAction(): ResponseInterface
1067  {
1068  // ext_localconf, db and ext_tables must be loaded for the updates :(
1069  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
1070  ‪$errors = $this->upgradeWizardsService->addMissingTablesAndFields();
1071  $this->lateBootService->resetGlobalContainer();
1072  $messages = new ‪FlashMessageQueue('install');
1073  // Discard empty values which indicate success
1074  ‪$errors = array_filter(‪$errors);
1075  $success = count(‪$errors) === 0;
1076  if ($success) {
1077  $messages->enqueue(new ‪FlashMessage(
1078  '',
1079  'Added missing database fields and tables'
1080  ));
1081  } else {
1082  foreach (‪$errors as $query => $error) {
1083  $messages->enqueue(new ‪FlashMessage(
1084  'Error: ' . $error,
1085  'Failed to execute: ' . $query,
1087  ));
1088  }
1089  }
1090  return new ‪JsonResponse([
1091  'success' => $success,
1092  'status' => $messages,
1093  ]);
1094  }
1101  public function ‪upgradeWizardsBlockingDatabaseCharsetFixAction(): ResponseInterface
1102  {
1103  $this->upgradeWizardsService->setDatabaseCharsetUtf8();
1104  $messages = new ‪FlashMessageQueue('install');
1105  $messages->enqueue(new ‪FlashMessage(
1106  '',
1107  'Default connection database has been set to utf8'
1108  ));
1109  return new ‪JsonResponse([
1110  'success' => true,
1111  'status' => $messages,
1112  ]);
1113  }
1120  public function ‪upgradeWizardsBlockingDatabaseCharsetTestAction(): ResponseInterface
1121  {
1122  $result = !$this->upgradeWizardsService->isDatabaseCharsetUtf8();
1123  return new ‪JsonResponse([
1124  'success' => true,
1125  'needsUpdate' => $result,
1126  ]);
1127  }
1134  public function ‪upgradeWizardsDoneUpgradesAction(): ResponseInterface
1135  {
1136  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
1137  $wizardsDone = $this->upgradeWizardsService->listOfWizardsDone();
1138  $rowUpdatersDone = $this->upgradeWizardsService->listOfRowUpdatersDone();
1139  $this->lateBootService->resetGlobalContainer();
1140  $messages = new ‪FlashMessageQueue('install');
1141  if (empty($wizardsDone) && empty($rowUpdatersDone)) {
1142  $messages->enqueue(new ‪FlashMessage(
1143  '',
1144  'No wizards are marked as done'
1145  ));
1146  }
1147  return new ‪JsonResponse([
1148  'success' => true,
1149  'status' => $messages,
1150  'wizardsDone' => $wizardsDone,
1151  'rowUpdatersDone' => $rowUpdatersDone,
1152  ]);
1153  }
1154 
1161  public function ‪upgradeWizardsExecuteAction(ServerRequestInterface $request): ResponseInterface
1162  {
1163  // ext_localconf, db and ext_tables must be loaded for the updates :(
1164  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
1165  $identifier = $request->getParsedBody()['install']['identifier'];
1166  $messages = $this->upgradeWizardsService->executeWizard($identifier);
1167  $this->lateBootService->resetGlobalContainer();
1168  return new ‪JsonResponse([
1169  'success' => true,
1170  'status' => $messages,
1171  ]);
1172  }
1173 
1180  public function ‪upgradeWizardsInputAction(ServerRequestInterface $request): ResponseInterface
1181  {
1182  // ext_localconf, db and ext_tables must be loaded for the updates :(
1183  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
1184  $identifier = $request->getParsedBody()['install']['identifier'];
1185  $result = $this->upgradeWizardsService->getWizardUserInput($identifier);
1186  $this->lateBootService->resetGlobalContainer();
1187  return new JsonResponse([
1188  'success' => true,
1189  'status' => [],
1190  'userInput' => $result,
1191  ]);
1192  }
1199  public function ‪upgradeWizardsListAction(): ResponseInterface
1200  {
1201  // ext_localconf, db and ext_tables must be loaded for the updates :(
1202  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
1203  $wizards = $this->upgradeWizardsService->getUpgradeWizardsList();
1204  $this->lateBootService->resetGlobalContainer();
1205  return new ‪JsonResponse([
1206  'success' => true,
1207  'status' => [],
1208  'wizards' => $wizards,
1209  ]);
1210  }
1211 
1218  public function ‪upgradeWizardsMarkUndoneAction(ServerRequestInterface $request): ResponseInterface
1219  {
1220  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
1221  $wizardToBeMarkedAsUndoneIdentifier = $request->getParsedBody()['install']['identifier'];
1222  $wizardToBeMarkedAsUndone = $this->upgradeWizardsService->getWizardInformationByIdentifier($wizardToBeMarkedAsUndoneIdentifier);
1223  $result = $this->upgradeWizardsService->markWizardUndone($wizardToBeMarkedAsUndoneIdentifier);
1224  $this->lateBootService->resetGlobalContainer();
1225  $messages = new ‪FlashMessageQueue('install');
1226  if ($result) {
1227  $messages->enqueue(new ‪FlashMessage(
1228  'The wizard "' . $wizardToBeMarkedAsUndone['title'] . '" has been marked as undone.',
1229  'Wizard marked as undone'
1230  ));
1231  } else {
1232  $messages->enqueue(new FlashMessage(
1233  'The wizard "' . $wizardToBeMarkedAsUndone['title'] . '" has not been marked as undone.',
1234  'Wizard has not been marked undone',
1236  ));
1237  }
1238  return new JsonResponse([
1239  'success' => true,
1240  'status' => $messages,
1241  ]);
1242  }
1243 
1250  public function ‪upgradeWizardsGetDataAction(ServerRequestInterface $request): ResponseInterface
1251  {
1252  $view = $this->‪initializeStandaloneView($request, 'Upgrade/UpgradeWizards.html');
1253  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
1254  $view->assignMultiple([
1255  'upgradeWizardsMarkUndoneToken' => $formProtection->generateToken('installTool', 'upgradeWizardsMarkUndone'),
1256  'upgradeWizardsInputToken' => $formProtection->generateToken('installTool', 'upgradeWizardsInput'),
1257  'upgradeWizardsExecuteToken' => $formProtection->generateToken('installTool', 'upgradeWizardsExecute'),
1258  ]);
1259  return new JsonResponse([
1260  'success' => true,
1261  'html' => $view->render(),
1262  ]);
1263  }
1270  protected function ‪coreUpdateInitialize()
1271  {
1272  $this->coreUpdateService = GeneralUtility::makeInstance(CoreUpdateService::class);
1273  $this->coreVersionService = GeneralUtility::makeInstance(CoreVersionService::class);
1274  if (!$this->coreUpdateService->isCoreUpdateEnabled()) {
1275  throw new \RuntimeException(
1276  'Core Update disabled in this environment',
1277  1381609294
1278  );
1279  }
1280  // @todo: Does the core updater really depend on loaded ext_* files?
1281  $this->lateBootService->loadExtLocalconfDatabaseAndExtTables();
1282  }
1283 
1292  protected function ‪coreUpdateGetVersionToHandle(ServerRequestInterface $request): ‪CoreRelease
1293  {
1294  $type = $request->getQueryParams()['install']['type'];
1295  if (!isset($type) || empty($type)) {
1296  throw new \RuntimeException(
1297  'Type must be set to either "regular" or "development"',
1298  1380975303
1299  );
1300  }
1301  return $this->coreVersionService->getYoungestCommunityPatchRelease();
1302  }
1303 
1310  protected function ‪extensionCompatTesterLoadExtLocalconfForExtension(PackageInterface $package)
1311  {
1312  $extLocalconfPath = $package->getPackagePath() . 'ext_localconf.php';
1313  if (@file_exists($extLocalconfPath)) {
1314  require $extLocalconfPath;
1315  }
1316  }
1317 
1324  protected function ‪extensionCompatTesterLoadExtTablesForExtension(PackageInterface $package)
1325  {
1326  $extTablesPath = $package->getPackagePath() . 'ext_tables.php';
1327  if (@file_exists($extTablesPath)) {
1328  require $extTablesPath;
1329  }
1330  }
1331 
1335  protected function ‪getDocumentationDirectories(): array
1336  {
1337  $documentationFileService = new DocumentationFile();
1338  $documentationDirectories = $documentationFileService->findDocumentationDirectories(
1339  str_replace('\\', '/', (string)realpath(‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog'))
1340  );
1341  return array_reverse($documentationDirectories);
1342  }
1343 
1350  protected function ‪getDocumentationFiles(string $version): array
1351  {
1352  $documentationFileService = new DocumentationFile();
1353  $documentationFiles = $documentationFileService->findDocumentationFiles(
1354  str_replace('\\', '/', (string)realpath(‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog/' . $version))
1355  );
1356 
1357  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_registry');
1358  $filesMarkedAsRead = $queryBuilder
1359  ->select('*')
1360  ->from('sys_registry')
1361  ->where(
1362  $queryBuilder->expr()->eq(
1363  'entry_namespace',
1364  $queryBuilder->createNamedParameter('upgradeAnalysisIgnoredFiles', \PDO::PARAM_STR)
1365  )
1366  )
1367  ->execute()
1368  ->fetchAll();
1369  $hashesMarkedAsRead = [];
1370  foreach ($filesMarkedAsRead as $file) {
1371  $hashesMarkedAsRead[] = $file['entry_key'];
1372  }
1373 
1374  $fileMarkedAsNotAffected = $queryBuilder
1375  ->select('*')
1376  ->from('sys_registry')
1377  ->where(
1378  $queryBuilder->expr()->eq(
1379  'entry_namespace',
1380  $queryBuilder->createNamedParameter('extensionScannerNotAffected', \PDO::PARAM_STR)
1381  )
1382  )
1383  ->execute()
1384  ->fetchAll();
1385  $hashesMarkedAsNotAffected = [];
1386  foreach ($fileMarkedAsNotAffected as $file) {
1387  $hashesMarkedAsNotAffected[] = $file['entry_key'];
1388  }
1389 
1390  $readFiles = [];
1391  $notAffectedFiles = [];
1392  foreach ($documentationFiles as $fileId => $fileData) {
1393  if (in_array($fileData['file_hash'], $hashesMarkedAsRead, true)) {
1394  $readFiles[$fileId] = $fileData;
1395  unset($documentationFiles[$fileId]);
1396  } elseif (in_array($fileData['file_hash'], $hashesMarkedAsNotAffected, true)) {
1397  $notAffectedFiles[$fileId] = $fileData;
1398  unset($documentationFiles[$fileId]);
1399  }
1400  }
1401 
1402  return [
1403  'normalFiles' => $documentationFiles,
1404  'readFiles' => $readFiles,
1405  'notAffectedFiles' => $notAffectedFiles,
1406  ];
1407  }
1408 
1416  protected function ‪extensionScannerGetLineFromFile(string $file, int $lineNumber): string
1417  {
1418  $fileContent = file($file, FILE_IGNORE_NEW_LINES);
1419  $line = '';
1420  if (isset($fileContent[$lineNumber - 1])) {
1421  $line = trim($fileContent[$lineNumber - 1]);
1422  }
1423  return $line;
1424  }
1425 
1432  protected function ‪assertValidVersion(string $version): void
1433  {
1434  if ($version !== 'master' && !preg_match('/^\d+.\d+(?:.(?:\d+|x))?$/', $version)) {
1435  throw new \InvalidArgumentException('Given version "' . $version . '" is invalid', 1537209128);
1436  }
1437  }
1438 }
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsListAction
‪ResponseInterface upgradeWizardsListAction()
Definition: UpgradeController.php:1193
‪TYPO3\CMS\Install\ExtensionScanner\Php\GeneratorClassesResolver
Definition: GeneratorClassesResolver.php:41
‪TYPO3\CMS\Install\Controller\UpgradeController\$upgradeWizardsService
‪UpgradeWizardsService $upgradeWizardsService
Definition: UpgradeController.php:91
‪TYPO3\CMS\Install\Controller\UpgradeController\$coreVersionService
‪CoreVersionService $coreVersionService
Definition: UpgradeController.php:87
‪TYPO3\CMS\Core\Migrations\TcaMigration
Definition: TcaMigration.php:26
‪TYPO3\CMS\Install\Controller\AbstractController\initializeStandaloneView
‪StandaloneView initializeStandaloneView(ServerRequestInterface $request, string $templatePath)
Definition: AbstractController.php:40
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get
‪static TYPO3 CMS Core FormProtection AbstractFormProtection get($classNameOrType='default',... $constructorArguments)
Definition: FormProtectionFactory.php:74
‪TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics
Definition: CodeStatistics.php:30
‪$finder
‪if(PHP_SAPI !=='cli') $finder
Definition: header-comment.php:22
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodCallStaticMatcher
Definition: MethodCallStaticMatcher.php:38
‪TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile
Definition: DocumentationFile.php:33
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static string getPublicPath()
Definition: Environment.php:180
‪TYPO3\CMS\Core\Database\Schema\Exception\StatementException
Definition: StatementException.php:24
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerMarkFullyScannedRestFilesAction
‪ResponseInterface extensionScannerMarkFullyScannedRestFilesAction(ServerRequestInterface $request)
Definition: UpgradeController.php:700
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\unloadExtension
‪static unloadExtension($extensionKey)
Definition: ExtensionManagementUtility.php:1883
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterUninstallExtensionAction
‪ResponseInterface extensionCompatTesterUninstallExtensionAction(ServerRequestInterface $request)
Definition: UpgradeController.php:589
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateUnpackAction
‪ResponseInterface coreUpdateUnpackAction(ServerRequestInterface $request)
Definition: UpgradeController.php:465
‪TYPO3\CMS\Install\Controller\UpgradeController
Definition: UpgradeController.php:80
‪TYPO3\CMS\Install\Controller\UpgradeController\$matchers
‪array $matchers
Definition: UpgradeController.php:116
‪TYPO3\CMS\Core\Registry
Definition: Registry.php:33
‪TYPO3\CMS\Core\Package\PackageInterface\getPackagePath
‪string getPackagePath()
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateInitialize
‪coreUpdateInitialize()
Definition: UpgradeController.php:1264
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadedExtensionListAction
‪ResponseInterface extensionCompatTesterLoadedExtensionListAction(ServerRequestInterface $request)
Definition: UpgradeController.php:495
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetDataAction
‪ResponseInterface coreUpdateGetDataAction(ServerRequestInterface $request)
Definition: UpgradeController.php:266
‪$parser
‪$parser
Definition: annotationChecker.php:108
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateVerifyChecksumAction
‪ResponseInterface coreUpdateVerifyChecksumAction(ServerRequestInterface $request)
Definition: UpgradeController.php:480
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseCharsetTestAction
‪ResponseInterface upgradeWizardsBlockingDatabaseCharsetTestAction()
Definition: UpgradeController.php:1114
‪TYPO3\CMS\Install\Controller\UpgradeController\__construct
‪__construct(PackageManager $packageManager, LateBootService $lateBootService, UpgradeWizardsService $upgradeWizardsService)
Definition: UpgradeController.php:101
‪TYPO3\CMS\Install\Controller\UpgradeController\cardsAction
‪ResponseInterface cardsAction(ServerRequestInterface $request)
Definition: UpgradeController.php:205
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsMarkReadAction
‪ResponseInterface upgradeDocsMarkReadAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1000
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerFilesAction
‪ResponseInterface extensionScannerFilesAction(ServerRequestInterface $request)
Definition: UpgradeController.php:659
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateActivateAction
‪ResponseInterface coreUpdateActivateAction(ServerRequestInterface $request)
Definition: UpgradeController.php:221
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsGetContentAction
‪ResponseInterface upgradeDocsGetContentAction(ServerRequestInterface $request)
Definition: UpgradeController.php:954
‪TYPO3\CMS\Install\CoreVersion\CoreRelease
Definition: CoreRelease.php:21
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtTablesAction
‪ResponseInterface extensionCompatTesterLoadExtTablesAction(ServerRequestInterface $request)
Definition: UpgradeController.php:553
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerGetLineFromFile
‪string extensionScannerGetLineFromFile(string $file, int $lineNumber)
Definition: UpgradeController.php:1410
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseCharsetFixAction
‪ResponseInterface upgradeWizardsBlockingDatabaseCharsetFixAction()
Definition: UpgradeController.php:1095
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyExistsStaticMatcher
Definition: PropertyExistsStaticMatcher.php:29
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsGetChangelogForVersionAction
‪ResponseInterface upgradeDocsGetChangelogForVersionAction(ServerRequestInterface $request)
Definition: UpgradeController.php:976
‪TYPO3\CMS\Core\Package\PackageInterface
Definition: PackageInterface.php:22
‪TYPO3\CMS\Core\FormProtection\InstallToolFormProtection
Definition: InstallToolFormProtection.php:61
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentRequiredMatcher
Definition: MethodArgumentRequiredMatcher.php:30
‪TYPO3\CMS\Install\Service\UpgradeWizardsService
Definition: UpgradeWizardsService.php:43
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateDownloadAction
‪ResponseInterface coreUpdateDownloadAction(ServerRequestInterface $request)
Definition: UpgradeController.php:251
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:43
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodAnnotationMatcher
Definition: MethodAnnotationMatcher.php:29
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ConstantMatcher
Definition: ConstantMatcher.php:30
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsDoneUpgradesAction
‪ResponseInterface upgradeWizardsDoneUpgradesAction()
Definition: UpgradeController.php:1128
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyAnnotationMatcher
Definition: PropertyAnnotationMatcher.php:30
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtTablesForExtension
‪extensionCompatTesterLoadExtTablesForExtension(PackageInterface $package)
Definition: UpgradeController.php:1318
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ClassNameMatcher
Definition: ClassNameMatcher.php:28
‪TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING
‪const WARNING
Definition: AbstractMessage.php:30
‪TYPO3\CMS\Install\Service\CoreUpdateService\isCoreUpdateEnabled
‪bool isCoreUpdateEnabled()
Definition: CoreUpdateService.php:81
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsMarkUndoneAction
‪ResponseInterface upgradeWizardsMarkUndoneAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1212
‪TYPO3\CMS\Install\Exception
Definition: Exception.php:24
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsGetDataAction
‪ResponseInterface upgradeWizardsGetDataAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1244
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyPublicMatcher
Definition: PropertyPublicMatcher.php:29
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodCallMatcher
Definition: MethodCallMatcher.php:30
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseAddsAction
‪ResponseInterface upgradeWizardsBlockingDatabaseAddsAction()
Definition: UpgradeController.php:1033
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentDroppedMatcher
Definition: MethodArgumentDroppedMatcher.php:31
‪TYPO3\CMS\Install\Controller
Definition: AbstractController.php:18
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ArrayGlobalMatcher
Definition: ArrayGlobalMatcher.php:31
‪TYPO3\CMS\Install\Controller\UpgradeController\assertValidVersion
‪assertValidVersion(string $version)
Definition: UpgradeController.php:1426
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateMoveAction
‪ResponseInterface coreUpdateMoveAction(ServerRequestInterface $request)
Definition: UpgradeController.php:450
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsUnmarkReadAction
‪ResponseInterface upgradeDocsUnmarkReadAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1017
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentRequiredStaticMatcher
Definition: MethodArgumentRequiredStaticMatcher.php:31
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateIsUpdateAvailableAction
‪ResponseInterface coreUpdateIsUpdateAvailableAction()
Definition: UpgradeController.php:310
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentDroppedStaticMatcher
Definition: MethodArgumentDroppedStaticMatcher.php:31
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateCheckPreConditionsAction
‪ResponseInterface coreUpdateCheckPreConditionsAction(ServerRequestInterface $request)
Definition: UpgradeController.php:236
‪TYPO3\CMS\Install\Service\LateBootService
Definition: LateBootService.php:34
‪TYPO3\CMS\Core\Service\OpcodeCacheService
Definition: OpcodeCacheService.php:25
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerGetDataAction
‪ResponseInterface extensionScannerGetDataAction(ServerRequestInterface $request)
Definition: UpgradeController.php:630
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\FunctionCallMatcher
Definition: FunctionCallMatcher.php:30
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ConstructorArgumentMatcher
Definition: ConstructorArgumentMatcher.php:37
‪TYPO3\CMS\Install\ExtensionScanner\Php\MatcherFactory
Definition: MatcherFactory.php:29
‪TYPO3\CMS\Install\Service\LoadTcaService
Definition: LoadTcaService.php:27
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ClassConstantMatcher
Definition: ClassConstantMatcher.php:31
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtLocalconfForExtension
‪extensionCompatTesterLoadExtLocalconfForExtension(PackageInterface $package)
Definition: UpgradeController.php:1304
‪$errors
‪$errors
Definition: annotationChecker.php:121
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static string[] trimExplode($delim, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:1059
‪TYPO3\CMS\Install\Service\CoreUpdateService
Definition: CoreUpdateService.php:40
‪TYPO3\CMS\Core\Core\Environment\isComposerMode
‪static bool isComposerMode()
Definition: Environment.php:144
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:28
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:24
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:47
‪TYPO3\CMS\Install\Controller\UpgradeController\$lateBootService
‪LateBootService $lateBootService
Definition: UpgradeController.php:99
‪TYPO3\CMS\Install\Controller\UpgradeController\getDocumentationFiles
‪array getDocumentationFiles(string $version)
Definition: UpgradeController.php:1344
‪TYPO3\CMS\Core\Http\JsonResponse
Definition: JsonResponse.php:26
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentUnusedMatcher
Definition: MethodArgumentUnusedMatcher.php:33
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ArrayDimensionMatcher
Definition: ArrayDimensionMatcher.php:31
‪TYPO3\CMS\Install\Controller\UpgradeController\tcaMigrationsCheckAction
‪ResponseInterface tcaMigrationsCheckAction(ServerRequestInterface $request)
Definition: UpgradeController.php:920
‪TYPO3\CMS\Install\Controller\AbstractController
Definition: AbstractController.php:31
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath
‪static string extPath($key, $script='')
Definition: ExtensionManagementUtility.php:127
‪TYPO3\CMS\Core\Messaging\AbstractMessage\NOTICE
‪const NOTICE
Definition: AbstractMessage.php:27
‪TYPO3\CMS\Install\Controller\UpgradeController\tcaExtTablesCheckAction
‪ResponseInterface tcaExtTablesCheckAction(ServerRequestInterface $request)
Definition: UpgradeController.php:873
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtLocalconfAction
‪ResponseInterface extensionCompatTesterLoadExtLocalconfAction(ServerRequestInterface $request)
Definition: UpgradeController.php:523
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetVersionToHandle
‪CoreRelease coreUpdateGetVersionToHandle(ServerRequestInterface $request)
Definition: UpgradeController.php:1286
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsInputAction
‪ResponseInterface upgradeWizardsInputAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1174
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsExecuteAction
‪ResponseInterface upgradeWizardsExecuteAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1155
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:29
‪TYPO3\CMS\Install\Service\ClearCacheService
Definition: ClearCacheService.php:29
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded
‪static bool isLoaded($key)
Definition: ExtensionManagementUtility.php:114
‪TYPO3\CMS\Install\Controller\UpgradeController\$packageManager
‪PackageManager $packageManager
Definition: UpgradeController.php:95
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\InterfaceMethodChangedMatcher
Definition: InterfaceMethodChangedMatcher.php:35
‪TYPO3\CMS\Install\Controller\UpgradeController\$coreUpdateService
‪CoreUpdateService $coreUpdateService
Definition: UpgradeController.php:83
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseExecuteAction
‪ResponseInterface upgradeWizardsBlockingDatabaseExecuteAction()
Definition: UpgradeController.php:1060
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:31
‪TYPO3\CMS\Core\Core\Environment\getExtensionsPath
‪static string getExtensionsPath()
Definition: Environment.php:271
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyProtectedMatcher
Definition: PropertyProtectedMatcher.php:30
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerScanFileAction
‪ResponseInterface extensionScannerScanFileAction(ServerRequestInterface $request)
Definition: UpgradeController.php:748
‪TYPO3\CMS\Install\Controller\UpgradeController\getDocumentationDirectories
‪string[] getDocumentationDirectories()
Definition: UpgradeController.php:1329