‪TYPO3CMS  ‪main
EnvironmentController.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 Psr\Http\Message\ResponseInterface;
21 use Psr\Http\Message\ServerRequestInterface;
22 use Symfony\Component\Mime\Address;
23 use Symfony\Component\Mime\Exception\RfcComplianceException;
29 use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
35 use TYPO3\CMS\Core\Type\File\ImageInfo;
49 
55 {
56  private const ‪IMAGE_FILE_EXT = ['gif', 'jpg', 'png', 'tif', 'ai', 'pdf', 'webp'];
57  private const ‪TEST_REFERENCE_PATH = __DIR__ . '/../../Resources/Public/Images/TestReference';
58 
59  public function ‪__construct(
60  private readonly ‪LateBootService $lateBootService,
61  private readonly ‪FormProtectionFactory $formProtectionFactory,
62  private readonly ‪MailerInterface $mailer,
63  ) {}
64 
68  public function ‪cardsAction(ServerRequestInterface $request): ResponseInterface
69  {
70  $view = $this->‪initializeView($request);
71  return new ‪JsonResponse([
72  'success' => true,
73  'html' => $view->render('Environment/Cards'),
74  ]);
75  }
76 
80  public function ‪systemInformationGetDataAction(ServerRequestInterface $request): ResponseInterface
81  {
82  $view = $this->‪initializeView($request);
83  $view->assignMultiple([
84  'systemInformationCgiDetected' => ‪Environment::isRunningOnCgiServer(),
85  'systemInformationDatabaseConnections' => $this->‪getDatabaseConnectionInformation(),
86  'systemInformationOperatingSystem' => ‪Environment::isWindows() ? 'Windows' : 'Unix',
87  'systemInformationApplicationContext' => $this->‪getApplicationContextInformation(),
88  'phpVersion' => PHP_VERSION,
89  ]);
90  return new ‪JsonResponse([
91  'success' => true,
92  'html' => $view->render('Environment/SystemInformation'),
93  ]);
94  }
95 
99  public function ‪phpInfoGetDataAction(ServerRequestInterface $request): ResponseInterface
100  {
101  $view = $this->‪initializeView($request);
102  return new ‪JsonResponse([
103  'success' => true,
104  'html' => $view->render('Environment/PhpInfo'),
105  ]);
106  }
107 
111  public function ‪environmentCheckGetStatusAction(ServerRequestInterface $request): ResponseInterface
112  {
113  $view = $this->‪initializeView($request);
114  $messageQueue = new ‪FlashMessageQueue('install');
115  $checkMessages = (new ‪Check())->getStatus();
116  foreach ($checkMessages as $message) {
117  $messageQueue->enqueue($message);
118  }
119  $setupMessages = (new ‪SetupCheck())->getStatus();
120  foreach ($setupMessages as $message) {
121  $messageQueue->enqueue($message);
122  }
123  $databaseMessages = (new ‪DatabaseCheck())->getStatus();
124  foreach ($databaseMessages as $message) {
125  $messageQueue->enqueue($message);
126  }
127  $serverResponseMessages = (new ‪ServerResponseCheck(false))->getStatus();
128  foreach ($serverResponseMessages as $message) {
129  $messageQueue->enqueue($message);
130  }
131  return new ‪JsonResponse([
132  'success' => true,
133  'status' => [
134  'error' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::ERROR),
135  'warning' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::WARNING),
136  'ok' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::OK),
137  'information' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::INFO),
138  'notice' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::NOTICE),
139  ],
140  'html' => $view->render('Environment/EnvironmentCheck'),
141  'buttons' => [
142  [
143  'btnClass' => 'btn-default t3js-environmentCheck-execute',
144  'text' => 'Run tests again',
145  ],
146  ],
147  ]);
148  }
149 
153  public function ‪folderStructureGetStatusAction(ServerRequestInterface $request): ResponseInterface
154  {
155  $view = $this->‪initializeView($request);
156  $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
157  $structureFacade = $folderStructureFactory->getStructure(‪WebserverType::fromRequest($request));
158 
159  $structureMessages = $structureFacade->getStatus();
160  $errorQueue = new ‪FlashMessageQueue('install');
161  $okQueue = new ‪FlashMessageQueue('install');
162  foreach ($structureMessages as $message) {
163  if ($message->getSeverity() === ContextualFeedbackSeverity::ERROR
164  || $message->getSeverity() === ContextualFeedbackSeverity::WARNING
165  ) {
166  $errorQueue->enqueue($message);
167  } else {
168  $okQueue->enqueue($message);
169  }
170  }
171 
172  $permissionCheck = GeneralUtility::makeInstance(DefaultPermissionsCheck::class);
173 
174  $view->assign('publicPath', ‪Environment::getPublicPath());
175 
176  $buttons = [];
177  if ($errorQueue->count() > 0) {
178  $buttons[] = [
179  'btnClass' => 'btn-default t3js-folderStructure-errors-fix',
180  'text' => 'Try to fix file and folder permissions',
181  ];
182  }
183 
184  return new ‪JsonResponse([
185  'success' => true,
186  'errorStatus' => $errorQueue,
187  'okStatus' => $okQueue,
188  'folderStructureFilePermissionStatus' => $permissionCheck->getMaskStatus('fileCreateMask'),
189  'folderStructureDirectoryPermissionStatus' => $permissionCheck->getMaskStatus('folderCreateMask'),
190  'html' => $view->render('Environment/FolderStructure'),
191  'buttons' => $buttons,
192  ]);
193  }
194 
198  public function ‪folderStructureFixAction(ServerRequestInterface $request): ResponseInterface
199  {
200  $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
201  $structureFacade = $folderStructureFactory->getStructure(‪WebserverType::fromRequest($request));
202  $fixedStatusObjects = $structureFacade->fix();
203  return new ‪JsonResponse([
204  'success' => true,
205  'fixedStatus' => $fixedStatusObjects,
206  ]);
207  }
208 
212  public function ‪mailTestGetDataAction(ServerRequestInterface $request): ResponseInterface
213  {
214  $view = $this->‪initializeView($request);
215  $formProtection = $this->formProtectionFactory->createFromRequest($request);
216  $isSendPossible = true;
217  $messages = new ‪FlashMessageQueue('install');
218  $senderEmail = $this->‪getSenderEmailAddress();
219  if ($senderEmail === '') {
220  $messages->enqueue(new ‪FlashMessage(
221  'Sender email address is not configured. Please configure $GLOBALS[\'TYPO3_CONF_VARS\'][\'MAIL\'][\'defaultMailFromAddress\'].',
222  'Can not send mail',
223  ContextualFeedbackSeverity::ERROR
224  ));
225  $isSendPossible = false;
226  } elseif (!GeneralUtility::validEmail($senderEmail)) {
227  $messages->enqueue(new ‪FlashMessage(
228  sprintf(
229  'Sender email address <%s> is configured, but is not a valid email. Please use a valid email address in $GLOBALS[\'TYPO3_CONF_VARS\'][\'MAIL\'][\'defaultMailFromAddress\'].',
230  $senderEmail
231  ),
232  'Can not send mail',
233  ContextualFeedbackSeverity::ERROR
234  ));
235  $isSendPossible = false;
236  }
237 
238  $view->assignMultiple([
239  'mailTestToken' => $formProtection->generateToken('installTool', 'mailTest'),
240  'mailTestSenderAddress' => $this->getSenderEmailAddress(),
241  'isSendPossible' => $isSendPossible,
242  ]);
243 
244  return new ‪JsonResponse([
245  'success' => true,
246  'messages' => $messages,
247  'sendPossible' => $isSendPossible,
248  'html' => $view->render('Environment/MailTest'),
249  'buttons' => [
250  [
251  'btnClass' => 'btn-default t3js-mailTest-execute',
252  'text' => 'Send test mail',
253  ],
254  ],
255  ]);
256  }
257 
261  public function ‪mailTestAction(ServerRequestInterface $request): ResponseInterface
262  {
263  $container = $this->lateBootService->getContainer();
264  $backup = $this->lateBootService->makeCurrent($container);
265  $messages = new ‪FlashMessageQueue('install');
266  $recipient = $request->getParsedBody()['install']['email'];
267 
268  if (empty($recipient) || !GeneralUtility::validEmail($recipient)) {
269  $messages->enqueue(new ‪FlashMessage(
270  'Given recipient address is not a valid email address.',
271  'Mail not sent',
272  ContextualFeedbackSeverity::ERROR
273  ));
274  } else {
275  try {
276  $variables = [
277  'headline' => 'TYPO3 Test Mail',
278  'introduction' => 'Hey TYPO3 Administrator',
279  'content' => 'Seems like your favorite TYPO3 installation can send out emails!',
280  ];
281  $mailMessage = GeneralUtility::makeInstance(FluidEmail::class);
282  $mailMessage
283  ->to($recipient)
284  ->from(new Address($this->‪getSenderEmailAddress(), $this->‪getSenderEmailName()))
285  ->subject($this->‪getEmailSubject())
286  ->setRequest($request)
287  ->assignMultiple($variables);
288 
289  $this->mailer->send($mailMessage);
290  $messages->enqueue(new ‪FlashMessage(
291  'Recipient: ' . $recipient,
292  'Test mail sent'
293  ));
294  } catch (RfcComplianceException $exception) {
295  $messages->enqueue(new ‪FlashMessage(
296  'Please verify $GLOBALS[\'TYPO3_CONF_VARS\'][\'MAIL\'][\'defaultMailFromAddress\'] is a valid mail address.'
297  . ' Error message: ' . $exception->getMessage(),
298  'RFC compliance problem',
299  ContextualFeedbackSeverity::ERROR
300  ));
301  } catch (\Throwable $throwable) {
302  $messages->enqueue(new ‪FlashMessage(
303  'Please verify $GLOBALS[\'TYPO3_CONF_VARS\'][\'MAIL\'][*] settings are valid.'
304  . ' Error message: ' . $throwable->getMessage(),
305  'Could not deliver mail',
306  ContextualFeedbackSeverity::ERROR
307  ));
308  }
309  }
310  $this->lateBootService->makeCurrent(null, $backup);
311  return new ‪JsonResponse([
312  'success' => true,
313  'status' => $messages,
314  ]);
315  }
316 
320  public function ‪imageProcessingGetDataAction(ServerRequestInterface $request): ResponseInterface
321  {
322  $view = $this->‪initializeView($request);
323  $view->assignMultiple([
324  'imageProcessingProcessor' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor'] === 'GraphicsMagick' ? 'GraphicsMagick' : 'ImageMagick',
325  'imageProcessingEnabled' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'],
326  'imageProcessingPath' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path'],
327  'imageProcessingVersion' => $this->‪determineImageMagickVersion(),
328  'imageProcessingEffects' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_effects'],
329  'imageProcessingGdlibEnabled' => class_exists(\GdImage::class),
330  'imageProcessingFileFormats' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
331  ]);
332  return new ‪JsonResponse([
333  'success' => true,
334  'html' => $view->render('Environment/ImageProcessing'),
335  'buttons' => [
336  [
337  'btnClass' => 'btn-default disabled t3js-imageProcessing-execute',
338  'text' => 'Run image tests again',
339  ],
340  ],
341  ]);
342  }
343 
347  public function ‪imageProcessingTrueTypeAction(): ResponseInterface
348  {
349  $image = @imagecreate(200, 50);
350  imagecolorallocate($image, 255, 255, 55);
351  $textColor = imagecolorallocate($image, 233, 14, 91);
352  @imagettftext(
353  $image,
354  20 / 96.0 * 72, // As in compensateFontSizeBasedOnFreetypeDpi
355  0,
356  10,
357  20,
358  $textColor,
359  ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
360  'Testing true type'
361  );
362  $outputFile = ‪Environment::getPublicPath() . '/typo3temp/assets/images/installTool-' . ‪StringUtility::getUniqueId('createTrueTypeFontTestImage') . '.gif';
363  @imagegif($image, $outputFile);
364  $fileExists = file_exists($outputFile);
365  if ($fileExists) {
367  }
368  $result = [
369  'fileExists' => $fileExists,
370  'referenceFile' => self::TEST_REFERENCE_PATH . '/Font.gif',
371  ];
372  if ($fileExists) {
373  $result['outputFile'] = $outputFile;
374  }
375  return $this->‪getImageTestResponse($result);
376  }
377 
381  public function ‪imageProcessingReadJpgAction(): ResponseInterface
382  {
383  return $this->‪convertImageFormatsToJpg('jpg');
384  }
385 
389  public function ‪imageProcessingReadWebpAction(): ResponseInterface
390  {
391  return $this->‪convertImageFormatsToJpg('webp');
392  }
393 
397  public function ‪imageProcessingReadGifAction(): ResponseInterface
398  {
399  return $this->‪convertImageFormatsToJpg('gif');
400  }
401 
405  public function ‪imageProcessingReadPngAction(): ResponseInterface
406  {
407  return $this->‪convertImageFormatsToJpg('png');
408  }
409 
413  public function ‪imageProcessingReadTifAction(): ResponseInterface
414  {
415  return $this->‪convertImageFormatsToJpg('tif');
416  }
417 
421  public function ‪imageProcessingReadPdfAction(): ResponseInterface
422  {
423  return $this->‪convertImageFormatsToJpg('pdf');
424  }
425 
429  public function ‪imageProcessingReadAiAction(): ResponseInterface
430  {
431  return $this->‪convertImageFormatsToJpg('ai');
432  }
433 
437  public function ‪imageProcessingWriteGifAction(): ResponseInterface
438  {
439  if (!$this->‪isImageMagickEnabledAndConfigured()) {
440  return new ‪JsonResponse([
441  'success' => true,
442  'status' => [$this->‪imageMagickDisabledMessage()],
443  ]);
444  }
445  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
446  $inputFile = $imageBasePath . 'TestInput/Test.gif';
447  $imageService = $this->‪initializeGraphicalFunctions();
448  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('write-gif');
449  $imResult = $imageService->resize($inputFile, 'gif', '300', '', '', [], true);
450  $messages = new ‪FlashMessageQueue('install');
451  if ($imResult !== null && $imResult->isFile()) {
452  $result = [
453  'status' => $messages,
454  'fileExists' => true,
455  'outputFile' => $imResult->getRealPath(),
456  'referenceFile' => self::TEST_REFERENCE_PATH . '/Write-gif.gif',
457  'command' => $imageService->IM_commands,
458  ];
459  } else {
460  $result = [
461  'status' => [$this->‪imageGenerationFailedMessage()],
462  'command' => $imageService->IM_commands,
463  ];
464  }
465  return $this->‪getImageTestResponse($result);
466  }
467 
471  public function ‪imageProcessingWritePngAction(): ResponseInterface
472  {
473  if (!$this->‪isImageMagickEnabledAndConfigured()) {
474  return new ‪JsonResponse([
475  'success' => true,
476  'status' => [$this->‪imageMagickDisabledMessage()],
477  ]);
478  }
479  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
480  $inputFile = $imageBasePath . 'TestInput/Test.png';
481  $imageService = $this->‪initializeGraphicalFunctions();
482  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('write-png');
483  $imResult = $imageService->resize($inputFile, 'png', '300', '', '', [], true);
484  if ($imResult !== null && $imResult->isFile()) {
485  $result = [
486  'fileExists' => true,
487  'outputFile' => $imResult->getRealPath(),
488  'referenceFile' => self::TEST_REFERENCE_PATH . '/Write-png.png',
489  'command' => $imageService->IM_commands,
490  ];
491  } else {
492  $result = [
493  'status' => [$this->‪imageGenerationFailedMessage()],
494  'command' => $imageService->IM_commands,
495  ];
496  }
497  return $this->‪getImageTestResponse($result);
498  }
502  public function ‪imageProcessingWriteWebpAction(): ResponseInterface
503  {
504  if (!$this->‪isImageMagickEnabledAndConfigured()) {
505  return new ‪JsonResponse([
506  'success' => true,
507  'status' => [$this->‪imageMagickDisabledMessage()],
508  ]);
509  }
510  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
511  $inputFile = $imageBasePath . 'TestInput/Test.webp';
512  $imageService = $this->‪initializeGraphicalFunctions();
513  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('write-webp');
514  $imResult = $imageService->resize($inputFile, 'webp', '300', '', '', [], true);
515  if ($imResult !== null && $imResult->isFile()) {
516  $result = [
517  'fileExists' => true,
518  'outputFile' => $imResult->getRealPath(),
519  'referenceFile' => self::TEST_REFERENCE_PATH . '/Write-webp.webp',
520  'command' => $imageService->IM_commands,
521  ];
522  } else {
523  $result = [
524  'status' => [$this->‪imageGenerationFailedMessage()],
525  'command' => $imageService->IM_commands,
526  ];
527  }
528  return $this->‪getImageTestResponse($result);
529  }
530 
534  public function ‪imageProcessingGifToGifAction(): ResponseInterface
535  {
536  if (!$this->‪isImageMagickEnabledAndConfigured()) {
537  return new ‪JsonResponse([
538  'success' => true,
539  'status' => [$this->‪imageMagickDisabledMessage()],
540  ]);
541  }
542  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
543  $imageService = $this->‪initializeGraphicalFunctions();
544  $inputFile = $imageBasePath . 'TestInput/Transparent.gif';
545  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('scale-gif');
546  $imResult = $imageService->resize($inputFile, 'gif', '300', '', '', [], true);
547  if ($imResult !== null && $imResult->isFile()) {
548  $result = [
549  'fileExists' => true,
550  'outputFile' => $imResult->getRealPath(),
551  'referenceFile' => self::TEST_REFERENCE_PATH . '/Scale-gif.gif',
552  'command' => $imageService->IM_commands,
553  ];
554  } else {
555  $result = [
556  'status' => [$this->‪imageGenerationFailedMessage()],
557  'command' => $imageService->IM_commands,
558  ];
559  }
560  return $this->‪getImageTestResponse($result);
561  }
562 
566  public function ‪imageProcessingPngToPngAction(): ResponseInterface
567  {
568  if (!$this->‪isImageMagickEnabledAndConfigured()) {
569  return new ‪JsonResponse([
570  'success' => true,
571  'status' => [$this->‪imageMagickDisabledMessage()],
572  ]);
573  }
574  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
575  $imageService = $this->‪initializeGraphicalFunctions();
576  $inputFile = $imageBasePath . 'TestInput/Transparent.png';
577  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('scale-png');
578  $imResult = $imageService->resize($inputFile, 'png', '300', '', '', [], true);
579  if ($imResult !== null && $imResult->isFile()) {
580  $result = [
581  'fileExists' => true,
582  'outputFile' => $imResult->getRealPath(),
583  'referenceFile' => self::TEST_REFERENCE_PATH . '/Scale-png.png',
584  'command' => $imageService->IM_commands,
585  ];
586  } else {
587  $result = [
588  'status' => [$this->‪imageGenerationFailedMessage()],
589  'command' => $imageService->IM_commands,
590  ];
591  }
592  return $this->‪getImageTestResponse($result);
593  }
594 
598  public function ‪imageProcessingGifToJpgAction(): ResponseInterface
599  {
600  if (!$this->‪isImageMagickEnabledAndConfigured()) {
601  return new ‪JsonResponse([
602  'success' => true,
603  'status' => [$this->‪imageMagickDisabledMessage()],
604  ]);
605  }
606  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
607  $imageService = $this->‪initializeGraphicalFunctions();
608  $inputFile = $imageBasePath . 'TestInput/Transparent.gif';
609  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('scale-jpg');
610  $imResult = $imageService->resize($inputFile, 'jpg', '300', '', '-opaque white -background white -flatten', [], true);
611  if ($imResult !== null && $imResult->isFile()) {
612  $result = [
613  'fileExists' => true,
614  'outputFile' => $imResult->getRealPath(),
615  'referenceFile' => self::TEST_REFERENCE_PATH . '/Scale-jpg.jpg',
616  'command' => $imageService->IM_commands,
617  ];
618  } else {
619  $result = [
620  'status' => [$this->‪imageGenerationFailedMessage()],
621  'command' => $imageService->IM_commands,
622  ];
623  }
624  return $this->‪getImageTestResponse($result);
625  }
626 
630  public function ‪imageProcessingJpgToWebpAction(): ResponseInterface
631  {
632  if (!$this->‪isImageMagickEnabledAndConfigured()) {
633  return new ‪JsonResponse([
634  'success' => true,
635  'status' => [$this->‪imageMagickDisabledMessage()],
636  ]);
637  }
638  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
639  $imageService = $this->‪initializeGraphicalFunctions();
640  $inputFile = $imageBasePath . 'TestInput/Test.jpg';
641  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('read-webp');
642  $imResult = $imageService->resize($inputFile, 'webp', '300', '', '', [], true);
643  if ($imResult !== null) {
644  $result = [
645  'fileExists' => $imResult->isFile(),
646  'outputFile' => $imResult->getRealPath(),
647  'referenceFile' => self::TEST_REFERENCE_PATH . '/Convert-webp.webp',
648  'command' => $imageService->IM_commands,
649  ];
650  } else {
651  $result = [
652  'status' => [$this->‪imageGenerationFailedMessage()],
653  'command' => $imageService->IM_commands,
654  ];
655  }
656  return $this->‪getImageTestResponse($result);
657  }
658 
662  public function ‪imageProcessingCombineGifMaskAction(): ResponseInterface
663  {
664  if (!$this->‪isImageMagickEnabledAndConfigured()) {
665  return new ‪JsonResponse([
666  'success' => true,
667  'status' => [$this->‪imageMagickDisabledMessage()],
668  ]);
669  }
670  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
671  $imageService = $this->‪initializeGraphicalFunctions();
672  $inputFile = $imageBasePath . 'TestInput/BackgroundOrange.gif';
673  $overlayFile = $imageBasePath . 'TestInput/Test.jpg';
674  $maskFile = $imageBasePath . 'TestInput/MaskBlackWhite.gif';
675  $resultFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId($imageService->alternativeOutputKey . 'combine1') . '.jpg';
676  $imageService->combineExec($inputFile, $overlayFile, $maskFile, $resultFile);
677  $imageInfo = GeneralUtility::makeInstance(ImageInfo::class, $resultFile);
678  if ($imageInfo->getWidth() > 0) {
679  $result = [
680  'fileExists' => true,
681  'outputFile' => $resultFile,
682  'referenceFile' => self::TEST_REFERENCE_PATH . '/Combine-1.jpg',
683  'command' => $imageService->IM_commands,
684  ];
685  } else {
686  $result = [
687  'status' => [$this->‪imageGenerationFailedMessage()],
688  'command' => $imageService->IM_commands,
689  ];
690  }
691  return $this->‪getImageTestResponse($result);
692  }
693 
697  public function ‪imageProcessingCombineJpgMaskAction(): ResponseInterface
698  {
699  if (!$this->‪isImageMagickEnabledAndConfigured()) {
700  return new ‪JsonResponse([
701  'success' => true,
702  'status' => [$this->‪imageMagickDisabledMessage()],
703  ]);
704  }
705  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
706  $imageService = $this->‪initializeGraphicalFunctions();
707  $inputFile = $imageBasePath . 'TestInput/BackgroundCombine.jpg';
708  $overlayFile = $imageBasePath . 'TestInput/Test.jpg';
709  $maskFile = $imageBasePath . 'TestInput/MaskCombine.jpg';
710  $resultFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId($imageService->alternativeOutputKey . 'combine2') . '.jpg';
711  $imageService->combineExec($inputFile, $overlayFile, $maskFile, $resultFile);
712  $imageInfo = GeneralUtility::makeInstance(ImageInfo::class, $resultFile);
713  if ($imageInfo->getWidth() > 0) {
714  $result = [
715  'fileExists' => true,
716  'outputFile' => $resultFile,
717  'referenceFile' => self::TEST_REFERENCE_PATH . '/Combine-2.jpg',
718  'command' => $imageService->IM_commands,
719  ];
720  } else {
721  $result = [
722  'status' => [$this->‪imageGenerationFailedMessage()],
723  'command' => $imageService->IM_commands,
724  ];
725  }
726  return $this->‪getImageTestResponse($result);
727  }
728 
732  public function ‪imageProcessingGdlibSimpleAction(): ResponseInterface
733  {
734  $gifBuilder = $this->‪initializeGifBuilder();
735  $image = imagecreatetruecolor(300, 225);
736  $backgroundColor = imagecolorallocate($image, 0, 0, 0);
737  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
738  $workArea = [0, 0, 300, 225];
739  $conf = [
740  'dimensions' => '10,50,280,50',
741  'color' => 'olive',
742  ];
743  $gifBuilder->makeBox($image, $conf, $workArea);
744  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdSimple') . '.png';
745  $gifBuilder->ImageWrite($image, $outputFile);
746  $result = [
747  'fileExists' => true,
748  'outputFile' => $outputFile,
749  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-simple.png',
750  'command' => $gifBuilder->getGraphicalFunctions()->IM_commands,
751  ];
752  return $this->‪getImageTestResponse($result);
753  }
754 
758  public function ‪imageProcessingGdlibFromFileAction(): ResponseInterface
759  {
760  $gifBuilder = $this->‪initializeGifBuilder();
761  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
762  $inputFile = $imageBasePath . 'TestInput/Test.png';
763  $image = $gifBuilder->imageCreateFromFile($inputFile);
764  $workArea = [0, 0, 400, 300];
765  $conf = [
766  'dimensions' => '10,50,380,50',
767  'color' => 'olive',
768  ];
769  $gifBuilder->makeBox($image, $conf, $workArea);
770  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdBox') . '.png';
771  $gifBuilder->ImageWrite($image, $outputFile);
772  $result = [
773  'fileExists' => true,
774  'outputFile' => $outputFile,
775  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-box.png',
776  'command' => $gifBuilder->getGraphicalFunctions()->IM_commands,
777  ];
778  return $this->‪getImageTestResponse($result);
779  }
780 
784  public function ‪imageProcessingGdlibFromFileToWebpAction(): ResponseInterface
785  {
786  $gifBuilder = $this->‪initializeGifBuilder();
787  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
788  $inputFile = $imageBasePath . 'TestInput/Test.webp';
789  $image = $gifBuilder->imageCreateFromFile($inputFile);
790  $workArea = [0, 0, 400, 300];
791  $conf = [
792  'dimensions' => '20,100,740,100',
793  'color' => 'olive',
794  ];
795  $gifBuilder->makeBox($image, $conf, $workArea);
796  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdBox') . '.webp';
797  $gifBuilder->ImageWrite($image, $outputFile);
798  $result = [
799  'fileExists' => true,
800  'outputFile' => $outputFile,
801  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-box.webp',
802  'command' => $gifBuilder->getGraphicalFunctions()->IM_commands,
803  ];
804  return $this->‪getImageTestResponse($result);
805  }
806 
810  public function ‪imageProcessingGdlibRenderTextAction(): ResponseInterface
811  {
812  $gifBuilder = $this->‪initializeGifBuilder();
813  $image = imagecreatetruecolor(300, 225);
814  $backgroundColor = imagecolorallocate($image, 128, 128, 150);
815  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
816  $workArea = [0, 0, 300, 225];
817  $conf = [
818  'iterations' => 1,
819  'angle' => 0,
820  'antiAlias' => 1,
821  'text' => 'HELLO WORLD',
822  'fontColor' => '#003366',
823  'fontSize' => 30,
824  'fontFile' => ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
825  'offset' => '30,80',
826  ];
827  $conf['BBOX'] = $gifBuilder->calcBBox($conf);
828  $gifBuilder->makeText($image, $conf, $workArea);
829  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdText') . '.png';
830  $gifBuilder->ImageWrite($image, $outputFile);
831  $result = [
832  'fileExists' => true,
833  'outputFile' => $outputFile,
834  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-text.png',
835  'command' => $gifBuilder->getGraphicalFunctions()->IM_commands,
836  ];
837  return $this->‪getImageTestResponse($result);
838  }
839 
843  public function ‪imageProcessingGdlibNiceTextAction(): ResponseInterface
844  {
845  if (!$this->‪isImageMagickEnabledAndConfigured()) {
846  return new ‪JsonResponse([
847  'success' => true,
848  'status' => [$this->‪imageMagickDisabledMessage()],
849  ]);
850  }
851  $gifBuilder = $this->‪initializeGifBuilder();
852  $image = imagecreatetruecolor(300, 225);
853  $backgroundColor = imagecolorallocate($image, 128, 128, 150);
854  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
855  $workArea = [0, 0, 300, 225];
856  $conf = [
857  'iterations' => 1,
858  'angle' => 0,
859  'antiAlias' => 1,
860  'text' => 'HELLO WORLD',
861  'fontColor' => '#003366',
862  'fontSize' => 30,
863  'fontFile' => ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
864  'offset' => '30,80',
865  ];
866  $conf['BBOX'] = $gifBuilder->calcBBox($conf);
867  $gifBuilder->makeText($image, $conf, $workArea);
868  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdText') . '.png';
869  $gifBuilder->ImageWrite($image, $outputFile);
870  $conf['offset'] = '30,120';
871  $conf['niceText'] = 1;
872  $gifBuilder->makeText($image, $conf, $workArea);
873  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdNiceText') . '.png';
874  $gifBuilder->ImageWrite($image, $outputFile);
875  $result = [
876  'fileExists' => true,
877  'outputFile' => $outputFile,
878  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-niceText.png',
879  'command' => $gifBuilder->getGraphicalFunctions()->IM_commands,
880  ];
881  return $this->‪getImageTestResponse($result);
882  }
883 
887  public function ‪imageProcessingGdlibNiceTextShadowAction(): ResponseInterface
888  {
889  if (!$this->‪isImageMagickEnabledAndConfigured()) {
890  return new ‪JsonResponse([
891  'success' => true,
892  'status' => [$this->‪imageMagickDisabledMessage()],
893  ]);
894  }
895  $gifBuilder = $this->‪initializeGifBuilder();
896  $image = imagecreatetruecolor(300, 225);
897  $backgroundColor = imagecolorallocate($image, 128, 128, 150);
898  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
899  $workArea = [0, 0, 300, 225];
900  $conf = [
901  'iterations' => 1,
902  'angle' => 0,
903  'antiAlias' => 1,
904  'text' => 'HELLO WORLD',
905  'fontColor' => '#003366',
906  'fontSize' => 30,
907  'fontFile' => ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
908  'offset' => '30,80',
909  ];
910  $conf['BBOX'] = $gifBuilder->calcBBox($conf);
911  $gifBuilder->makeText($image, $conf, $workArea);
912  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdText') . '.png';
913  $gifBuilder->ImageWrite($image, $outputFile);
914  $conf['offset'] = '30,120';
915  $conf['niceText'] = 1;
916  $gifBuilder->makeText($image, $conf, $workArea);
917  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('gdNiceText') . '.png';
918  $gifBuilder->ImageWrite($image, $outputFile);
919  $conf['offset'] = '30,160';
920  $conf['niceText'] = 1;
921  $conf['shadow.'] = [
922  'offset' => '2,2',
923  'blur' => '20',
924  'opacity' => '50',
925  'color' => 'black',
926  ];
927  // Warning: Re-uses $image from above!
928  $gifBuilder->makeShadow($image, $conf['shadow.'], $workArea, $conf);
929  $gifBuilder->makeText($image, $conf, $workArea);
930  $outputFile = $this->‪getImagesPath() . 'installTool-' . ‪StringUtility::getUniqueId('GDwithText-niceText-shadow') . '.png';
931  $gifBuilder->ImageWrite($image, $outputFile);
932  $result = [
933  'fileExists' => true,
934  'outputFile' => $outputFile,
935  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-shadow.png',
936  'command' => $gifBuilder->getGraphicalFunctions()->IM_commands,
937  ];
938  return $this->‪getImageTestResponse($result);
939  }
940 
945  {
946  return GeneralUtility::makeInstance(GifBuilder::class);
947  }
948 
952  protected function ‪initializeGraphicalFunctions(): GraphicalFunctions
953  {
954  $imageService = GeneralUtility::makeInstance(GraphicalFunctions::class);
955  $imageService->dontCheckForExistingTempFile = true;
956  $imageService->filenamePrefix = 'installTool-';
957  $imageService->alternativeOutputKey = 'typo3InstallTest';
958  $imageService->setImageFileExt(self::IMAGE_FILE_EXT);
959  return $imageService;
960  }
961 
967  protected function ‪determineImageMagickVersion(): string
968  {
969  $command = ‪CommandUtility::imageMagickCommand('identify', '-version');
970  ‪CommandUtility::exec($command, $result);
971  $string = $result[0] ?? '';
972  $version = '';
973  if (!empty($string)) {
974  [, $version] = explode('Magick', $string);
975  [$version] = explode(' ', trim($version));
976  $version = trim($version);
977  }
978  return $version;
979  }
980 
984  protected function ‪convertImageFormatsToJpg(string $inputFormat): ResponseInterface
985  {
986  if (!$this->‪isImageMagickEnabledAndConfigured()) {
987  return new ‪JsonResponse([
988  'success' => true,
989  'status' => [$this->‪imageMagickDisabledMessage()],
990  ]);
991  }
992  if (!‪GeneralUtility::inList(‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $inputFormat)) {
993  return new ‪JsonResponse([
994  'success' => true,
995  'status' => [
996  new ‪FlashMessage(
997  'Handling format ' . $inputFormat . ' must be enabled in TYPO3_CONF_VARS[\'GFX\'][\'imagefile_ext\']',
998  'Skipped test',
999  ContextualFeedbackSeverity::WARNING
1000  ),
1001  ],
1002  ]);
1003  }
1004  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
1005  $imageService = $this->‪initializeGraphicalFunctions();
1006  $inputFile = $imageBasePath . 'TestInput/Test.' . $inputFormat;
1007  $imageService->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('read') . '-' . $inputFormat;
1008  $imResult = $imageService->resize($inputFile, 'jpg', '300', '', '', [], true);
1009  if ($imResult !== null) {
1010  $result = [
1011  'fileExists' => $imResult->isFile(),
1012  'outputFile' => $imResult->getRealPath(),
1013  'referenceFile' => self::TEST_REFERENCE_PATH . '/Read-' . $inputFormat . '.jpg',
1014  'command' => $imageService->IM_commands,
1015  ];
1016  } else {
1017  $result = [
1018  'status' => [$this->‪imageGenerationFailedMessage()],
1019  'command' => $imageService->IM_commands,
1020  ];
1021  }
1022  return $this->‪getImageTestResponse($result);
1023  }
1024 
1028  protected function ‪getDatabaseConnectionInformation(): array
1029  {
1030  $connectionInfos = [];
1031  $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
1032  foreach ($connectionPool->getConnectionNames() as $connectionName) {
1033  $connection = $connectionPool->getConnectionByName($connectionName);
1034  $connectionParameters = $connection->getParams();
1035  $connectionInfo = [
1036  'connectionName' => $connectionName,
1037  'version' => $connection->getPlatformServerVersion(),
1038  'databaseName' => $connection->getDatabase(),
1039  'username' => $connectionParameters['user'] ?? '',
1040  'host' => $connectionParameters['host'] ?? '',
1041  'port' => $connectionParameters['port'] ?? '',
1042  'socket' => $connectionParameters['unix_socket'] ?? '',
1043  'numberOfTables' => count($connection->createSchemaManager()->listTableNames()),
1044  'numberOfMappedTables' => 0,
1045  ];
1046  if (isset(‪$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
1047  && is_array(‪$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
1048  ) {
1049  // Count number of array keys having $connectionName as value
1050  $connectionInfo['numberOfMappedTables'] = count(array_intersect(
1051  ‪$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'],
1052  [$connectionName]
1053  ));
1054  }
1055  $connectionInfos[] = $connectionInfo;
1056  }
1057  return $connectionInfos;
1058  }
1059 
1063  protected function ‪getApplicationContextInformation(): array
1064  {
1065  $applicationContext = ‪Environment::getContext();
1066  $status = $applicationContext->isProduction() ? InformationStatus::OK : InformationStatus::WARNING;
1067 
1068  return [
1069  'context' => (string)$applicationContext,
1070  'status' => $status->value,
1071  ];
1072  }
1073 
1086  protected function ‪getSenderEmailAddress(): string
1087  {
1088  return ‪$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] ?? '';
1089  }
1090 
1096  protected function ‪getSenderEmailName(): string
1097  {
1098  return !empty(‪$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'])
1099  ? ‪$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']
1100  : 'TYPO3 CMS install tool';
1101  }
1102 
1108  protected function ‪getEmailSubject(): string
1109  {
1110  ‪$name = !empty(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])
1111  ? ' from site "' . ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '"'
1112  : '';
1113  return 'Test TYPO3 CMS mail delivery' . ‪$name;
1114  }
1115 
1119  protected function ‪getImageTestResponse(array $testResult): ResponseInterface
1120  {
1121  $responseData = [
1122  'success' => true,
1123  ];
1124  foreach ($testResult as $resultKey => $value) {
1125  if ($resultKey === 'referenceFile' && !empty($testResult['referenceFile'])) {
1126  $referenceFileArray = explode('.', $testResult['referenceFile']);
1127  $fileExt = end($referenceFileArray);
1128  $responseData['referenceFile'] = 'data:image/' . $fileExt . ';base64,' . base64_encode((string)file_get_contents($testResult['referenceFile']));
1129  } elseif ($resultKey === 'outputFile' && !empty($testResult['outputFile'])) {
1130  $outputFileArray = explode('.', $testResult['outputFile']);
1131  $fileExt = end($outputFileArray);
1132  $responseData['outputFile'] = 'data:image/' . $fileExt . ';base64,' . base64_encode((string)file_get_contents($testResult['outputFile']));
1133  } else {
1134  $responseData[$resultKey] = $value;
1135  }
1136  }
1137  return new ‪JsonResponse($responseData);
1138  }
1139 
1144  {
1145  return new ‪FlashMessage(
1146  'ImageMagick / GraphicsMagick handling is enabled, but the execute'
1147  . ' command returned an error. Please check your settings, especially'
1148  . ' [\'GFX\'][\'processor_path\'] and ensure Ghostscript is installed on your server.',
1149  'Image generation failed',
1150  ContextualFeedbackSeverity::ERROR
1151  );
1152  }
1153 
1159  protected function ‪isImageMagickEnabledAndConfigured(): bool
1160  {
1161  $enabled = ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'];
1162  $path = ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path'];
1163  return $enabled && $path;
1164  }
1165 
1170  {
1171  return new ‪FlashMessage(
1172  'ImageMagick / GraphicsMagick handling is disabled or not configured correctly.',
1173  'Tests not executed',
1174  ContextualFeedbackSeverity::ERROR
1175  );
1176  }
1177 
1182  protected function ‪getImagesPath(): string
1183  {
1184  $imagePath = ‪Environment::getPublicPath() . '/typo3temp/assets/images/';
1185  if (!is_dir($imagePath)) {
1186  ‪GeneralUtility::mkdir_deep($imagePath);
1187  }
1188  return $imagePath;
1189  }
1190 }
‪TYPO3\CMS\Install\Controller\EnvironmentController\isImageMagickEnabledAndConfigured
‪bool isImageMagickEnabledAndConfigured()
Definition: EnvironmentController.php:1159
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageGenerationFailedMessage
‪imageGenerationFailedMessage()
Definition: EnvironmentController.php:1143
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineJpgMaskAction
‪imageProcessingCombineJpgMaskAction()
Definition: EnvironmentController.php:697
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadJpgAction
‪imageProcessingReadJpgAction()
Definition: EnvironmentController.php:381
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToGifAction
‪imageProcessingGifToGifAction()
Definition: EnvironmentController.php:534
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingJpgToWebpAction
‪imageProcessingJpgToWebpAction()
Definition: EnvironmentController.php:630
‪TYPO3\CMS\Install\Controller\EnvironmentController\systemInformationGetDataAction
‪systemInformationGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:80
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibSimpleAction
‪imageProcessingGdlibSimpleAction()
Definition: EnvironmentController.php:732
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadGifAction
‪imageProcessingReadGifAction()
Definition: EnvironmentController.php:397
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextAction
‪imageProcessingGdlibNiceTextAction()
Definition: EnvironmentController.php:843
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static getPublicPath()
Definition: Environment.php:187
‪TYPO3\CMS\Backend\Toolbar\InformationStatus
‪InformationStatus
Definition: InformationStatus.php:24
‪TYPO3\CMS\Install\Controller\EnvironmentController
Definition: EnvironmentController.php:55
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextShadowAction
‪imageProcessingGdlibNiceTextShadowAction()
Definition: EnvironmentController.php:887
‪TYPO3\CMS\Core\Mail\MailerInterface
Definition: MailerInterface.php:28
‪TYPO3\CMS\Install\FolderStructure\DefaultFactory
Definition: DefaultFactory.php:26
‪TYPO3\CMS\Install\Controller\EnvironmentController\TEST_REFERENCE_PATH
‪const TEST_REFERENCE_PATH
Definition: EnvironmentController.php:57
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibFromFileAction
‪imageProcessingGdlibFromFileAction()
Definition: EnvironmentController.php:758
‪TYPO3\CMS\Install\Controller\EnvironmentController\IMAGE_FILE_EXT
‪const IMAGE_FILE_EXT
Definition: EnvironmentController.php:56
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep
‪static mkdir_deep(string $directory)
Definition: GeneralUtility.php:1652
‪TYPO3\CMS\Install\WebserverType
‪WebserverType
Definition: WebserverType.php:26
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWritePngAction
‪imageProcessingWritePngAction()
Definition: EnvironmentController.php:471
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:32
‪TYPO3\CMS\Core\Type\ContextualFeedbackSeverity
‪ContextualFeedbackSeverity
Definition: ContextualFeedbackSeverity.php:25
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadTifAction
‪imageProcessingReadTifAction()
Definition: EnvironmentController.php:413
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadAiAction
‪imageProcessingReadAiAction()
Definition: EnvironmentController.php:429
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck
Definition: DatabaseCheck.php:71
‪TYPO3\CMS\Install\Controller\EnvironmentController\convertImageFormatsToJpg
‪convertImageFormatsToJpg(string $inputFormat)
Definition: EnvironmentController.php:984
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageMagickDisabledMessage
‪imageMagickDisabledMessage()
Definition: EnvironmentController.php:1169
‪TYPO3\CMS\Install\Controller\EnvironmentController\folderStructureFixAction
‪folderStructureFixAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:198
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath
‪static extPath(string $key, string $script='')
Definition: ExtensionManagementUtility.php:82
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadPdfAction
‪imageProcessingReadPdfAction()
Definition: EnvironmentController.php:421
‪TYPO3\CMS\Core\Utility\CommandUtility\exec
‪static exec(string|array $command, ?array &$output=null, int &$returnValue=0)
Definition: CommandUtility.php:92
‪TYPO3\CMS\Core\Mail\FluidEmail
Definition: FluidEmail.php:35
‪TYPO3\CMS\Install\Controller
Definition: AbstractController.php:18
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibFromFileToWebpAction
‪imageProcessingGdlibFromFileToWebpAction()
Definition: EnvironmentController.php:784
‪TYPO3\CMS\Install\Controller\EnvironmentController\getDatabaseConnectionInformation
‪getDatabaseConnectionInformation()
Definition: EnvironmentController.php:1028
‪TYPO3\CMS\Install\Controller\EnvironmentController\mailTestGetDataAction
‪mailTestGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:212
‪TYPO3\CMS\Install\Controller\EnvironmentController\getImageTestResponse
‪getImageTestResponse(array $testResult)
Definition: EnvironmentController.php:1119
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGetDataAction
‪imageProcessingGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:320
‪TYPO3\CMS\Install\Controller\EnvironmentController\phpInfoGetDataAction
‪phpInfoGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:99
‪$name
‪$name
Definition: phpIntegrityChecker.php:235
‪TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ServerResponseCheck
Definition: ServerResponseCheck.php:43
‪TYPO3\CMS\Install\Controller\EnvironmentController\folderStructureGetStatusAction
‪folderStructureGetStatusAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:153
‪TYPO3\CMS\Install\Controller\EnvironmentController\determineImageMagickVersion
‪string determineImageMagickVersion()
Definition: EnvironmentController.php:967
‪TYPO3\CMS\Install\Controller\EnvironmentController\mailTestAction
‪mailTestAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:261
‪TYPO3\CMS\Install\Controller\EnvironmentController\getImagesPath
‪getImagesPath()
Definition: EnvironmentController.php:1182
‪TYPO3\CMS\Install\Service\LateBootService
Definition: LateBootService.php:27
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineGifMaskAction
‪imageProcessingCombineGifMaskAction()
Definition: EnvironmentController.php:662
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck
‪TYPO3\CMS\Frontend\Imaging\GifBuilder
Definition: GifBuilder.php:58
‪TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions
‪static bool fixPermissions(string $path, bool $recursive=false)
Definition: GeneralUtility.php:1494
‪TYPO3\CMS\Install\Controller\AbstractController\initializeView
‪initializeView(ServerRequestInterface $request)
Definition: AbstractController.php:39
‪TYPO3\CMS\Install\Controller\EnvironmentController\initializeGraphicalFunctions
‪initializeGraphicalFunctions()
Definition: EnvironmentController.php:952
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadWebpAction
‪imageProcessingReadWebpAction()
Definition: EnvironmentController.php:389
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:27
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:43
‪TYPO3\CMS\Install\SystemEnvironment\Check
Definition: Check.php:45
‪TYPO3\CMS\Core\Http\JsonResponse
Definition: JsonResponse.php:28
‪TYPO3\CMS\Core\Core\Environment\isRunningOnCgiServer
‪static isRunningOnCgiServer()
Definition: Environment.php:292
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Install\Controller\EnvironmentController\getApplicationContextInformation
‪getApplicationContextInformation()
Definition: EnvironmentController.php:1063
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Install\Controller\EnvironmentController\getSenderEmailAddress
‪string getSenderEmailAddress()
Definition: EnvironmentController.php:1086
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToJpgAction
‪imageProcessingGifToJpgAction()
Definition: EnvironmentController.php:598
‪TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand
‪static string imageMagickCommand(string $command, string $parameters, string $path='')
Definition: CommandUtility.php:124
‪TYPO3\CMS\Install\SystemEnvironment\SetupCheck
Definition: SetupCheck.php:38
‪TYPO3\CMS\Install\Controller\AbstractController
Definition: AbstractController.php:35
‪TYPO3\CMS\Core\Utility\GeneralUtility\inList
‪static bool inList($list, $item)
Definition: GeneralUtility.php:422
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWriteGifAction
‪imageProcessingWriteGifAction()
Definition: EnvironmentController.php:437
‪TYPO3\CMS\Install\Controller\EnvironmentController\environmentCheckGetStatusAction
‪environmentCheckGetStatusAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:111
‪TYPO3\CMS\Install\Controller\EnvironmentController\getSenderEmailName
‪getSenderEmailName()
Definition: EnvironmentController.php:1096
‪TYPO3\CMS\Core\Http\fromRequest
‪@ fromRequest
Definition: ApplicationType.php:66
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Install\Controller\EnvironmentController\cardsAction
‪cardsAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:68
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:24
‪TYPO3\CMS\Install\Controller\EnvironmentController\__construct
‪__construct(private readonly LateBootService $lateBootService, private readonly FormProtectionFactory $formProtectionFactory, private readonly MailerInterface $mailer,)
Definition: EnvironmentController.php:59
‪TYPO3\CMS\Core\Utility\CommandUtility
Definition: CommandUtility.php:58
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:29
‪TYPO3\CMS\Install\Controller\EnvironmentController\initializeGifBuilder
‪initializeGifBuilder()
Definition: EnvironmentController.php:944
‪TYPO3\CMS\Core\Core\Environment\getContext
‪static getContext()
Definition: Environment.php:128
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingPngToPngAction
‪imageProcessingPngToPngAction()
Definition: EnvironmentController.php:566
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadPngAction
‪imageProcessingReadPngAction()
Definition: EnvironmentController.php:405
‪TYPO3\CMS\Install\Controller\EnvironmentController\getEmailSubject
‪getEmailSubject()
Definition: EnvironmentController.php:1108
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static getUniqueId(string $prefix='')
Definition: StringUtility.php:57
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingTrueTypeAction
‪imageProcessingTrueTypeAction()
Definition: EnvironmentController.php:347
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibRenderTextAction
‪imageProcessingGdlibRenderTextAction()
Definition: EnvironmentController.php:810
‪TYPO3\CMS\Install\FolderStructure\DefaultPermissionsCheck
Definition: DefaultPermissionsCheck.php:27
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWriteWebpAction
‪imageProcessingWriteWebpAction()
Definition: EnvironmentController.php:502
‪TYPO3\CMS\Core\Core\Environment\isWindows
‪static isWindows()
Definition: Environment.php:276