‪TYPO3CMS  9.5
UpgradeController.php
Go to the documentation of this file.
1 <?php
2 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 
18 use PhpParser\NodeTraverser;
19 use PhpParser\NodeVisitor\NameResolver;
20 use PhpParser\ParserFactory;
21 use Psr\Http\Message\ResponseInterface;
22 use Psr\Http\Message\ServerRequestInterface;
23 use Symfony\Component\Finder\Finder;
24 use Symfony\Component\Finder\SplFileInfo;
35 use TYPO3\CMS\Core\Package\PackageManager;
66 use TYPO3\CMS\Install\Service\CoreVersionService;
70 
76 {
80  protected ‪$coreUpdateService;
81 
85  protected ‪$coreVersionService;
86 
90  protected ‪$packageManager;
91 
95  public function ‪__construct(PackageManager ‪$packageManager = null)
96  {
97  $this->packageManager = ‪$packageManager ?? GeneralUtility::makeInstance(PackageManager::class);
98  }
99 
106  protected ‪$matchers = [
107  [
108  'class' => ArrayDimensionMatcher::class,
109  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php',
110  ],
111  [
112  'class' => ArrayGlobalMatcher::class,
113  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php',
114  ],
115  [
116  'class' => ClassConstantMatcher::class,
117  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ClassConstantMatcher.php',
118  ],
119  [
120  'class' => ClassNameMatcher::class,
121  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php',
122  ],
123  [
124  'class' => ConstantMatcher::class,
125  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ConstantMatcher.php',
126  ],
127  [
128  'class' => ConstructorArgumentMatcher::class,
129  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ConstructorArgumentMatcher.php',
130  ],
131  [
132  'class' => PropertyAnnotationMatcher::class,
133  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyAnnotationMatcher.php',
134  ],
135  [
136  'class' => MethodAnnotationMatcher::class,
137  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodAnnotationMatcher.php',
138  ],
139  [
140  'class' => FunctionCallMatcher::class,
141  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/FunctionCallMatcher.php',
142  ],
143  [
144  'class' => InterfaceMethodChangedMatcher::class,
145  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/InterfaceMethodChangedMatcher.php',
146  ],
147  [
148  'class' => MethodArgumentDroppedMatcher::class,
149  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedMatcher.php',
150  ],
151  [
152  'class' => MethodArgumentDroppedStaticMatcher::class,
153  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedStaticMatcher.php',
154  ],
155  [
156  'class' => MethodArgumentRequiredMatcher::class,
157  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredMatcher.php',
158  ],
159  [
160  'class' => MethodArgumentRequiredStaticMatcher::class,
161  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredStaticMatcher.php',
162  ],
163  [
164  'class' => MethodArgumentUnusedMatcher::class,
165  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentUnusedMatcher.php',
166  ],
167  [
168  'class' => MethodCallMatcher::class,
169  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php',
170  ],
171  [
172  'class' => MethodCallStaticMatcher::class,
173  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php',
174  ],
175  [
176  'class' => PropertyExistsStaticMatcher::class,
177  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyExistsStaticMatcher.php'
178  ],
179  [
180  'class' => PropertyProtectedMatcher::class,
181  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php',
182  ],
183  [
184  'class' => PropertyPublicMatcher::class,
185  'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php',
186  ],
187  ];
188 
195  public function ‪cardsAction(ServerRequestInterface $request): ResponseInterface
196  {
197  $view = $this->‪initializeStandaloneView($request, 'Upgrade/Cards.html');
198  $view->assign('extensionFoldersInTypo3conf', (new Finder())->directories()->in(‪Environment::getExtensionsPath())->depth(0)->count());
199  return new ‪JsonResponse([
200  'success' => true,
201  'html' => $view->render(),
202  ]);
203  }
204 
211  public function ‪coreUpdateActivateAction(ServerRequestInterface $request): ResponseInterface
212  {
213  $this->‪coreUpdateInitialize();
214  return new ‪JsonResponse([
215  'success' => $this->coreUpdateService->activateVersion($this->coreUpdateGetVersionToHandle($request)),
216  'status' => $this->coreUpdateService->getMessages(),
217  ]);
218  }
219 
226  public function ‪coreUpdateCheckPreConditionsAction(ServerRequestInterface $request): ResponseInterface
227  {
228  $this->‪coreUpdateInitialize();
229  return new ‪JsonResponse([
230  'success' => $this->coreUpdateService->checkPreConditions($this->coreUpdateGetVersionToHandle($request)),
231  'status' => $this->coreUpdateService->getMessages(),
232  ]);
233  }
234 
241  public function ‪coreUpdateDownloadAction(ServerRequestInterface $request): ResponseInterface
242  {
243  $this->‪coreUpdateInitialize();
244  return new ‪JsonResponse([
245  'success' => $this->coreUpdateService->downloadVersion($this->coreUpdateGetVersionToHandle($request)),
246  'status' => $this->coreUpdateService->getMessages(),
247  ]);
248  }
249 
256  public function ‪coreUpdateGetDataAction(ServerRequestInterface $request): ResponseInterface
257  {
258  $view = $this->‪initializeStandaloneView($request, 'Upgrade/CoreUpdate.html');
259  ‪$coreUpdateService = GeneralUtility::makeInstance(CoreUpdateService::class);
260  ‪$coreVersionService = GeneralUtility::makeInstance(CoreVersionService::class);
261  $view->assignMultiple([
262  'coreUpdateEnabled' => ‪$coreUpdateService->‪isCoreUpdateEnabled(),
263  'coreUpdateComposerMode' => ‪Environment::isComposerMode(),
264  'coreUpdateIsReleasedVersion' => ‪$coreVersionService->isInstalledVersionAReleasedVersion(),
265  'coreUpdateIsSymLinkedCore' => is_link(‪Environment::getPublicPath() . '/typo3_src'),
266  ]);
267  return new ‪JsonResponse([
268  'success' => true,
269  'html' => $view->render(),
270  ]);
271  }
272 
278  public function ‪coreUpdateIsUpdateAvailableAction(): ResponseInterface
279  {
280  $action = null;
281  $this->‪coreUpdateInitialize();
282  $messageQueue = new ‪FlashMessageQueue('install');
283 
284  $messages = [];
285 
286  if ($this->coreVersionService->isInstalledVersionAReleasedVersion()) {
287  $versionMaintenanceWindow = $this->coreVersionService->getMaintenanceWindow();
288  $renderVersionInformation = false;
289 
290  if (!$versionMaintenanceWindow->isSupportedByCommunity() && !$versionMaintenanceWindow->isSupportedByElts()) {
291  $messages[] = [
292  'title' => 'Outdated version',
293  'message' => 'The currently installed TYPO3 version ' . $this->coreVersionService->getInstalledVersion() . ' does not receive any further updates, please consider upgrading to a supported version!',
294  'severity' => ‪FlashMessage::ERROR,
295  ];
296  $renderVersionInformation = true;
297  } else {
298  $currentVersion = $this->coreVersionService->getInstalledVersion();
299  $isCurrentVersionElts = $this->coreVersionService->isCurrentInstalledVersionElts();
300  $latestRelease = $this->coreVersionService->getYoungestPatchRelease();
301 
302  $availableReleases = [];
303  if ($this->coreVersionService->isPatchReleaseSuitableForUpdate($latestRelease)) {
304  $availableReleases[] = $latestRelease;
305 
306  if (!$latestRelease->isElts()) {
307  $action = ['title' => 'Update now to version ' . $latestRelease->getVersion(), 'action' => 'updateRegular'];
308  }
309  }
310  if (!$versionMaintenanceWindow->isSupportedByCommunity()) {
311  if ($latestRelease->isElts()) {
312  // Check if there's a public release left that's not installed yet
313  $latestCommunityDrivenRelease = $this->coreVersionService->getYoungestCommunityPatchRelease();
314  if ($this->coreVersionService->isPatchReleaseSuitableForUpdate($latestCommunityDrivenRelease)) {
315  $availableReleases[] = $latestCommunityDrivenRelease;
316  $action = ['title' => 'Update now to version ' . $latestCommunityDrivenRelease->getVersion(), 'action' => 'updateRegular'];
317  }
318  } elseif (!$isCurrentVersionElts) {
319  // Inform user about ELTS being available soon if:
320  // - regular support ran out
321  // - the current installed version is no ELTS
322  // - no ELTS update was released, yet
323  $messages[] = [
324  'title' => 'ELTS will be available soon',
325  '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),
326  'severity' => ‪FlashMessage::WARNING,
327  ];
328  $renderVersionInformation = true;
329  }
330  }
331 
332  if ($availableReleases === []) {
333  $messages[] = [
334  'title' => 'Up to date',
335  'message' => 'There are no TYPO3 updates available.',
336  'severity' => ‪FlashMessage::NOTICE,
337  ];
338  } else {
339  foreach ($availableReleases as $availableRelease) {
340  $isUpdateSecurityRelevant = $this->coreVersionService->isUpdateSecurityRelevant($availableRelease);
341  $versionString = $availableRelease->getVersion();
342  if ($availableRelease->isElts()) {
343  $versionString .= ' ELTS';
344  }
345 
346  if ($isUpdateSecurityRelevant) {
347  $title = ($availableRelease->isElts() ? 'ELTS ' : '') . 'Security update available!';
348  $message = sprintf('The currently installed version is %s, update to security relevant released version %s is available.', $currentVersion, $versionString);
349  $severity = ‪FlashMessage::ERROR;
350  } else {
351  $title = ($availableRelease->isElts() ? 'ELTS ' : '') . 'Update available!';
352  $message = sprintf('Currently installed version is %s, update to regular released version %s is available.', $currentVersion, $versionString);
353  $severity = ‪FlashMessage::WARNING;
354  }
355 
356  if ($availableRelease->isElts()) {
357  if ($isCurrentVersionElts) {
358  $message .= ' Please visit my.typo3.org to download the release in your ELTS area.';
359  } else {
360  $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);
361  }
362 
363  $renderVersionInformation = true;
364  }
365 
366  $messages[] = [
367  'title' => $title,
368  'message' => $message,
369  'severity' => $severity,
370  ];
371  }
372  }
373  }
374 
375  if ($renderVersionInformation) {
376  $supportedMajorReleases = $this->coreVersionService->getSupportedMajorReleases();
377  $supportMessages = [];
378  if (!empty($supportedMajorReleases['community'])) {
379  $supportMessages[] = sprintf('Currently community-supported TYPO3 versions: %s (more information at https://get.typo3.org).', implode(', ', $supportedMajorReleases['community']));
380  }
381  if (!empty($supportedMajorReleases['elts'])) {
382  $supportMessages[] = sprintf('Currently supported TYPO3 ELTS versions: %s (more information at https://typo3.com/elts).', implode(', ', $supportedMajorReleases['elts']));
383  }
384 
385  $messages[] = [
386  'title' => 'TYPO3 Version information',
387  'message' => implode(' ', $supportMessages),
388  'severity' => ‪FlashMessage::INFO,
389  ];
390  }
391 
392  foreach ($messages as $message) {
393  $messageQueue->enqueue(new ‪FlashMessage($message['message'], $message['title'], $message['severity']));
394  }
395  } else {
396  $messageQueue->enqueue(new ‪FlashMessage(
397  '',
398  'Current version is a development version and can not be updated',
400  ));
401  }
402  $responseData = [
403  'success' => true,
404  'status' => $messageQueue,
405  ];
406  if (isset($action)) {
407  $responseData['action'] = $action;
408  }
409  return new ‪JsonResponse($responseData);
410  }
411 
418  public function ‪coreUpdateMoveAction(ServerRequestInterface $request): ResponseInterface
419  {
420  $this->‪coreUpdateInitialize();
421  return new ‪JsonResponse([
422  'success' => $this->coreUpdateService->moveVersion($this->coreUpdateGetVersionToHandle($request)),
423  'status' => $this->coreUpdateService->getMessages(),
424  ]);
425  }
426 
433  public function ‪coreUpdateUnpackAction(ServerRequestInterface $request): ResponseInterface
434  {
435  $this->‪coreUpdateInitialize();
436  return new ‪JsonResponse([
437  'success' => $this->coreUpdateService->unpackVersion($this->coreUpdateGetVersionToHandle($request)),
438  'status' => $this->coreUpdateService->getMessages(),
439  ]);
440  }
441 
448  public function ‪coreUpdateVerifyChecksumAction(ServerRequestInterface $request): ResponseInterface
449  {
450  $this->‪coreUpdateInitialize();
451  return new ‪JsonResponse([
452  'success' => $this->coreUpdateService->verifyFileChecksum($this->coreUpdateGetVersionToHandle($request)),
453  'status' => $this->coreUpdateService->getMessages(),
454  ]);
455  }
456 
463  public function ‪extensionCompatTesterLoadedExtensionListAction(ServerRequestInterface $request): ResponseInterface
464  {
465  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
466  $view = $this->‪initializeStandaloneView($request, 'Upgrade/ExtensionCompatTester.html');
467  $view->assignMultiple([
468  'extensionCompatTesterLoadExtLocalconfToken' => $formProtection->generateToken('installTool', 'extensionCompatTesterLoadExtLocalconf'),
469  'extensionCompatTesterLoadExtTablesToken' => $formProtection->generateToken('installTool', 'extensionCompatTesterLoadExtTables'),
470  'extensionCompatTesterUninstallToken' => $formProtection->generateToken('installTool', 'extensionCompatTesterUninstallExtension'),
471  ]);
472 
473  return new ‪JsonResponse([
474  'success' => true,
475  'html' => $view->render(),
476  ]);
477  }
478 
485  public function ‪extensionCompatTesterLoadExtLocalconfAction(ServerRequestInterface $request): ResponseInterface
486  {
487  $brokenExtensions = [];
488  foreach ($this->packageManager->getActivePackages() as $package) {
489  try {
491  } catch (\Throwable $e) {
492  $brokenExtensions[] = [
493  'name' => $package->getPackageKey(),
494  'isProtected' => $package->isProtected()
495  ];
496  }
497  }
498  return new ‪JsonResponse([
499  'brokenExtensions' => $brokenExtensions,
500  ], empty($brokenExtensions) ? 200 : 500);
501  }
502 
509  public function ‪extensionCompatTesterLoadExtTablesAction(ServerRequestInterface $request): ResponseInterface
510  {
511  $brokenExtensions = [];
512  $activePackages = $this->packageManager->getActivePackages();
513  foreach ($activePackages as $package) {
514  // Load all ext_localconf files first
516  }
517  foreach ($activePackages as $package) {
518  try {
520  } catch (\Throwable $e) {
521  $brokenExtensions[] = [
522  'name' => $package->getPackageKey(),
523  'isProtected' => $package->isProtected()
524  ];
525  }
526  }
527  return new ‪JsonResponse([
528  'brokenExtensions' => $brokenExtensions,
529  ], empty($brokenExtensions) ? 200 : 500);
530  }
531 
539  public function ‪extensionCompatTesterUninstallExtensionAction(ServerRequestInterface $request): ResponseInterface
540  {
541  $extension = $request->getParsedBody()['install']['extension'];
542  if (empty($extension)) {
543  throw new \RuntimeException(
544  'No extension given',
545  1505407269
546  );
547  }
548  $messageQueue = new ‪FlashMessageQueue('install');
549  if (‪ExtensionManagementUtility::isLoaded($extension)) {
550  try {
552  GeneralUtility::makeInstance(ClearCacheService::class)->clearAll();
553  GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive();
554 
555  $messageQueue->enqueue(new ‪FlashMessage(
556  'Extension "' . $extension . '" unloaded.',
557  '',
559  ));
560  } catch (\‪Exception $e) {
561  $messageQueue->enqueue(new ‪FlashMessage(
562  $e->getMessage(),
563  '',
565  ));
566  }
567  }
568  return new ‪JsonResponse([
569  'success' => true,
570  'status' => $messageQueue,
571  ]);
572  }
573 
580  public function ‪extensionScannerGetDataAction(ServerRequestInterface $request): ResponseInterface
581  {
582  $extensionsInTypo3conf = (new Finder())->directories()->in(‪Environment::getExtensionsPath())->depth(0)->sortByName();
583  $view = $this->‪initializeStandaloneView($request, 'Upgrade/ExtensionScanner.html');
584  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
585  $view->assignMultiple([
586  'extensionScannerExtensionList' => $extensionsInTypo3conf,
587  'extensionScannerFilesToken' => $formProtection->generateToken('installTool', 'extensionScannerFiles'),
588  'extensionScannerScanFileToken' => $formProtection->generateToken('installTool', 'extensionScannerScanFile'),
589  'extensionScannerMarkFullyScannedRestFilesToken' => $formProtection->generateToken('installTool', 'extensionScannerMarkFullyScannedRestFiles'),
590  ]);
591  return new ‪JsonResponse([
592  'success' => true,
593  'html' => $view->render(),
594  ]);
595  }
596 
603  public function ‪extensionScannerFilesAction(ServerRequestInterface $request): ResponseInterface
604  {
605  // Get and validate path
606  $extension = $request->getParsedBody()['install']['extension'];
607  $extensionBasePath = ‪Environment::getExtensionsPath() . '/' . $extension;
608  if (empty($extension) || !GeneralUtility::isAllowedAbsPath($extensionBasePath)) {
609  throw new \RuntimeException(
610  'Path to extension ' . $extension . ' not allowed.',
611  1499777261
612  );
613  }
614  if (!is_dir($extensionBasePath)) {
615  throw new \RuntimeException(
616  'Extension path ' . $extensionBasePath . ' does not exist or is no directory.',
617  1499777330
618  );
619  }
620 
621  ‪$finder = new Finder();
622  $files = ‪$finder->files()->in($extensionBasePath)->name('*.php')->sortByName();
623  // A list of file names relative to extension directory
624  $relativeFileNames = [];
625  foreach ($files as $file) {
627  $relativeFileNames[] = GeneralUtility::fixWindowsFilePath($file->getRelativePathname());
628  }
629  return new ‪JsonResponse([
630  'success' => true,
631  'files' => $relativeFileNames,
632  ]);
633  }
634 
644  public function ‪extensionScannerMarkFullyScannedRestFilesAction(ServerRequestInterface $request): ResponseInterface
645  {
646  $foundRestFileHashes = (array)$request->getParsedBody()['install']['hashes'];
647  // First un-mark files marked as scanned-ok
648  $registry = new ‪Registry();
649  $registry->removeAllByNamespace('extensionScannerNotAffected');
650  // Find all .rst files (except those from v8), see if they are tagged with "FullyScanned"
651  // and if their content is not in incoming "hashes" array, mark as "not affected"
652  $documentationFile = new ‪DocumentationFile();
653  ‪$finder = new Finder();
654  $restFilesBasePath = ‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog';
655  $restFiles = ‪$finder->files()->in($restFilesBasePath);
656  $fullyScannedRestFilesNotAffected = [];
657  foreach ($restFiles as $restFile) {
658  // Skip files in "8.x" directory
660  if (strpos($restFile->getRelativePath(), '8') === 0) {
661  continue;
662  }
663 
664  // Build array of file (hashes) not affected by current scan, if they are tagged as "FullyScanned"
665  $parsedRestFile = array_pop($documentationFile->getListEntry(str_replace(
666  '\\',
667  '/',
668  realpath($restFile->getPathname())
669  )));
670  if (!in_array($parsedRestFile['file_hash'], $foundRestFileHashes, true)
671  && in_array('FullyScanned', $parsedRestFile['tags'], true)
672  ) {
673  $fullyScannedRestFilesNotAffected[] = $parsedRestFile['file_hash'];
674  }
675  }
676  foreach ($fullyScannedRestFilesNotAffected as $fileHash) {
677  $registry->set('extensionScannerNotAffected', $fileHash, $fileHash);
678  }
679  return new ‪JsonResponse([
680  'success' => true,
681  'markedAsNotAffected' => count($fullyScannedRestFilesNotAffected),
682  ]);
683  }
684 
691  public function ‪extensionScannerScanFileAction(ServerRequestInterface $request): ResponseInterface
692  {
693  // Get and validate path and file
694  $extension = $request->getParsedBody()['install']['extension'];
695  $extensionBasePath = ‪Environment::getExtensionsPath() . '/' . $extension;
696  if (empty($extension) || !GeneralUtility::isAllowedAbsPath($extensionBasePath)) {
697  throw new \RuntimeException(
698  'Path to extension ' . $extension . ' not allowed.',
699  1499789246
700  );
701  }
702  if (!is_dir($extensionBasePath)) {
703  throw new \RuntimeException(
704  'Extension path ' . $extensionBasePath . ' does not exist or is no directory.',
705  1499789259
706  );
707  }
708  $file = $request->getParsedBody()['install']['file'];
709  $absoluteFilePath = $extensionBasePath . '/' . $file;
710  if (empty($file) || !GeneralUtility::isAllowedAbsPath($absoluteFilePath)) {
711  throw new \RuntimeException(
712  'Path to file ' . $file . ' of extension ' . $extension . ' not allowed.',
713  1499789384
714  );
715  }
716  if (!is_file($absoluteFilePath)) {
717  throw new \RuntimeException(
718  'File ' . $file . ' not found or is not a file.',
719  1499789433
720  );
721  }
722 
723  ‪$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
724  // Parse PHP file to AST and traverse tree calling visitors
725  $statements = ‪$parser->parse(file_get_contents($absoluteFilePath));
726 
727  // The built in NameResolver translates class names shortened with 'use' to fully qualified
728  // class names at all places. Incredibly useful for us and added as first visitor.
729  // IMPORTANT: first process completely to resolve fully qualified names of arguments
730  // (otherwise GeneratorClassesResolver will NOT get reliable results)
731  $traverser = new NodeTraverser();
732  $traverser->addVisitor(new NameResolver());
733  $statements = $traverser->traverse($statements);
734 
735  // IMPORTANT: second process to actually work on the pre-resolved statements
736  $traverser = new NodeTraverser();
737  // Understand GeneralUtility::makeInstance('My\\Package\\Foo\\Bar') as fqdn class name in first argument
738  $traverser->addVisitor(new ‪GeneratorClassesResolver());
739  // Count ignored lines, effective code lines, ...
740  $statistics = new ‪CodeStatistics();
741  $traverser->addVisitor($statistics);
742 
743  // Add all configured matcher classes
744  $matcherFactory = new ‪MatcherFactory();
745  ‪$matchers = $matcherFactory->createAll($this->matchers);
746  foreach (‪$matchers as $matcher) {
747  $traverser->addVisitor($matcher);
748  }
749 
750  $traverser->traverse($statements);
751 
752  // Gather code matches
753  $matches = [[]];
754  foreach (‪$matchers as $matcher) {
756  $matches[] = $matcher->getMatches();
757  }
758  $matches = array_merge(...$matches);
759 
760  // Prepare match output
761  $restFilesBasePath = ‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog';
762  $documentationFile = new ‪DocumentationFile();
763  $preparedMatches = [];
764  foreach ($matches as $match) {
765  $preparedHit = [];
766  $preparedHit['uniqueId'] = str_replace('.', '', uniqid((string)mt_rand(), true));
767  $preparedHit['message'] = $match['message'];
768  $preparedHit['line'] = $match['line'];
769  $preparedHit['indicator'] = $match['indicator'];
770  $preparedHit['lineContent'] = $this->‪extensionScannerGetLineFromFile($absoluteFilePath, $match['line']);
771  $preparedHit['restFiles'] = [];
772  foreach ($match['restFiles'] as $fileName) {
773  ‪$finder = new Finder();
774  $restFileLocation = ‪$finder->files()->in($restFilesBasePath)->name($fileName);
775  if ($restFileLocation->count() !== 1) {
776  throw new \RuntimeException(
777  'ResT file ' . $fileName . ' not found or multiple files found.',
778  1499803909
779  );
780  }
781  foreach ($restFileLocation as $restFile) {
783  $restFileLocation = $restFile->getPathname();
784  break;
785  }
786  $parsedRestFile = array_pop($documentationFile->getListEntry(str_replace(
787  '\\',
788  '/',
789  realpath($restFileLocation)
790  )));
791  $version = GeneralUtility::trimExplode(DIRECTORY_SEPARATOR, $restFileLocation);
792  array_pop($version);
793  // something like "8.2" .. "8.7" .. "master"
794  $parsedRestFile['version'] = array_pop($version);
795  $parsedRestFile['uniqueId'] = str_replace('.', '', uniqid((string)mt_rand(), true));
796  $preparedHit['restFiles'][] = $parsedRestFile;
797  }
798  $preparedMatches[] = $preparedHit;
799  }
800  return new ‪JsonResponse([
801  'success' => true,
802  'matches' => $preparedMatches,
803  'isFileIgnored' => $statistics->isFileIgnored(),
804  'effectiveCodeLines' => $statistics->getNumberOfEffectiveCodeLines(),
805  'ignoredLines' => $statistics->getNumberOfIgnoredLines(),
806  ]);
807  }
808 
815  public function ‪tcaExtTablesCheckAction(ServerRequestInterface $request): ResponseInterface
816  {
817  $view = $this->‪initializeStandaloneView($request, 'Upgrade/TcaExtTablesCheck.html');
818  $messageQueue = new ‪FlashMessageQueue('install');
819  $loadTcaService = GeneralUtility::makeInstance(LoadTcaService::class);
820  $loadTcaService->loadExtensionTablesWithoutMigration();
821  $baseTca = ‪$GLOBALS['TCA'];
822  foreach ($this->packageManager->getActivePackages() as $package) {
824 
825  $extensionKey = $package->getPackageKey();
826  $extTablesPath = $package->getPackagePath() . 'ext_tables.php';
827  if (@file_exists($extTablesPath)) {
828  $loadTcaService->loadSingleExtTablesFile($extensionKey);
829  $newTca = ‪$GLOBALS['TCA'];
830  if ($newTca !== $baseTca) {
831  $messageQueue->enqueue(new ‪FlashMessage(
832  '',
833  $extensionKey,
835  ));
836  }
837  $baseTca = $newTca;
838  }
839  }
840  return new ‪JsonResponse([
841  'success' => true,
842  'status' => $messageQueue,
843  'html' => $view->render(),
844  ]);
845  }
846 
853  public function ‪tcaMigrationsCheckAction(ServerRequestInterface $request): ResponseInterface
854  {
855  $view = $this->‪initializeStandaloneView($request, 'Upgrade/TcaMigrationsCheck.html');
856  $messageQueue = new ‪FlashMessageQueue('install');
857  GeneralUtility::makeInstance(LoadTcaService::class)->loadExtensionTablesWithoutMigration();
858  $tcaMigration = GeneralUtility::makeInstance(TcaMigration::class);
859  ‪$GLOBALS['TCA'] = $tcaMigration->migrate(‪$GLOBALS['TCA']);
860  $tcaMessages = $tcaMigration->getMessages();
861  foreach ($tcaMessages as $tcaMessage) {
862  $messageQueue->enqueue(new ‪FlashMessage(
863  '',
864  $tcaMessage,
866  ));
867  }
868  return new ‪JsonResponse([
869  'success' => true,
870  'status' => $messageQueue,
871  'html' => $view->render(),
872  ]);
873  }
874 
881  public function ‪upgradeDocsGetContentAction(ServerRequestInterface $request): ResponseInterface
882  {
883  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
884  $documentationDirectories = $this->‪getDocumentationDirectories();
885  $view = $this->‪initializeStandaloneView($request, 'Upgrade/UpgradeDocsGetContent.html');
886  $view->assignMultiple([
887  'upgradeDocsMarkReadToken' => $formProtection->generateToken('installTool', 'upgradeDocsMarkRead'),
888  'upgradeDocsUnmarkReadToken' => $formProtection->generateToken('installTool', 'upgradeDocsUnmarkRead'),
889  'upgradeDocsVersions' => $documentationDirectories,
890  ]);
891  return new ‪JsonResponse([
892  'success' => true,
893  'html' => $view->render(),
894  ]);
895  }
896 
903  public function ‪upgradeDocsGetChangelogForVersionAction(ServerRequestInterface $request): ResponseInterface
904  {
905  $version = $request->getQueryParams()['install']['version'] ?? '';
906  $this->‪assertValidVersion($version);
907 
908  $documentationFiles = $this->‪getDocumentationFiles($version);
909  $view = $this->‪initializeStandaloneView($request, 'Upgrade/UpgradeDocsGetChangelogForVersion.html');
910  $view->assignMultiple([
911  'upgradeDocsFiles' => $documentationFiles['normalFiles'],
912  'upgradeDocsReadFiles' => $documentationFiles['readFiles'],
913  'upgradeDocsNotAffectedFiles' => $documentationFiles['notAffectedFiles'],
914  ]);
915  return new ‪JsonResponse([
916  'success' => true,
917  'html' => $view->render(),
918  ]);
919  }
920 
927  public function ‪upgradeDocsMarkReadAction(ServerRequestInterface $request): ResponseInterface
928  {
929  $registry = new ‪Registry();
930  $filePath = $request->getParsedBody()['install']['ignoreFile'];
931  $fileHash = md5_file($filePath);
932  $registry->set('upgradeAnalysisIgnoredFiles', $fileHash, $filePath);
933  return new ‪JsonResponse([
934  'success' => true,
935  ]);
936  }
937 
944  public function ‪upgradeDocsUnmarkReadAction(ServerRequestInterface $request): ResponseInterface
945  {
946  $registry = new ‪Registry();
947  $filePath = $request->getParsedBody()['install']['ignoreFile'];
948  $fileHash = md5_file($filePath);
949  $registry->remove('upgradeAnalysisIgnoredFiles', $fileHash);
950  return new ‪JsonResponse([
951  'success' => true,
952  ]);
953  }
954 
960  public function ‪upgradeWizardsBlockingDatabaseAddsAction(): ResponseInterface
961  {
962  // ext_localconf, db and ext_tables must be loaded for the updates :(
964  $upgradeWizardsService = new ‪UpgradeWizardsService();
965  $adds = [];
966  $needsUpdate = false;
967  try {
968  $adds = $upgradeWizardsService->getBlockingDatabaseAdds();
969  if (!empty($adds)) {
970  $needsUpdate = true;
971  }
972  } catch (‪StatementException $exception) {
973  $needsUpdate = true;
974  }
975  return new ‪JsonResponse([
976  'success' => true,
977  'needsUpdate' => $needsUpdate,
978  'adds' => $adds,
979  ]);
980  }
981 
987  public function ‪upgradeWizardsBlockingDatabaseExecuteAction(): ResponseInterface
988  {
989  // ext_localconf, db and ext_tables must be loaded for the updates :(
991  $upgradeWizardsService = new ‪UpgradeWizardsService();
992  $upgradeWizardsService->addMissingTablesAndFields();
993  $messages = new ‪FlashMessageQueue('install');
994  $messages->enqueue(new ‪FlashMessage(
995  '',
996  'Added missing database fields and tables'
997  ));
998  return new ‪JsonResponse([
999  'success' => true,
1000  'status' => $messages,
1001  ]);
1002  }
1003 
1009  public function ‪upgradeWizardsBlockingDatabaseCharsetFixAction(): ResponseInterface
1010  {
1011  $upgradeWizardsService = new ‪UpgradeWizardsService();
1012  $upgradeWizardsService->setDatabaseCharsetUtf8();
1013  $messages = new ‪FlashMessageQueue('install');
1014  $messages->enqueue(new ‪FlashMessage(
1015  '',
1016  'Default connection database has been set to utf8'
1017  ));
1018  return new ‪JsonResponse([
1019  'success' => true,
1020  'status' => $messages,
1021  ]);
1022  }
1023 
1029  public function ‪upgradeWizardsBlockingDatabaseCharsetTestAction(): ResponseInterface
1030  {
1031  $upgradeWizardsService = new ‪UpgradeWizardsService();
1032  $result = !$upgradeWizardsService->isDatabaseCharsetUtf8();
1033  return new ‪JsonResponse([
1034  'success' => true,
1035  'needsUpdate' => $result,
1036  ]);
1037  }
1038 
1044  public function ‪upgradeWizardsDoneUpgradesAction(): ResponseInterface
1045  {
1047  $upgradeWizardsService = new ‪UpgradeWizardsService();
1048  $wizardsDone = $upgradeWizardsService->listOfWizardsDone();
1049  $rowUpdatersDone = $upgradeWizardsService->listOfRowUpdatersDone();
1050  $messages = new ‪FlashMessageQueue('install');
1051  if (empty($wizardsDone) && empty($rowUpdatersDone)) {
1052  $messages->enqueue(new ‪FlashMessage(
1053  '',
1054  'No wizards are marked as done'
1055  ));
1056  }
1057  return new ‪JsonResponse([
1058  'success' => true,
1059  'status' => $messages,
1060  'wizardsDone' => $wizardsDone,
1061  'rowUpdatersDone' => $rowUpdatersDone,
1062  ]);
1063  }
1064 
1071  public function ‪upgradeWizardsExecuteAction(ServerRequestInterface $request): ResponseInterface
1072  {
1073  // ext_localconf, db and ext_tables must be loaded for the updates :(
1075  $upgradeWizardsService = new ‪UpgradeWizardsService();
1076  $identifier = $request->getParsedBody()['install']['identifier'];
1077  $messages = $upgradeWizardsService->executeWizard($identifier);
1078  return new ‪JsonResponse([
1079  'success' => true,
1080  'status' => $messages,
1081  ]);
1082  }
1083 
1090  public function ‪upgradeWizardsInputAction(ServerRequestInterface $request): ResponseInterface
1091  {
1092  // ext_localconf, db and ext_tables must be loaded for the updates :(
1094  $upgradeWizardsService = new ‪UpgradeWizardsService();
1095  $identifier = $request->getParsedBody()['install']['identifier'];
1096  $result = $upgradeWizardsService->getWizardUserInput($identifier);
1097  return new ‪JsonResponse([
1098  'success' => true,
1099  'status' => [],
1100  'userInput' => $result,
1101  ]);
1102  }
1103 
1109  public function ‪upgradeWizardsListAction(): ResponseInterface
1110  {
1111  // ext_localconf, db and ext_tables must be loaded for the updates :(
1113  $upgradeWizardsService = new ‪UpgradeWizardsService();
1114  $wizards = $upgradeWizardsService->getUpgradeWizardsList();
1115  return new ‪JsonResponse([
1116  'success' => true,
1117  'status' => [],
1118  'wizards' => $wizards,
1119  ]);
1120  }
1121 
1128  public function ‪upgradeWizardsMarkUndoneAction(ServerRequestInterface $request): ResponseInterface
1129  {
1131  $wizardToBeMarkedAsUndoneIdentifier = $request->getParsedBody()['install']['identifier'];
1132  $upgradeWizardsService = new ‪UpgradeWizardsService();
1133  $result = $upgradeWizardsService->markWizardUndone($wizardToBeMarkedAsUndoneIdentifier);
1134  $messages = new ‪FlashMessageQueue('install');
1135  if ($result) {
1136  $messages->enqueue(new ‪FlashMessage(
1137  'Wizard has been marked undone'
1138  ));
1139  } else {
1140  $messages->enqueue(new ‪FlashMessage(
1141  'Wizard has not been marked undone',
1142  '',
1144  ));
1145  }
1146  return new ‪JsonResponse([
1147  'success' => true,
1148  'status' => $messages,
1149  ]);
1150  }
1151 
1158  public function ‪upgradeWizardsGetDataAction(ServerRequestInterface $request): ResponseInterface
1159  {
1160  $view = $this->‪initializeStandaloneView($request, 'Upgrade/UpgradeWizards.html');
1161  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
1162  $view->assignMultiple([
1163  'upgradeWizardsMarkUndoneToken' => $formProtection->generateToken('installTool', 'upgradeWizardsMarkUndone'),
1164  'upgradeWizardsInputToken' => $formProtection->generateToken('installTool', 'upgradeWizardsInput'),
1165  'upgradeWizardsExecuteToken' => $formProtection->generateToken('installTool', 'upgradeWizardsExecute'),
1166  ]);
1167  return new ‪JsonResponse([
1168  'success' => true,
1169  'html' => $view->render(),
1170  ]);
1171  }
1172 
1178  protected function ‪coreUpdateInitialize()
1179  {
1180  $this->coreUpdateService = GeneralUtility::makeInstance(CoreUpdateService::class);
1181  $this->coreVersionService = GeneralUtility::makeInstance(CoreVersionService::class);
1182  if (!$this->coreUpdateService->isCoreUpdateEnabled()) {
1183  throw new \RuntimeException(
1184  'Core Update disabled in this environment',
1185  1381609294
1186  );
1187  }
1188  // @todo: Does the core updater really depend on loaded ext_* files?
1190  }
1191 
1200  protected function ‪coreUpdateGetVersionToHandle(ServerRequestInterface $request): ‪CoreRelease
1201  {
1202  $type = $request->getQueryParams()['install']['type'];
1203  if (!isset($type) || empty($type)) {
1204  throw new \RuntimeException(
1205  'Type must be set to either "regular" or "development"',
1206  1380975303
1207  );
1208  }
1209  return $this->coreVersionService->getYoungestCommunityPatchRelease();
1210  }
1211 
1219  {
1220  $extLocalconfPath = $package->‪getPackagePath() . 'ext_localconf.php';
1221  // This is the main array meant to be manipulated in the ext_localconf.php files
1222  // In general it is recommended to not rely on it to be globally defined in that
1223  // scope but to use $GLOBALS['TYPO3_CONF_VARS'] instead.
1224  // Nevertheless we define it here as global for backwards compatibility.
1225  global $TYPO3_CONF_VARS;
1226  if (@file_exists($extLocalconfPath)) {
1227  // $_EXTKEY and $_EXTCONF are available in ext_localconf.php
1228  // and are explicitly set in cached file as well
1229  $_EXTKEY = $package->‪getPackageKey();
1230  $_EXTCONF = ‪$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] ?? null;
1231  require $extLocalconfPath;
1232  }
1233  }
1234 
1242  {
1243  $extTablesPath = $package->‪getPackagePath() . 'ext_tables.php';
1244  // In general it is recommended to not rely on it to be globally defined in that
1245  // scope, but we can not prohibit this without breaking backwards compatibility
1246  global $T3_SERVICES, $T3_VAR, $TYPO3_CONF_VARS;
1247  global $TBE_MODULES, $TBE_MODULES_EXT, $TCA;
1248  global $PAGES_TYPES, $TBE_STYLES;
1249  global $_EXTKEY;
1250  // Load each ext_tables.php file of loaded extensions
1251  $_EXTKEY = $package->‪getPackageKey();
1252  if (@file_exists($extTablesPath)) {
1253  // $_EXTKEY and $_EXTCONF are available in ext_tables.php
1254  // and are explicitly set in cached file as well
1255  $_EXTCONF = ‪$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] ?? null;
1256  require $extTablesPath;
1257  }
1258  }
1263  protected function ‪getDocumentationDirectories(): array
1264  {
1265  $documentationFileService = new ‪DocumentationFile();
1266  $documentationDirectories = $documentationFileService->findDocumentationDirectories(
1267  str_replace('\\', '/', realpath(‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog'))
1268  );
1269  return array_reverse($documentationDirectories);
1270  }
1271 
1278  protected function ‪getDocumentationFiles(string $version): array
1279  {
1280  $documentationFileService = new ‪DocumentationFile();
1281  $documentationFiles = $documentationFileService->findDocumentationFiles(
1282  str_replace('\\', '/', realpath(‪ExtensionManagementUtility::extPath('core') . 'Documentation/Changelog/' . $version))
1283  );
1284 
1285  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_registry');
1286  $filesMarkedAsRead = $queryBuilder
1287  ->select('*')
1288  ->from('sys_registry')
1289  ->where(
1290  $queryBuilder->expr()->eq(
1291  'entry_namespace',
1292  $queryBuilder->createNamedParameter('upgradeAnalysisIgnoredFiles', \PDO::PARAM_STR)
1293  )
1294  )
1295  ->execute()
1296  ->fetchAll();
1297  $hashesMarkedAsRead = [];
1298  foreach ($filesMarkedAsRead as $file) {
1299  $hashesMarkedAsRead[] = $file['entry_key'];
1300  }
1301 
1302  $fileMarkedAsNotAffected = $queryBuilder
1303  ->select('*')
1304  ->from('sys_registry')
1305  ->where(
1306  $queryBuilder->expr()->eq(
1307  'entry_namespace',
1308  $queryBuilder->createNamedParameter('extensionScannerNotAffected', \PDO::PARAM_STR)
1309  )
1310  )
1311  ->execute()
1312  ->fetchAll();
1313  $hashesMarkedAsNotAffected = [];
1314  foreach ($fileMarkedAsNotAffected as $file) {
1315  $hashesMarkedAsNotAffected[] = $file['entry_key'];
1316  }
1317 
1318  $readFiles = [];
1319  $notAffectedFiles = [];
1320  foreach ($documentationFiles as $fileId => $fileData) {
1321  if (in_array($fileData['file_hash'], $hashesMarkedAsRead, true)) {
1322  $readFiles[$fileId] = $fileData;
1323  unset($documentationFiles[$fileId]);
1324  } elseif (in_array($fileData['file_hash'], $hashesMarkedAsNotAffected, true)) {
1325  $notAffectedFiles[$fileId] = $fileData;
1326  unset($documentationFiles[$fileId]);
1327  }
1328  }
1329 
1330  return [
1331  'normalFiles' => $documentationFiles,
1332  'readFiles' => $readFiles,
1333  'notAffectedFiles' => $notAffectedFiles,
1334  ];
1335  }
1336 
1344  protected function ‪extensionScannerGetLineFromFile(string $file, int $lineNumber): string
1345  {
1346  $fileContent = file($file, FILE_IGNORE_NEW_LINES);
1347  $line = '';
1348  if (isset($fileContent[$lineNumber - 1])) {
1349  $line = trim($fileContent[$lineNumber - 1]);
1350  }
1351  return $line;
1352  }
1353 
1360  protected function ‪assertValidVersion(string $version): void
1361  {
1362  if ($version !== 'master' && !preg_match('/^\d+.\d+(?:.(?:\d+|x))?$/', $version)) {
1363  throw new \InvalidArgumentException('Given version "' . $version . '" is invalid', 1537209128);
1364  }
1365  }
1366 }
‪TYPO3\CMS\Core\Package\PackageInterface\getPackageKey
‪string getPackageKey()
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsListAction
‪ResponseInterface upgradeWizardsListAction()
Definition: UpgradeController.php:1105
‪TYPO3\CMS\Install\ExtensionScanner\Php\GeneratorClassesResolver
Definition: GeneratorClassesResolver.php:39
‪TYPO3\CMS\Install\Controller\UpgradeController\$coreVersionService
‪CoreVersionService $coreVersionService
Definition: UpgradeController.php:83
‪TYPO3\CMS\Core\Migrations\TcaMigration
Definition: TcaMigration.php:27
‪TYPO3\CMS\Install\Controller\AbstractController\initializeStandaloneView
‪StandaloneView initializeStandaloneView(ServerRequestInterface $request, string $templatePath)
Definition: AbstractController.php:37
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get
‪static TYPO3 CMS Core FormProtection AbstractFormProtection get($classNameOrType='default',... $constructorArguments)
Definition: FormProtectionFactory.php:72
‪TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics
Definition: CodeStatistics.php:28
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodCallStaticMatcher
Definition: MethodCallStaticMatcher.php:36
‪TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile
Definition: DocumentationFile.php:31
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static string getPublicPath()
Definition: Environment.php:153
‪TYPO3\CMS\Core\Database\Schema\Exception\StatementException
Definition: StatementException.php:23
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerMarkFullyScannedRestFilesAction
‪ResponseInterface extensionScannerMarkFullyScannedRestFilesAction(ServerRequestInterface $request)
Definition: UpgradeController.php:640
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\unloadExtension
‪static unloadExtension($extensionKey)
Definition: ExtensionManagementUtility.php:1940
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterUninstallExtensionAction
‪ResponseInterface extensionCompatTesterUninstallExtensionAction(ServerRequestInterface $request)
Definition: UpgradeController.php:535
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateUnpackAction
‪ResponseInterface coreUpdateUnpackAction(ServerRequestInterface $request)
Definition: UpgradeController.php:429
‪TYPO3\CMS\Install\Controller\UpgradeController
Definition: UpgradeController.php:76
‪TYPO3\CMS\Install\Controller\UpgradeController\$matchers
‪array $matchers
Definition: UpgradeController.php:102
‪$finder
‪$finder
Definition: annotationChecker.php:102
‪TYPO3\CMS\Core\Registry
Definition: Registry.php:32
‪TYPO3\CMS\Core\Package\PackageInterface\getPackagePath
‪string getPackagePath()
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateInitialize
‪coreUpdateInitialize()
Definition: UpgradeController.php:1174
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadedExtensionListAction
‪ResponseInterface extensionCompatTesterLoadedExtensionListAction(ServerRequestInterface $request)
Definition: UpgradeController.php:459
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetDataAction
‪ResponseInterface coreUpdateGetDataAction(ServerRequestInterface $request)
Definition: UpgradeController.php:252
‪$parser
‪$parser
Definition: annotationChecker.php:100
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateVerifyChecksumAction
‪ResponseInterface coreUpdateVerifyChecksumAction(ServerRequestInterface $request)
Definition: UpgradeController.php:444
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseCharsetTestAction
‪ResponseInterface upgradeWizardsBlockingDatabaseCharsetTestAction()
Definition: UpgradeController.php:1025
‪TYPO3\CMS\Install\Controller\UpgradeController\__construct
‪__construct(PackageManager $packageManager=null)
Definition: UpgradeController.php:92
‪TYPO3\CMS\Install\Controller\UpgradeController\cardsAction
‪ResponseInterface cardsAction(ServerRequestInterface $request)
Definition: UpgradeController.php:191
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsMarkReadAction
‪ResponseInterface upgradeDocsMarkReadAction(ServerRequestInterface $request)
Definition: UpgradeController.php:923
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerFilesAction
‪ResponseInterface extensionScannerFilesAction(ServerRequestInterface $request)
Definition: UpgradeController.php:599
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateActivateAction
‪ResponseInterface coreUpdateActivateAction(ServerRequestInterface $request)
Definition: UpgradeController.php:207
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsGetContentAction
‪ResponseInterface upgradeDocsGetContentAction(ServerRequestInterface $request)
Definition: UpgradeController.php:877
‪TYPO3\CMS\Install\Controller\AbstractController\loadExtLocalconfDatabaseAndExtTables
‪loadExtLocalconfDatabaseAndExtTables()
Definition: AbstractController.php:60
‪TYPO3\CMS\Install\CoreVersion\CoreRelease
Definition: CoreRelease.php:21
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtTablesAction
‪ResponseInterface extensionCompatTesterLoadExtTablesAction(ServerRequestInterface $request)
Definition: UpgradeController.php:505
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerGetLineFromFile
‪string extensionScannerGetLineFromFile(string $file, int $lineNumber)
Definition: UpgradeController.php:1340
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseCharsetFixAction
‪ResponseInterface upgradeWizardsBlockingDatabaseCharsetFixAction()
Definition: UpgradeController.php:1005
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyExistsStaticMatcher
Definition: PropertyExistsStaticMatcher.php:27
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsGetChangelogForVersionAction
‪ResponseInterface upgradeDocsGetChangelogForVersionAction(ServerRequestInterface $request)
Definition: UpgradeController.php:899
‪TYPO3\CMS\Core\Package\PackageInterface
Definition: PackageInterface.php:21
‪TYPO3\CMS\Core\FormProtection\InstallToolFormProtection
Definition: InstallToolFormProtection.php:60
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentRequiredMatcher
Definition: MethodArgumentRequiredMatcher.php:28
‪TYPO3\CMS\Install\Service\UpgradeWizardsService
Definition: UpgradeWizardsService.php:42
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateDownloadAction
‪ResponseInterface coreUpdateDownloadAction(ServerRequestInterface $request)
Definition: UpgradeController.php:237
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:36
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodAnnotationMatcher
Definition: MethodAnnotationMatcher.php:27
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ConstantMatcher
Definition: ConstantMatcher.php:28
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsDoneUpgradesAction
‪ResponseInterface upgradeWizardsDoneUpgradesAction()
Definition: UpgradeController.php:1040
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyAnnotationMatcher
Definition: PropertyAnnotationMatcher.php:28
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtTablesForExtension
‪extensionCompatTesterLoadExtTablesForExtension(PackageInterface $package)
Definition: UpgradeController.php:1237
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ClassNameMatcher
Definition: ClassNameMatcher.php:26
‪TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING
‪const WARNING
Definition: AbstractMessage.php:28
‪TYPO3\CMS\Install\Service\CoreUpdateService\isCoreUpdateEnabled
‪bool isCoreUpdateEnabled()
Definition: CoreUpdateService.php:84
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsMarkUndoneAction
‪ResponseInterface upgradeWizardsMarkUndoneAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1124
‪TYPO3\CMS\Install\Exception
Definition: Exception.php:23
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsGetDataAction
‪ResponseInterface upgradeWizardsGetDataAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1154
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyPublicMatcher
Definition: PropertyPublicMatcher.php:27
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodCallMatcher
Definition: MethodCallMatcher.php:28
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseAddsAction
‪ResponseInterface upgradeWizardsBlockingDatabaseAddsAction()
Definition: UpgradeController.php:956
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentDroppedMatcher
Definition: MethodArgumentDroppedMatcher.php:29
‪TYPO3\CMS\Install\Controller
Definition: AbstractController.php:3
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ArrayGlobalMatcher
Definition: ArrayGlobalMatcher.php:29
‪TYPO3\CMS\Install\Controller\UpgradeController\assertValidVersion
‪assertValidVersion(string $version)
Definition: UpgradeController.php:1356
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateMoveAction
‪ResponseInterface coreUpdateMoveAction(ServerRequestInterface $request)
Definition: UpgradeController.php:414
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded
‪static bool isLoaded($key, $exitOnError=null)
Definition: ExtensionManagementUtility.php:115
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeDocsUnmarkReadAction
‪ResponseInterface upgradeDocsUnmarkReadAction(ServerRequestInterface $request)
Definition: UpgradeController.php:940
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentRequiredStaticMatcher
Definition: MethodArgumentRequiredStaticMatcher.php:29
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateIsUpdateAvailableAction
‪ResponseInterface coreUpdateIsUpdateAvailableAction()
Definition: UpgradeController.php:274
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentDroppedStaticMatcher
Definition: MethodArgumentDroppedStaticMatcher.php:29
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateCheckPreConditionsAction
‪ResponseInterface coreUpdateCheckPreConditionsAction(ServerRequestInterface $request)
Definition: UpgradeController.php:222
‪TYPO3\CMS\Core\Service\OpcodeCacheService
Definition: OpcodeCacheService.php:24
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerGetDataAction
‪ResponseInterface extensionScannerGetDataAction(ServerRequestInterface $request)
Definition: UpgradeController.php:576
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\FunctionCallMatcher
Definition: FunctionCallMatcher.php:28
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ConstructorArgumentMatcher
Definition: ConstructorArgumentMatcher.php:35
‪TYPO3\CMS\Install\ExtensionScanner\Php\MatcherFactory
Definition: MatcherFactory.php:27
‪TYPO3\CMS\Install\Service\LoadTcaService
Definition: LoadTcaService.php:26
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ClassConstantMatcher
Definition: ClassConstantMatcher.php:29
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtLocalconfForExtension
‪extensionCompatTesterLoadExtLocalconfForExtension(PackageInterface $package)
Definition: UpgradeController.php:1214
‪TYPO3\CMS\Install\Service\CoreUpdateService
Definition: CoreUpdateService.php:40
‪TYPO3\CMS\Core\Core\Environment\isComposerMode
‪static bool isComposerMode()
Definition: Environment.php:117
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:26
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:22
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:45
‪TYPO3\CMS\Install\Controller\UpgradeController\getDocumentationFiles
‪array getDocumentationFiles(string $version)
Definition: UpgradeController.php:1274
‪TYPO3\CMS\Core\Http\JsonResponse
Definition: JsonResponse.php:25
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentUnusedMatcher
Definition: MethodArgumentUnusedMatcher.php:31
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:39
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ArrayDimensionMatcher
Definition: ArrayDimensionMatcher.php:29
‪TYPO3\CMS\Install\Controller\UpgradeController\tcaMigrationsCheckAction
‪ResponseInterface tcaMigrationsCheckAction(ServerRequestInterface $request)
Definition: UpgradeController.php:849
‪TYPO3\CMS\Install\Controller\AbstractController
Definition: AbstractController.php:28
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath
‪static string extPath($key, $script='')
Definition: ExtensionManagementUtility.php:149
‪TYPO3\CMS\Core\Messaging\AbstractMessage\NOTICE
‪const NOTICE
Definition: AbstractMessage.php:25
‪TYPO3\CMS\Install\Controller\UpgradeController\tcaExtTablesCheckAction
‪ResponseInterface tcaExtTablesCheckAction(ServerRequestInterface $request)
Definition: UpgradeController.php:811
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:44
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterLoadExtLocalconfAction
‪ResponseInterface extensionCompatTesterLoadExtLocalconfAction(ServerRequestInterface $request)
Definition: UpgradeController.php:481
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetVersionToHandle
‪CoreRelease coreUpdateGetVersionToHandle(ServerRequestInterface $request)
Definition: UpgradeController.php:1196
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsInputAction
‪ResponseInterface upgradeWizardsInputAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1086
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsExecuteAction
‪ResponseInterface upgradeWizardsExecuteAction(ServerRequestInterface $request)
Definition: UpgradeController.php:1067
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:25
‪TYPO3\CMS\Install\Service\ClearCacheService
Definition: ClearCacheService.php:27
‪TYPO3\CMS\Install\Controller\UpgradeController\$packageManager
‪PackageManager $packageManager
Definition: UpgradeController.php:87
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\InterfaceMethodChangedMatcher
Definition: InterfaceMethodChangedMatcher.php:33
‪TYPO3\CMS\Install\Controller\UpgradeController\$coreUpdateService
‪CoreUpdateService $coreUpdateService
Definition: UpgradeController.php:79
‪TYPO3\CMS\Install\Controller\UpgradeController\upgradeWizardsBlockingDatabaseExecuteAction
‪ResponseInterface upgradeWizardsBlockingDatabaseExecuteAction()
Definition: UpgradeController.php:983
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Core\Core\Environment\getExtensionsPath
‪static string getExtensionsPath()
Definition: Environment.php:245
‪TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyProtectedMatcher
Definition: PropertyProtectedMatcher.php:28
‪TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerScanFileAction
‪ResponseInterface extensionScannerScanFileAction(ServerRequestInterface $request)
Definition: UpgradeController.php:687
‪TYPO3\CMS\Install\Controller\UpgradeController\getDocumentationDirectories
‪string[] getDocumentationDirectories()
Definition: UpgradeController.php:1259