[!!!][TASK] Remove property strict in TypoScriptParser 00/45900/4
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 14 Jan 2016 17:35:12 +0000 (18:35 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 14 Jan 2016 22:18:17 +0000 (23:18 +0100)
The property 'strict' is always true and can be removed.

Change-Id: I613b6eed47719b9eb59a8c74a1bb3aac11035154
Resolves: #72711
Releases: master
Reviewed-on: https://review.typo3.org/45900
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-72711-RemovePropertyStrictInTypoScriptParser.rst [new file with mode: 0644]

index 6aa25b9..aa93a41 100644 (file)
@@ -28,13 +28,6 @@ use TYPO3\CMS\Core\Utility\StringUtility;
 class TypoScriptParser
 {
     /**
-     * If set, then key names cannot contain characters other than [:alnum:]_\.-
-     *
-     * @var bool
-     */
-    public $strict = true;
-
-    /**
      * TypoScript hierarchy being build during parsing.
      *
      * @var array
@@ -383,7 +376,7 @@ class TypoScriptParser
                         }
                         if ($objStrName !== '') {
                             $r = array();
-                            if ($this->strict && preg_match('/[^[:alnum:]_\\\\\\.:-]/i', $objStrName, $r)) {
+                            if (preg_match('/[^[:alnum:]_\\\\\\.:-]/i', $objStrName, $r)) {
                                 $this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': Object Name String, "' . htmlspecialchars($objStrName) . '" contains invalid character "' . $r[0] . '". Must be alphanumeric or one of: "_:-\\."');
                             } else {
                                 $line = ltrim(substr($line, $varL));
@@ -685,7 +678,7 @@ class TypoScriptParser
                 }
             } else {
                 $lnRegisDone = 0;
-                if ($wipeOut && $this->strict) {
+                if ($wipeOut) {
                     unset($setup[$key]);
                     unset($setup[$subKey]);
                     if ($this->regLinenumbers) {
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-72711-RemovePropertyStrictInTypoScriptParser.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72711-RemovePropertyStrictInTypoScriptParser.rst
new file mode 100644 (file)
index 0000000..5bc9403
--- /dev/null
@@ -0,0 +1,26 @@
+=============================================================
+Breaking: #72711 - Remove property strict in TypoScriptParser
+=============================================================
+
+Description
+===========
+
+The property ``strict`` of ``\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser`` has been removed.
+
+
+Impact
+======
+
+Using the property directly in any third party extension will result in a fatal error.
+
+
+Affected Installations
+======================
+
+Instances which call the above mentioned property.
+
+
+Migration
+=========
+
+No migration available.
\ No newline at end of file