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