From bf1b3671d097c7477a1dab8fdb02c1e0e60ccb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Garc=C3=AAs?= Date: Tue, 14 Sep 2021 10:06:13 +0100 Subject: [PATCH] Cleanup some warnings from phpcompatibility --- composer.json | 2 +- plugins/Authentication/Ldap/LDAP2.php | 2 +- tests/fakes/EmailFakes.php | 2 +- tests/fakes/FakeReminder.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 27fb763c9..a88931ff4 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,6 @@ "./tools/phpunit", "@lint" ], - "sniffer:php8": "phpcs -p ./ --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --report-full=./php8-report.log --ignore=./vendor/*,./tools/*,./.git/*,./tpl_c/*,./build/*,./.phpdoc/*,./var/* --runtime-set testVersion 8.0" + "sniffer:php8": "phpcs -p ./ --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --report-full=./php8-report.log --ignore=./vendor/*,./tools/*,./.git/*,./tpl_c/*,./build/*,./.phpdoc/*,./var/*,./Web/scripts/*,./Web/css/* --runtime-set testVersion 8.0" } } diff --git a/plugins/Authentication/Ldap/LDAP2.php b/plugins/Authentication/Ldap/LDAP2.php index b03c7f8da..c69efaaed 100644 --- a/plugins/Authentication/Ldap/LDAP2.php +++ b/plugins/Authentication/Ldap/LDAP2.php @@ -1642,7 +1642,7 @@ public function registerSchemaCache($cache) */ public static function checkLDAPExtension() { - if (!extension_loaded('ldap') && !@dl('ldap.' . PHP_SHLIB_SUFFIX)) { + if (!extension_loaded('ldap')) { return new Net_LDAP2_Error("It seems that you do not have the ldap-extension installed. Please install it before using the Net_LDAP2 package."); } else { return true; diff --git a/tests/fakes/EmailFakes.php b/tests/fakes/EmailFakes.php index 4842b37a3..ee799d916 100644 --- a/tests/fakes/EmailFakes.php +++ b/tests/fakes/EmailFakes.php @@ -11,7 +11,7 @@ class FakeMailer extends PHPMailer public $sendWasCalled = false; public $isHtml = true; - public function FakeMailer() + public function __construct() { } diff --git a/tests/fakes/FakeReminder.php b/tests/fakes/FakeReminder.php index 302e054e0..db6655898 100644 --- a/tests/fakes/FakeReminder.php +++ b/tests/fakes/FakeReminder.php @@ -4,7 +4,7 @@ class FakeReminder extends Reminder { - public function FakeReminder() + public function __construct() { $day = date('d'); $mon = date('m');