Revert "[TASK] Update mso/idna-convert to 1.1.0" 48/48848/3
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 8 Jul 2016 05:20:49 +0000 (07:20 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 8 Jul 2016 05:21:32 +0000 (07:21 +0200)
This reverts commit 2b4c58865de3ad98f91f77ad17dfb34e485babcd.

mso/idna-convert >= 1.0.0 requires PHP >= 5.6.0. As TYPO3 CMS 7.6
supports PHP 5.5-7.0 we can't use the newer idna-convert versions
and must stay at v0.9.1.

Change-Id: I7e899349220056a18e50de2c4d7d36e62c35155c
Related: #76790
Releases: 7.6
Reviewed-on: https://review.typo3.org/48848
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
composer.json
composer.lock
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index ea5ba30..87209f7 100644 (file)
@@ -44,7 +44,7 @@
                "typo3/cms-composer-installers": "^1.2.8",
                "psr/http-message": "~1.0",
                "cogpowered/finediff": "~0.3.1",
-               "mso/idna-convert": "^1.1.0"
+               "mso/idna-convert": "^0.9.1"
        },
        "require-dev": {
                "phpunit/phpunit": "~4.8.0",
index ae88e6e..7b8599a 100644 (file)
@@ -4,8 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "ac9c4afb53ce61a549fbed3d7c360935",
-    "content-hash": "dfac5b4a3e4d2e1dd13538dd921785c4",
+    "hash": "572fe1d4e209dcde2d1c829b9ab08939",
+    "content-hash": "e03285824ea6dbc08c9e5a3ab2bfd7e3",
     "packages": [
         {
             "name": "cogpowered/finediff",
         },
         {
             "name": "mso/idna-convert",
-            "version": "v1.1.0",
+            "version": "v0.9.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phlylabs/idna-convert.git",
-                "reference": "a6dfb6f87611e3a89d2eec4924a0f51db755c573"
+                "reference": "0a0a09e460e63739d82c3f0c3f0e5555567a6be3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phlylabs/idna-convert/zipball/a6dfb6f87611e3a89d2eec4924a0f51db755c573",
-                "reference": "a6dfb6f87611e3a89d2eec4924a0f51db755c573",
+                "url": "https://api.github.com/repos/phlylabs/idna-convert/zipball/0a0a09e460e63739d82c3f0c3f0e5555567a6be3",
+                "reference": "0a0a09e460e63739d82c3f0c3f0e5555567a6be3",
                 "shasum": ""
             },
             "require": {
                 "ext-pcre": "*",
-                "php": ">=5.6.0"
+                "php": ">=5.0.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.0.x-dev"
+                    "dev-master": "0.9.x-dev"
                 }
             },
             "autoload": {
-                "psr-4": {
-                    "Mso\\IdnaConvert\\": "src"
-                }
+                "classmap": [
+                    "idna_convert.class.php",
+                    "uctc.php"
+                ]
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
                 "idna",
                 "php"
             ],
-            "time": "2016-06-19 18:08:43"
+            "time": "2016-01-06 21:05:46"
         },
         {
             "name": "pear/http_request2",
index 24c75a5..b924daf 100755 (executable)
@@ -92,7 +92,7 @@ class GeneralUtility
     /**
      * IDNA converter
      *
-     * @var \Mso\IdnaConvert\IdnaConvert
+     * @var \idna_convert
      */
     protected static $idnaConverter = null;
 
@@ -1311,7 +1311,7 @@ class GeneralUtility
             return self::$idnaStringCache[$value];
         } else {
             if (!self::$idnaConverter) {
-                self::$idnaConverter = new \Mso\IdnaConvert\IdnaConvert(array('idn_version' => 2008));
+                self::$idnaConverter = new \idna_convert(array('idn_version' => 2008));
             }
             self::$idnaStringCache[$value] = self::$idnaConverter->encode($value);
             return self::$idnaStringCache[$value];
index f1952dd..9c343a5 100644 (file)
@@ -4740,64 +4740,4 @@ text with a ' . $urlMatch . '$|s'),
        <el type="array"></el>
 </phparray>', $output);
     }
-
-    /**
-     * @test
-     * @dataProvider idnaEncodeDataProvider
-     * @param $actual
-     * @param $expected
-     */
-    public function idnaEncodeConvertsUnicodeCharsToASCIIString($actual, $expected)
-    {
-        $result = GeneralUtility::idnaEncode($actual);
-        $this->assertSame($expected, $result);
-    }
-
-    /**
-     * Data provider for method idnaEncode in GeneralUtility class.
-     * IDNA converter has to convert special chars (UTF-8) to ASCII compatible chars.
-     *
-     * @returns array
-     */
-    public function idnaEncodeDataProvider()
-    {
-        return [
-            'empty string' => [
-                '',
-                ''
-            ],
-            'null value' => [
-                null,
-                ''
-            ],
-            'string with ascii chars' => [
-                'example',
-                'example'
-            ],
-            'domain (1) with utf8 chars' => [
-                'dömäin.example',
-                'xn--dmin-moa0i.example'
-            ],
-            'domain (2) with utf8 chars' => [
-                'äaaa.example',
-                'xn--aaa-pla.example'
-            ],
-            'domain (3) with utf8 chars' => [
-                'déjà.vu.example',
-                'xn--dj-kia8a.vu.example'
-            ],
-            'domain (4) with utf8 chars' => [
-                'foo.âbcdéf.example',
-                'foo.xn--bcdf-9na9b.example'
-            ],
-            'domain with utf8 char (german umlaut)' => [
-                'exömple.com',
-                'xn--exmple-xxa.com'
-            ],
-            'email with utf8 char (german umlaut)' => [
-                'joe.doe@dömäin.de',
-                'joe.doe@xn--dmin-moa0i.de'
-            ]
-        ];
-    }
 }