From 769b73e8a33d3e721f7628ac29a82e5497935b54 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 18 Dec 2023 16:01:50 -0500 Subject: [PATCH] Bump minimum version to run Friendica to PHP 7.4 - Update version filter of mobiledetect/mobiledetectlib and psr/container to PHP 7.4 versions - Remove PHP 7.3 PHPUnit instance - Remove PHP 7.2 specific PDO exception in tests --- .ddev/config.yaml | 4 ++-- .woodpecker/.phpunit.yml | 2 -- composer.json | 8 ++++---- doc/Install.md | 2 +- doc/de/Install.md | 2 +- tests/functional/DependencyCheckTest.php | 6 ------ 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.ddev/config.yaml b/.ddev/config.yaml index afc9776564..26cba10525 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -1,7 +1,7 @@ name: my-friendica type: php docroot: "" -php_version: "7.3" +php_version: "7.4" webserver_type: apache-fpm router_http_port: "80" router_https_port: "443" @@ -17,7 +17,7 @@ use_dns_when_possible: true composer_version: "1" web_environment: [] nodejs_version: "16" -webimage_extra_packages: [php7.3-gmp] +webimage_extra_packages: [php7.4-gmp] # Key features of ddev's config.yaml: diff --git a/.woodpecker/.phpunit.yml b/.woodpecker/.phpunit.yml index 325a2d9c1c..97ea09d374 100644 --- a/.woodpecker/.phpunit.yml +++ b/.woodpecker/.phpunit.yml @@ -1,7 +1,5 @@ matrix: include: - - PHP_MAJOR_VERSION: 7.3 - PHP_VERSION: 7.3.33 - PHP_MAJOR_VERSION: 7.4 PHP_VERSION: 7.4.33 - PHP_MAJOR_VERSION: 8.0 diff --git a/composer.json b/composer.json index 9a86ebc2cc..21603c7b27 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "issues": "https://github.com/friendica/friendica/issues" }, "require": { - "php": ">=7.3", + "php": ">=7.4", "ext-ctype": "*", "ext-curl": "*", "ext-dom": "*", @@ -44,7 +44,7 @@ "mattwright/urlresolver": "^2.0", "michelf/php-markdown": "^1.7", "minishlink/web-push": "^6.0", - "mobiledetect/mobiledetectlib": "^2.8", + "mobiledetect/mobiledetectlib": "^3.74", "nikic/fast-route": "^1.3", "paragonie/hidden-string": "^1.0", "patrickschur/language-detection": "^5.0.0", @@ -53,7 +53,7 @@ "pragmarx/google2fa": "^5.0", "pragmarx/recovery": "^0.2", "psr/clock": "^1.0", - "psr/container": "^1.0", + "psr/container": "^2.0", "psr/log": "^1.1", "seld/cli-prompt": "^1.0", "smarty/smarty": "^4", @@ -102,7 +102,7 @@ }, "config": { "platform": { - "php": "7.3" + "php": "7.4" }, "autoloader-suffix": "Friendica", "optimize-autoloader": true, diff --git a/doc/Install.md b/doc/Install.md index dc390fbc8a..4715c27233 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -28,7 +28,7 @@ Due to the large variety of operating systems and PHP platforms in existence we ### Requirements * Apache with mod-rewrite enabled and "Options All" so you can use a local `.htaccess` file -* PHP 7.3+ +* PHP 7.4+ * PHP *command line* access with register_argc_argv set to true in the php.ini file * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar and OpenSSL extensions * The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it) diff --git a/doc/de/Install.md b/doc/de/Install.md index db99367af3..0122988c59 100644 --- a/doc/de/Install.md +++ b/doc/de/Install.md @@ -25,7 +25,7 @@ Requirements --- * Apache mit einer aktiverten mod-rewrite-Funktion und dem Eintrag "Options All", so dass du die lokale .htaccess-Datei nutzen kannst -* PHP 7.3+ +* PHP 7.4+ * PHP *Kommandozeilen*-Zugang mit register_argc_argv auf "true" gesetzt in der php.ini-Datei * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar and OpenSSL-Erweiterung * Das POSIX Modul muss aktiviert sein ([CentOS, RHEL](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) haben dies z.B. deaktiviert) diff --git a/tests/functional/DependencyCheckTest.php b/tests/functional/DependencyCheckTest.php index 4488fe5868..5d0b63a6af 100644 --- a/tests/functional/DependencyCheckTest.php +++ b/tests/functional/DependencyCheckTest.php @@ -80,12 +80,6 @@ class DependencyCheckTest extends FixtureTest public function testDatabase() { - // PDO needs to be disabled for PHP 7.2, see https://jira.mariadb.org/browse/MDEV-24121 - if (version_compare(PHP_VERSION, '7.3') < 0) { - $configCache = $this->dice->create(Cache::class); - $configCache->set('database', 'disable_pdo', true); - } - /** @var Database $database */ $database = $this->dice->create(Database::class);