[BUGFIX] Use mod.linkvalidator settings in scheduler 13/26513/6
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Sun, 1 Feb 2015 11:58:02 +0000 (12:58 +0100)
committerFrank Nägler <typo3@naegler.net>
Mon, 16 Mar 2015 21:25:44 +0000 (22:25 +0100)
Since mod.linkvalidator is used in all other places in the linkvalidator
as TSConfig key it is now also used in the scheduler to override existing
TSConfig.

To maintain backward compatibility the old mod.tx_linkvalidator setting
will be respected and a deprecation warning will be logged.

Resolves: #51360
Releases: master
Change-Id: I6e6692d2ff6543f1154e4d64feb52efc5cdfcf83
Reviewed-on: http://review.typo3.org/26513
Reviewed-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-51360-LinkValidatorSchedulerSettings.rst [new file with mode: 0644]
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-51360-LinkValidatorSchedulerSettings.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-51360-LinkValidatorSchedulerSettings.rst
new file mode 100644 (file)
index 0000000..f29f82f
--- /dev/null
@@ -0,0 +1,30 @@
+====================================================================================
+Deprecation: #51360 - Deprecate mod.tx_linkvalidator namespace in scheduler settings
+====================================================================================
+
+Description
+===========
+
+Using the :code:`mod.tx_linkvalidator` namespace in the linkvalidator scheduler task
+settings is deprecated. To make the setting consistent with TSconfig the namespace
+is changed to :code:`mod.linkvalidator`.
+
+
+Impact
+======
+
+Using :code:`mod.tx_linkvalidator` in the scheduler task settings will add an entry
+to the deprecation log.
+
+
+Affected installations
+======================
+
+Instances which use the linkvalidator scheduler taks and use custom TSconfig in the task settings.
+
+
+Migration
+=========
+
+Replace :code:`mod.tx_linkvalidator` with :code:`mod.linkvalidator` in all affected scheduler tasks.
+
index 0d121ee..11f6919 100644 (file)
@@ -340,9 +340,15 @@ class ValidatorTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
                }
                $tsConfig = $parseObj->setup;
                $modTs = $modTs['properties'];
-               $overrideTs = $tsConfig['mod.']['tx_linkvalidator.'];
+               $overrideTs = $tsConfig['mod.']['linkvalidator.'];
                if (is_array($overrideTs)) {
                        ArrayUtility::mergeRecursiveWithOverrule($modTs, $overrideTs);
+               } else {
+                       $deprecatedOverrideTs = $tsConfig['mod.']['tx_linkvalidator.'];
+                       if (is_array($deprecatedOverrideTs)) {
+                               GeneralUtility::deprecationLog('Using mod.tx_linkvalidator in the scheduler TSConfig setting is deprecated since TYPO3 CMS 7 and will be removed in TYPO3 CMS 8. Please use mod.linkvalidator instead.');
+                               ArrayUtility::mergeRecursiveWithOverrule($modTs, $deprecatedOverrideTs);
+                       }
                }
                return $modTs;
        }