29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-24 22:39:31 +00:00

[4.0] Fixing unittests for PHP7.4/8.0 (#25709)

This commit is contained in:
Hannes Papenberg 2019-07-27 10:35:06 +02:00 committed by George Wilson
parent 909047292c
commit af17679f73
5 changed files with 103 additions and 67 deletions

View File

@ -81,7 +81,7 @@
"joomla/string": "~2.0@dev",
"joomla/uri": "~2.0@dev",
"joomla/utilities": "~2.0@dev",
"algo26-matthias/idna-convert": "~1.1",
"algo26-matthias/idna-convert": "~3.0",
"defuse/php-encryption": "~2.1",
"doctrine/inflector": "1.2.0",
"fig/link-util": "~1.0",

157
composer.lock generated
View File

@ -4,35 +4,35 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bfc6490bb10b548e5d1181cd62a8852a",
"content-hash": "f8ea358ca4ef2ab0915a136f377a5e04",
"packages": [
{
"name": "algo26-matthias/idna-convert",
"version": "v1.1.0",
"version": "v3.0.1",
"source": {
"type": "git",
"url": "https://github.com/algo26-matthias/idna-convert.git",
"reference": "a6dfb6f87611e3a89d2eec4924a0f51db755c573"
"reference": "893d5918fd99ea12a427c714f3a02031fabe60b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/algo26-matthias/idna-convert/zipball/a6dfb6f87611e3a89d2eec4924a0f51db755c573",
"reference": "a6dfb6f87611e3a89d2eec4924a0f51db755c573",
"url": "https://api.github.com/repos/algo26-matthias/idna-convert/zipball/893d5918fd99ea12a427c714f3a02031fabe60b0",
"reference": "893d5918fd99ea12a427c714f3a02031fabe60b0",
"shasum": ""
},
"require": {
"ext-pcre": "*",
"php": ">=5.6.0"
"jakeasmith/http_build_url": "^1",
"php": "^7.2.0"
},
"suggest": {
"ext-iconv": "Install ext/iconv for using input / output other than UTF-8 or ISO-8859-1",
"ext-mbstring": "Install ext/mbstring for using input / output other than UTF-8 or ISO-8859-1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Mso\\IdnaConvert\\": "src"
"Algo26\\IdnaConvert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -42,7 +42,7 @@
"authors": [
{
"name": "Matthias Sommerfeld",
"email": "mso@phlylabs.de",
"email": "matthias.sommerfeld@algo26.de",
"role": "Developer"
}
],
@ -53,7 +53,7 @@
"idna",
"php"
],
"time": "2016-06-19T18:08:43+00:00"
"time": "2019-03-28T17:45:10+00:00"
},
{
"name": "composer/ca-bundle",
@ -342,18 +342,51 @@
],
"time": "2019-05-24T12:44:03+00:00"
},
{
"name": "jakeasmith/http_build_url",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/jakeasmith/http_build_url.git",
"reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jakeasmith/http_build_url/zipball/93c273e77cb1edead0cf8bcf8cd2003428e74e37",
"reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37",
"shasum": ""
},
"type": "library",
"autoload": {
"files": [
"src/http_build_url.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jake A. Smith",
"email": "theman@jakeasmith.com"
}
],
"description": "Provides functionality for http_build_url() to environments without pecl_http.",
"time": "2017-05-01T15:36:40+00:00"
},
{
"name": "joomla/application",
"version": "dev-2.0-dev",
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/application.git",
"reference": "cb7e310fef06529063ec6891fdba6c5895c1bd99"
"reference": "3d549e0248cd8973f0c5b66fe49f4647c756488d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/application/zipball/cb7e310fef06529063ec6891fdba6c5895c1bd99",
"reference": "cb7e310fef06529063ec6891fdba6c5895c1bd99",
"url": "https://api.github.com/repos/joomla-framework/application/zipball/3d549e0248cd8973f0c5b66fe49f4647c756488d",
"reference": "3d549e0248cd8973f0c5b66fe49f4647c756488d",
"shasum": ""
},
"require": {
@ -404,7 +437,7 @@
"framework",
"joomla"
],
"time": "2019-07-14T19:44:25+00:00"
"time": "2019-07-17T23:15:23+00:00"
},
{
"name": "joomla/archive",
@ -464,12 +497,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/authentication.git",
"reference": "0f3e8838322869ea2e00ac5cd2780b0346886a70"
"reference": "a577eac4c5654e1b347feb36a3991da4fb04d7ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/authentication/zipball/0f3e8838322869ea2e00ac5cd2780b0346886a70",
"reference": "0f3e8838322869ea2e00ac5cd2780b0346886a70",
"url": "https://api.github.com/repos/joomla-framework/authentication/zipball/a577eac4c5654e1b347feb36a3991da4fb04d7ab",
"reference": "a577eac4c5654e1b347feb36a3991da4fb04d7ab",
"shasum": ""
},
"require": {
@ -508,7 +541,7 @@
"framework",
"joomla"
],
"time": "2019-06-19T00:51:06+00:00"
"time": "2019-07-17T23:41:23+00:00"
},
{
"name": "joomla/console",
@ -516,12 +549,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/console.git",
"reference": "85fd3b5b46d86f61fa3d129d19cabcabee44bc6c"
"reference": "58b6a5545c87cb1eaf82bd9fd703e8c332ca89e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/console/zipball/85fd3b5b46d86f61fa3d129d19cabcabee44bc6c",
"reference": "85fd3b5b46d86f61fa3d129d19cabcabee44bc6c",
"url": "https://api.github.com/repos/joomla-framework/console/zipball/58b6a5545c87cb1eaf82bd9fd703e8c332ca89e3",
"reference": "58b6a5545c87cb1eaf82bd9fd703e8c332ca89e3",
"shasum": ""
},
"require": {
@ -561,7 +594,7 @@
"framework",
"joomla"
],
"time": "2019-07-14T18:55:56+00:00"
"time": "2019-07-18T00:30:45+00:00"
},
{
"name": "joomla/controller",
@ -722,12 +755,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/database.git",
"reference": "1752fa13c46f6cac553518ff6cf53b288f05133a"
"reference": "60a7df9e4df83c2269fbc229a396cb6a324e417f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/database/zipball/1752fa13c46f6cac553518ff6cf53b288f05133a",
"reference": "1752fa13c46f6cac553518ff6cf53b288f05133a",
"url": "https://api.github.com/repos/joomla-framework/database/zipball/60a7df9e4df83c2269fbc229a396cb6a324e417f",
"reference": "60a7df9e4df83c2269fbc229a396cb6a324e417f",
"shasum": ""
},
"require": {
@ -779,7 +812,7 @@
"framework",
"joomla"
],
"time": "2019-07-10T16:54:07+00:00"
"time": "2019-07-22T20:04:16+00:00"
},
{
"name": "joomla/di",
@ -787,12 +820,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/di.git",
"reference": "55db6dc7ad2e8cb778c224608b8d2c8569e18af5"
"reference": "46a30b4e27234e914b826d91d2ee20a820f8ceab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/di/zipball/55db6dc7ad2e8cb778c224608b8d2c8569e18af5",
"reference": "55db6dc7ad2e8cb778c224608b8d2c8569e18af5",
"url": "https://api.github.com/repos/joomla-framework/di/zipball/46a30b4e27234e914b826d91d2ee20a820f8ceab",
"reference": "46a30b4e27234e914b826d91d2ee20a820f8ceab",
"shasum": ""
},
"require": {
@ -831,7 +864,7 @@
"ioc",
"joomla"
],
"time": "2019-06-19T01:48:32+00:00"
"time": "2019-07-18T00:06:37+00:00"
},
{
"name": "joomla/event",
@ -839,12 +872,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/event.git",
"reference": "dd9f0179ee8a6a68dfe970bc43fe5ed3a712ecee"
"reference": "5b854c580bdbad39324e22a6af2c0b68379b9905"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/event/zipball/dd9f0179ee8a6a68dfe970bc43fe5ed3a712ecee",
"reference": "dd9f0179ee8a6a68dfe970bc43fe5ed3a712ecee",
"url": "https://api.github.com/repos/joomla-framework/event/zipball/5b854c580bdbad39324e22a6af2c0b68379b9905",
"reference": "5b854c580bdbad39324e22a6af2c0b68379b9905",
"shasum": ""
},
"require": {
@ -880,7 +913,7 @@
"framework",
"joomla"
],
"time": "2019-07-12T00:49:37+00:00"
"time": "2019-07-18T00:09:24+00:00"
},
{
"name": "joomla/filesystem",
@ -989,12 +1022,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/http.git",
"reference": "cb6e8bcad6bbf7be3f1b21b6868116636c97e727"
"reference": "91aecbdeee2f38cfe518e568e9d1f09b344c6b25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/http/zipball/cb6e8bcad6bbf7be3f1b21b6868116636c97e727",
"reference": "cb6e8bcad6bbf7be3f1b21b6868116636c97e727",
"url": "https://api.github.com/repos/joomla-framework/http/zipball/91aecbdeee2f38cfe518e568e9d1f09b344c6b25",
"reference": "91aecbdeee2f38cfe518e568e9d1f09b344c6b25",
"shasum": ""
},
"require": {
@ -1035,7 +1068,7 @@
"http",
"joomla"
],
"time": "2019-07-14T18:24:22+00:00"
"time": "2019-07-18T00:24:34+00:00"
},
{
"name": "joomla/image",
@ -3216,16 +3249,16 @@
},
{
"name": "codeception/codeception",
"version": "3.0.2",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
"reference": "aead7eb0a53b040390a927dc84a0e6e37ffa8a2b"
"reference": "feb566a9dc26993611602011ae3834d8e3c1dd7f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/aead7eb0a53b040390a927dc84a0e6e37ffa8a2b",
"reference": "aead7eb0a53b040390a927dc84a0e6e37ffa8a2b",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/feb566a9dc26993611602011ae3834d8e3c1dd7f",
"reference": "feb566a9dc26993611602011ae3834d8e3c1dd7f",
"shasum": ""
},
"require": {
@ -3250,6 +3283,8 @@
},
"require-dev": {
"codeception/specify": "~0.3",
"doctrine/annotations": "^1",
"doctrine/orm": "^2",
"flow/jsonpath": "~0.2",
"monolog/monolog": "~1.8",
"pda/pheanstalk": "~3.0",
@ -3304,7 +3339,7 @@
"functional testing",
"unit testing"
],
"time": "2019-06-22T19:16:46+00:00"
"time": "2019-07-18T16:21:08+00:00"
},
{
"name": "codeception/phpunit-wrapper",
@ -6036,16 +6071,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "7.0.6",
"version": "7.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "d471d0d2b529a67c6a722dd446c4ec90881ac315"
"reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d471d0d2b529a67c6a722dd446c4ec90881ac315",
"reference": "d471d0d2b529a67c6a722dd446c4ec90881ac315",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7743bbcfff2a907e9ee4a25be13d0f8ec5e73800",
"reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800",
"shasum": ""
},
"require": {
@ -6054,7 +6089,7 @@
"php": "^7.2",
"phpunit/php-file-iterator": "^2.0.2",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-token-stream": "^3.0.2",
"phpunit/php-token-stream": "^3.1.0",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^4.2.2",
"sebastian/version": "^2.0.1",
@ -6084,8 +6119,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
"role": "lead",
"email": "sebastian@phpunit.de"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
@ -6095,7 +6130,7 @@
"testing",
"xunit"
],
"time": "2019-07-08T05:29:42+00:00"
"time": "2019-07-25T05:31:54+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -6239,16 +6274,16 @@
},
{
"name": "phpunit/php-token-stream",
"version": "3.0.2",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c"
"reference": "e899757bb3df5ff6e95089132f32cd59aac2220a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c",
"reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a",
"reference": "e899757bb3df5ff6e95089132f32cd59aac2220a",
"shasum": ""
},
"require": {
@ -6261,7 +6296,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@ -6284,7 +6319,7 @@
"keywords": [
"tokenizer"
],
"time": "2019-07-08T05:24:54+00:00"
"time": "2019-07-25T05:29:42+00:00"
},
{
"name": "phpunit/phpunit",

View File

@ -70,6 +70,6 @@ abstract class JHtmlTel
$display[4] = '.e164.arpa';
}
return implode($display, '');
return implode('', $display);
}
}

View File

@ -160,7 +160,7 @@ class BaseLayout implements LayoutInterface
*/
public function renderDebugMessages()
{
return implode($this->debugMessages, "\n");
return implode("\n", $this->debugMessages);
}
/**

View File

@ -11,7 +11,8 @@ namespace Joomla\CMS\String;
defined('JPATH_PLATFORM') or die;
use Joomla\Uri\UriHelper;
use Mso\IdnaConvert\IdnaConvert;
use Algo26\IdnaConvert\ToIdn;
use Algo26\IdnaConvert\ToUnicode;
/**
* Joomla Platform String Punycode Class
@ -35,7 +36,7 @@ abstract class PunycodeHelper
*/
public static function toPunycode($utfString)
{
return (new IdnaConvert)->encode($utfString);
return (new ToIdn)->convert($utfString);
}
/**
@ -49,7 +50,7 @@ abstract class PunycodeHelper
*/
public static function fromPunycode($punycodeString)
{
return (new IdnaConvert)->decode($punycodeString);
return (new ToUnicode)->convert($punycodeString);
}
/**