Fix various compatibility issues with PHP 8

This commit is contained in:
Frédéric Guillot 2022-02-08 21:44:00 -08:00 committed by Frédéric Guillot
parent f5bb55bdb8
commit 4bf3b0d459
411 changed files with 99 additions and 26046 deletions

View File

@ -76,7 +76,7 @@ class RememberMeCookie extends Base
$this->encode($token, $sequence),
$expiration,
$this->helper->url->dir(),
null,
'',
$this->request->isHTTPS(),
true
);

View File

@ -21,7 +21,7 @@ class TextHelper extends Base
*/
public function e($value)
{
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
return htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8', false);
}
/**

View File

@ -113,7 +113,7 @@ class LetterAvatarProvider extends Base implements AvatarProviderInterface
*
* @access protected
* @param string $str
* @return int[]
* @return array
*/
protected function getHSL($str)
{

View File

@ -46,7 +46,7 @@ class DatabaseUserProvider implements UserProviderInterface
* Get internal id
*
* @access public
* @return string
* @return integer
*/
public function getInternalId()
{

View File

@ -117,11 +117,11 @@ class LdapUserProvider implements UserProviderInterface
* Get internal id
*
* @access public
* @return string
* @return integer
*/
public function getInternalId()
{
return '';
return 0;
}
/**

View File

@ -46,11 +46,11 @@ abstract class OAuthUserProvider implements UserProviderInterface
* Get internal id
*
* @access public
* @return string
* @return integer
*/
public function getInternalId()
{
return '';
return 0;
}
/**

View File

@ -66,11 +66,11 @@ class ReverseProxyUserProvider implements UserProviderInterface
* Get internal id
*
* @access public
* @return string
* @return integer
*/
public function getInternalId()
{
return '';
return 0;
}
/**

View File

@ -27,14 +27,11 @@
"ext-filter" : "*",
"ext-session" : "*",
"christian-riesen/otp" : "1.4.3",
"eluceo/ical": "0.16.1",
"erusev/parsedown" : "1.7.4",
"pimple/pimple" : "3.5.0",
"psr/log": "1.1.4",
"swiftmailer/swiftmailer" : "5.4.8",
"symfony/console" : "4.4.37",
"symfony/event-dispatcher" : "4.4.37",
"gregwar/captcha": "1.1.9",
"symfony/finder": "5.4.3"
},
"autoload" : {
@ -42,7 +39,9 @@
"psr-4" : {
"Kanboard\\" : "app/",
"MatthiasMullie\\Minify\\": "libs/minify/src/",
"MatthiasMullie\\PathConverter\\": "libs/path-converter/src/"
"MatthiasMullie\\PathConverter\\": "libs/path-converter/src/",
"Gregwar\\": "libs",
"Eluceo\\iCal\\": "libs/ical"
},
"psr-0" : {
"JsonRPC": "libs/jsonrpc/src",
@ -52,7 +51,8 @@
"SimpleValidator": "libs"
},
"files" : [
"app/functions.php"
"app/functions.php",
"libs/swiftmailer/swift_required.php"
]
},
"require-dev" : {

203
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9ab66a7ff0a9f1719021900f5378ef39",
"content-hash": "5367b4ff806bb00304200974107f8f46",
"packages": [
{
"name": "christian-riesen/base32",
@ -120,61 +120,6 @@
},
"time": "2015-10-08T08:17:59+00:00"
},
{
"name": "eluceo/ical",
"version": "0.16.1",
"source": {
"type": "git",
"url": "https://github.com/markuspoerschke/iCal.git",
"reference": "7043337feaeacbc016844e7e52ef41bba504ad8f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/markuspoerschke/iCal/zipball/7043337feaeacbc016844e7e52ef41bba504ad8f",
"reference": "7043337feaeacbc016844e7e52ef41bba504ad8f",
"shasum": ""
},
"require": {
"php": ">=7.1 || ~8.0.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0"
},
"suggest": {
"ext-mbstring": "Massive performance enhancement of line folding"
},
"type": "library",
"autoload": {
"psr-4": {
"Eluceo\\iCal\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Markus Poerschke",
"email": "markus@eluceo.de",
"role": "Developer"
}
],
"description": "The eluceo/iCal package offers a abstraction layer for creating iCalendars. You can easily create iCal files by using PHP object instead of typing your *.ics file by hand. The output will follow RFC 5545 as best as possible.",
"homepage": "https://github.com/markuspoerschke/iCal",
"keywords": [
"calendar",
"iCalendar",
"ical",
"ics",
"php calendar"
],
"support": {
"issues": "https://github.com/markuspoerschke/iCal/issues",
"source": "https://github.com/markuspoerschke/iCal"
},
"time": "2020-10-04T17:41:11+00:00"
},
{
"name": "erusev/parsedown",
"version": "1.7.4",
@ -225,63 +170,6 @@
},
"time": "2019-12-30T22:54:17+00:00"
},
{
"name": "gregwar/captcha",
"version": "v1.1.9",
"source": {
"type": "git",
"url": "https://github.com/Gregwar/Captcha.git",
"reference": "4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Gregwar/Captcha/zipball/4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5",
"reference": "4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5",
"shasum": ""
},
"require": {
"ext-gd": "*",
"ext-mbstring": "*",
"php": ">=5.3.0",
"symfony/finder": "*"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"type": "captcha",
"autoload": {
"psr-4": {
"Gregwar\\": "src/Gregwar"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Passault",
"email": "g.passault@gmail.com",
"homepage": "http://www.gregwar.com/"
},
{
"name": "Jeremy Livingston",
"email": "jeremy.j.livingston@gmail.com"
}
],
"description": "Captcha generator",
"homepage": "https://github.com/Gregwar/Captcha",
"keywords": [
"bot",
"captcha",
"spam"
],
"support": {
"issues": "https://github.com/Gregwar/Captcha/issues",
"source": "https://github.com/Gregwar/Captcha/tree/master"
},
"time": "2020-03-24T14:39:05+00:00"
},
{
"name": "pimple/pimple",
"version": "v3.5.0",
@ -433,65 +321,6 @@
},
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v5.4.8",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "9a06dc570a0367850280eefd3f1dc2da45aef517"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/9a06dc570a0367850280eefd3f1dc2da45aef517",
"reference": "9a06dc570a0367850280eefd3f1dc2da45aef517",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"mockery/mockery": "~0.9.1",
"symfony/phpunit-bridge": "~3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.4-dev"
}
},
"autoload": {
"files": [
"lib/swift_required.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Chris Corbyn"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Swiftmailer, free feature-rich PHP mailer",
"homepage": "http://swiftmailer.org",
"keywords": [
"email",
"mail",
"mailer"
],
"support": {
"issues": "https://github.com/swiftmailer/swiftmailer/issues",
"source": "https://github.com/swiftmailer/swiftmailer/tree/v5.4.8"
},
"abandoned": "symfony/mailer",
"time": "2017-05-01T15:54:03+00:00"
},
{
"name": "symfony/console",
"version": "v4.4.37",
@ -986,12 +815,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php73\\": ""
},
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php73\\": ""
},
"classmap": [
"Resources/stubs"
]
@ -1065,12 +894,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
@ -1450,16 +1279,16 @@
},
{
"name": "phar-io/version",
"version": "3.1.0",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "bae7c545bef187884426f042434e561ab1ddb182"
"reference": "15a90844ad40f127afd244c0cad228de2a80052a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182",
"reference": "bae7c545bef187884426f042434e561ab1ddb182",
"url": "https://api.github.com/repos/phar-io/version/zipball/15a90844ad40f127afd244c0cad228de2a80052a",
"reference": "15a90844ad40f127afd244c0cad228de2a80052a",
"shasum": ""
},
"require": {
@ -1495,9 +1324,9 @@
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.1.0"
"source": "https://github.com/phar-io/version/tree/3.1.1"
},
"time": "2021-02-23T14:00:09+00:00"
"time": "2022-02-07T21:56:48+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@ -2106,11 +1935,11 @@
}
},
"autoload": {
"classmap": [
"src/"
],
"files": [
"src/Framework/Assert/Functions.php"
],
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",

View File

@ -362,7 +362,7 @@ class CaptchaBuilder implements CaptchaBuilderInterface
$w = $box[2] - $box[0];
$angle = $this->rand(-$this->maxAngle, $this->maxAngle);
$offset = $this->rand(-$this->maxOffset, $this->maxOffset);
\imagettftext($image, $size, $angle, $x, $y + $offset, $col, $font, $symbol);
\imagettftext($image, (float) $size, (float) $angle, (int) $x, (int) $y + $offset, (int) $col, (string) $font, (string) $symbol);
$x += $w;
}

View File

@ -66,6 +66,7 @@ class PropertyBag implements \IteratorAggregate
return $this;
}
#[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayObject($this->elements);

Some files were not shown because too many files have changed in this diff Show More