Skip to content

Commit

Permalink
Make extension TYPO3 12 compatible, drop TYPO3 10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mueller-sebastian committed Jul 4, 2024
1 parent e2c1219 commit 3c61cf5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
3 changes: 2 additions & 1 deletion Classes/ViewHelpers/PurifyViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* LICENSE.txt file that was distributed with this source code.
*/

use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use ElementareTeilchen\HtmlPurify\Service\PurifyService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
Expand Down Expand Up @@ -91,7 +92,7 @@ public static function renderStatic(

// use typoscript default values if configured
} else {
$configurationManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
$typoScript = $configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS,
'html_purify'
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('html_purify', 'Configuration/TypoScript', 'HTML purify');
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"GPL-2.0+"
],
"require": {
"typo3/cms-core": "^10.4 || ^11.5",
"typo3/cms-core": "^11.5 || ^12.4",
"ezyang/htmlpurifier": "^4.17"
},
"autoload": {
Expand Down
26 changes: 10 additions & 16 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
<?php
$EM_CONF[$_EXTKEY] = array(
$EM_CONF[$_EXTKEY] = [
'title' => 'HTML pruify',
'description' => 'Adds HTML purify functionality as viewhelper and service class to purify HTML code from unwanted HTML tags or HTML code containing XSS content.',
'category' => 'fe',
'author' => 'Sebastian Müller',
'author_email' => 'sebastian.mueller@elementare-teilchen.de',
'state' => 'stable',
'internal' => '',
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '1.2.0',
'constraints' => array(
'depends' => array(
'typo3' => '10.4.0-11.5.99',
),
'conflicts' => array(
),
'suggests' => array(
),
),
);
'version' => '2.0.0',
'constraints' => [
'depends' => [
'typo3' => '11.5.0-12.4.99'
],
'conflicts' => [],
'suggests' => []
],
];
2 changes: 1 addition & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined('TYPO3_MODE') || die('Access denied.');
defined('TYPO3') || die('Access denied.');

if (!\TYPO3\CMS\Core\Core\Environment::isComposerMode()) {
require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('html_purify') . '/Resources/Private/Php/Libraries/vendor/autoload.php';
Expand Down

0 comments on commit 3c61cf5

Please sign in to comment.