From 6036672afffbe56eb65faf7fc5e2aea644c71ebe Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 23 Nov 2022 13:56:14 +0900 Subject: [PATCH 1/4] fix: curl and xml are not required extentions --- admin/framework/composer.json | 2 +- composer.json | 2 +- system/CodeIgniter.php | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/admin/framework/composer.json b/admin/framework/composer.json index 81e75216cdd8..948740886a1b 100644 --- a/admin/framework/composer.json +++ b/admin/framework/composer.json @@ -6,7 +6,6 @@ "license": "MIT", "require": { "php": "^7.4 || ^8.0", - "ext-curl": "*", "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", @@ -24,6 +23,7 @@ "predis/predis": "^1.1 || ^2.0" }, "suggest": { + "ext-curl": "If you use CURLRequest class", "ext-imagick": "If you use Image class ImageMagickHandler", "ext-gd": "If you use Image class GDHandler", "ext-exif": "If you run Image class tests", diff --git a/composer.json b/composer.json index be7ecb4fdb4a..f2dafb518960 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,6 @@ "license": "MIT", "require": { "php": "^7.4 || ^8.0", - "ext-curl": "*", "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", @@ -29,6 +28,7 @@ "rector/rector": "0.14.8" }, "suggest": { + "ext-curl": "If you use CURLRequest class", "ext-imagick": "If you use Image class ImageMagickHandler", "ext-gd": "If you use Image class GDHandler", "ext-exif": "If you run Image class tests", diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index 4d738aed462f..3eaca1de5bb6 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -205,11 +205,9 @@ public function initialize() protected function resolvePlatformExtensions() { $requiredExtensions = [ - 'curl', 'intl', 'json', 'mbstring', - 'xml', ]; $missingExtensions = []; From 472cc79412265c39b1dfcc180062aaee24c36e07 Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 23 Nov 2022 13:58:06 +0900 Subject: [PATCH 2/4] docs: curl is not a must --- README.md | 2 +- admin/framework/README.md | 2 +- admin/starter/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7b3ed4c52b25..36b90f9631e5 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,6 @@ Made with [contrib.rocks](https://contrib.rocks). PHP version 7.4 or higher is required, with the following extensions installed: - [intl](http://php.net/manual/en/intl.requirements.php) -- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library - [mbstring](http://php.net/manual/en/mbstring.installation.php) Additionally, make sure that the following extensions are enabled in your PHP: @@ -95,6 +94,7 @@ Additionally, make sure that the following extensions are enabled in your PHP: - json (enabled by default - don't turn it off) - xml (enabled by default - don't turn it off) - [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL +- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library ## Running CodeIgniter Tests diff --git a/admin/framework/README.md b/admin/framework/README.md index a064e5933657..48317f019dc6 100644 --- a/admin/framework/README.md +++ b/admin/framework/README.md @@ -45,7 +45,6 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/ PHP version 7.4 or higher is required, with the following extensions installed: - [intl](http://php.net/manual/en/intl.requirements.php) -- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library - [mbstring](http://php.net/manual/en/mbstring.installation.php) Additionally, make sure that the following extensions are enabled in your PHP: @@ -53,3 +52,4 @@ Additionally, make sure that the following extensions are enabled in your PHP: - json (enabled by default - don't turn it off) - xml (enabled by default - don't turn it off) - [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL +- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library diff --git a/admin/starter/README.md b/admin/starter/README.md index 8cc7a5913cb5..6bc14852fbe9 100644 --- a/admin/starter/README.md +++ b/admin/starter/README.md @@ -53,7 +53,6 @@ Problems with it can be raised on our forum, or as issues in the main repository PHP version 7.4 or higher is required, with the following extensions installed: - [intl](http://php.net/manual/en/intl.requirements.php) -- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library - [mbstring](http://php.net/manual/en/mbstring.installation.php) Additionally, make sure that the following extensions are enabled in your PHP: @@ -61,3 +60,4 @@ Additionally, make sure that the following extensions are enabled in your PHP: - json (enabled by default - don't turn it off) - xml (enabled by default - don't turn it off) - [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL +- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library From e82598b5c30b6ac5790ce3212e023e9f7d6814de Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 23 Nov 2022 14:24:37 +0900 Subject: [PATCH 3/4] docs: update required PHP extentions --- user_guide_src/source/intro/requirements.rst | 29 ++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/user_guide_src/source/intro/requirements.rst b/user_guide_src/source/intro/requirements.rst index 974cf108c406..191e264733ec 100644 --- a/user_guide_src/source/intro/requirements.rst +++ b/user_guide_src/source/intro/requirements.rst @@ -2,18 +2,31 @@ Server Requirements ################### -`PHP `_ version 7.4 or newer is required, with the -`*intl* extension `_ and `*mbstring* extension `_ -installed. +`PHP `_ version 7.4 or newer is required, with the following PHP extensions are enabled: + + - `intl `_ + - `mbstring `_ + - `json `_ The following PHP extensions should be enabled on your server: - - ``php-json`` - - ``php-mysqlnd`` (if you use MySQL) - - ``php-xml`` + - `mysqlnd `_ (if you use MySQL) + - `curl `_ (if you use :doc:`CURLRequest `) + - `imagick `_ (if you use :doc:`Image ` class ImageMagickHandler) + - `gd `_ (if you use :doc:`Image ` class GDHandler) + - `simplexml `_ (if you format XML) + +The following PHP extensions are required when you use a Cache server: + + - `memcache `_ (if you use :doc:`Cache ` class MemcachedHandler with Memcache) + - `memcached `_ (if you use :doc:`Cache ` class MemcachedHandler with Memcached) + - `redis `_ (if you use :doc:`Cache ` class RedisHandler) + +The following PHP extensions are required when you use PHPUnit: -In order to use the :doc:`CURLRequest `, you will need -`libcurl `_ installed. + - `dom `_ (if you use :doc:`TestResponse ` class) + - `libxml `_ (if you use :doc:`TestResponse ` class) + - `xdebug `_ (if you use ``CIUnitTestCase::assertHeaderEmitted()``) A database is required for most web application programming. Currently supported databases are: From fc0a497f3939b0a3138d36e82d0fe15ce8ee0cba Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 23 Nov 2022 14:58:26 +0900 Subject: [PATCH 4/4] docs: remove xml extention We do not use it. https://www.php.net/manual/en/book.xml.php --- README.md | 1 - admin/framework/README.md | 1 - admin/starter/README.md | 1 - 3 files changed, 3 deletions(-) diff --git a/README.md b/README.md index 36b90f9631e5..174f19692fbd 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,6 @@ PHP version 7.4 or higher is required, with the following extensions installed: Additionally, make sure that the following extensions are enabled in your PHP: - json (enabled by default - don't turn it off) -- xml (enabled by default - don't turn it off) - [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library diff --git a/admin/framework/README.md b/admin/framework/README.md index 48317f019dc6..870e5f96adff 100644 --- a/admin/framework/README.md +++ b/admin/framework/README.md @@ -50,6 +50,5 @@ PHP version 7.4 or higher is required, with the following extensions installed: Additionally, make sure that the following extensions are enabled in your PHP: - json (enabled by default - don't turn it off) -- xml (enabled by default - don't turn it off) - [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library diff --git a/admin/starter/README.md b/admin/starter/README.md index 6bc14852fbe9..461e949f2f26 100644 --- a/admin/starter/README.md +++ b/admin/starter/README.md @@ -58,6 +58,5 @@ PHP version 7.4 or higher is required, with the following extensions installed: Additionally, make sure that the following extensions are enabled in your PHP: - json (enabled by default - don't turn it off) -- xml (enabled by default - don't turn it off) - [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library