[BUGFIX] Deprecation #82254

This commit is contained in:
Daniel Huf 2021-01-25 15:31:52 +01:00
parent 2f01700413
commit 98341eec3e
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,7 @@
<?php <?php
namespace Saccas\Mjml\Domain\Renderer; namespace Saccas\Mjml\Domain\Renderer;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Utility\CommandUtility; use TYPO3\CMS\Core\Utility\CommandUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
@ -9,7 +10,7 @@ class Command implements RendererInterface
{ {
public function getHtmlFromMjml($mjml) public function getHtmlFromMjml($mjml)
{ {
$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mjml']); $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('mjml');
$temporaryMjmlFileWithPath = GeneralUtility::tempnam('mjml_', '.mjml'); $temporaryMjmlFileWithPath = GeneralUtility::tempnam('mjml_', '.mjml');

View file

@ -3,6 +3,7 @@ namespace Saccas\Mjml\Tests\Functional\Domain\Renderer;
use Saccas\Mjml\Domain\Renderer\Command; use Saccas\Mjml\Domain\Renderer\Command;
use Saccas\Mjml\Tests\Unit\AbstractUnitTestCase; use Saccas\Mjml\Tests\Unit\AbstractUnitTestCase;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Package\Package; use TYPO3\CMS\Core\Package\Package;
use TYPO3\CMS\Core\Package\PackageManager; use TYPO3\CMS\Core\Package\PackageManager;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
@ -45,7 +46,7 @@ class CommandTest extends AbstractUnitTestCase
->willReturn($packageMock); ->willReturn($packageMock);
ExtensionManagementUtility::setPackageManager($packageManagerMock); ExtensionManagementUtility::setPackageManager($packageManagerMock);
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mjml'] = serialize([ GeneralUtility::makeInstance(ExtensionConfiguration::class)->set('mjml', '', [
'nodeBinaryPath' => 'node', 'nodeBinaryPath' => 'node',
'mjmlBinaryPath' => 'node_modules/mjml/bin/', 'mjmlBinaryPath' => 'node_modules/mjml/bin/',
'mjmlBinary' => 'mjml', 'mjmlBinary' => 'mjml',