From 04a1ddfa68282356f66c33b236c00e8b86a62cae Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Sat, 9 Sep 2023 11:23:54 -0700 Subject: [PATCH 01/11] Sort PHP extensions and functions --- server/requirements/requirements.php | 139 ++++++++++++++------------- 1 file changed, 72 insertions(+), 67 deletions(-) diff --git a/server/requirements/requirements.php b/server/requirements/requirements.php index 94af176..66a1279 100644 --- a/server/requirements/requirements.php +++ b/server/requirements/requirements.php @@ -14,10 +14,11 @@ ); $conn = $this->getDbConnection(); +$pdoExtensionRequirement = null; switch ($this->dbDriver) { case 'mysql': - $requirements[] = array( + $pdoExtensionRequirement = array( 'name' => 'PDO MySQL extension', 'mandatory' => true, 'condition' => extension_loaded('pdo_mysql'), @@ -56,7 +57,7 @@ } break; case 'pgsql': - $requirements[] = array( + $pdoExtensionRequirement = array( 'name' => 'PDO PostgreSQL extension', 'mandatory' => true, 'condition' => extension_loaded('pdo_pgsql'), @@ -79,42 +80,36 @@ $requirements[] = $this->webAliasRequirement(); } -$requirements = array_merge($requirements, array( +$requirements = array_merge($requirements, array_filter(array( array( - 'name' => 'Reflection extension', - 'mandatory' => true, - 'condition' => extension_loaded('reflection'), - 'memo' => 'The Reflection extension is required.', - ), - array( - 'name' => 'PCRE extension (with UTF-8 support)', + 'name' => 'BCMath extension', 'mandatory' => true, - 'condition' => extension_loaded('pcre') && preg_match('/./u', 'Ü') === 1, - 'memo' => 'The PCRE extension is required and it must be compiled to support UTF-8.', + 'condition' => extension_loaded('bcmath'), + 'memo' => 'The BCMath extension is required.' ), array( - 'name' => 'SPL extension', + 'name' => 'ctype extension', 'mandatory' => true, - 'condition' => extension_loaded('SPL'), - 'memo' => 'The SPL extension is required.' + 'condition' => extension_loaded('ctype'), + 'memo' => 'The ctype extension is required.', ), array( - 'name' => 'BCMath extension', + 'name' => 'cURL extension', 'mandatory' => true, - 'condition' => extension_loaded('bcmath'), - 'memo' => 'The BCMath extension is required.' + 'condition' => extension_loaded('curl'), + 'memo' => 'The cURL extension is required.', ), array( - 'name' => 'PDO extension', + 'name' => 'DOM extension', 'mandatory' => true, - 'condition' => extension_loaded('pdo'), - 'memo' => 'The PDO extension is required.' + 'condition' => extension_loaded('dom'), + 'memo' => 'The DOM extension is required.', ), array( - 'name' => 'Multibyte String extension (with Function Overloading disabled)', + 'name' => 'Fileinfo extension', 'mandatory' => true, - 'condition' => extension_loaded('mbstring') && ini_get('mbstring.func_overload') == 0, - 'memo' => 'Craft CMS requires the Multibyte String extension with Function Overloading disabled in order to run.' + 'condition' => extension_loaded('fileinfo'), + 'memo' => 'The Fileinfo extension required.' ), array( 'name' => 'GD extension or ImageMagick extension', @@ -123,55 +118,59 @@ 'memo' => 'When using Craft\'s default image transformer, the GD or ImageMagick extension is required. ImageMagick is recommended as it adds animated GIF support, and preserves 8-bit and 24-bit PNGs during image transforms.' ), array( - 'name' => 'OpenSSL extension', + 'name' => 'iconv extension', 'mandatory' => true, - 'condition' => extension_loaded('openssl'), - 'memo' => 'The OpenSSL extension is required.' + 'condition' => function_exists('iconv'), + 'memo' => 'iconv is required for more robust character set conversion support.', ), array( - 'name' => 'cURL extension', + 'name' => 'Intl extension', 'mandatory' => true, - 'condition' => extension_loaded('curl'), - 'memo' => 'The cURL extension is required.', + 'condition' => $this->checkPhpExtensionVersion('intl', '1.0.2', '>='), + 'memo' => 'The Intl extension (version 1.0.2+) is recommended.' ), array( - 'name' => 'ctype extension', + 'name' => 'JSON extension', 'mandatory' => true, - 'condition' => extension_loaded('ctype'), - 'memo' => 'The ctype extension is required.', + 'condition' => extension_loaded('json'), + 'memo' => 'The JSON extension is required for JSON encoding and decoding.', ), - $this->iniSetRequirement(), array( - 'name' => 'Intl extension', + 'name' => 'Multibyte String extension (with Function Overloading disabled)', 'mandatory' => true, - 'condition' => $this->checkPhpExtensionVersion('intl', '1.0.2', '>='), - 'memo' => 'The Intl extension (version 1.0.2+) is recommended.' + 'condition' => extension_loaded('mbstring') && ini_get('mbstring.func_overload') == 0, + 'memo' => 'Craft CMS requires the Multibyte String extension with Function Overloading disabled in order to run.' ), array( - 'name' => 'Fileinfo extension', + 'name' => 'OpenSSL extension', 'mandatory' => true, - 'condition' => extension_loaded('fileinfo'), - 'memo' => 'The Fileinfo extension required.' + 'condition' => extension_loaded('openssl'), + 'memo' => 'The OpenSSL extension is required.' ), array( - 'name' => 'DOM extension', + 'name' => 'PCRE extension (with UTF-8 support)', 'mandatory' => true, - 'condition' => extension_loaded('dom'), - 'memo' => 'The DOM extension is required.', + 'condition' => extension_loaded('pcre') && preg_match('/./u', 'Ü') === 1, + 'memo' => 'The PCRE extension is required and it must be compiled to support UTF-8.', ), array( - 'name' => 'iconv extension', + 'name' => 'PDO extension', 'mandatory' => true, - 'condition' => function_exists('iconv'), - 'memo' => 'iconv is required for more robust character set conversion support.', + 'condition' => extension_loaded('pdo'), + 'memo' => 'The PDO extension is required.' ), - $this->memoryLimitRequirement(), - $this->maxExecutionTimeRequirement(), + $pdoExtensionRequirement, array( - 'name' => 'password_hash()', + 'name' => 'Reflection extension', 'mandatory' => true, - 'condition' => function_exists('password_hash'), - 'memo' => 'The password_hash() function is required so Craft can create secure passwords.', + 'condition' => extension_loaded('reflection'), + 'memo' => 'The Reflection extension is required.', + ), + array( + 'name' => 'SPL extension', + 'mandatory' => true, + 'condition' => extension_loaded('SPL'), + 'memo' => 'The SPL extension is required.' ), array( 'name' => 'Zip extension', @@ -179,17 +178,24 @@ 'condition' => extension_loaded('zip'), 'memo' => 'The zip extension is required for zip and unzip operations.', ), + array( - 'name' => 'JSON extension', + 'name' => 'ignore_user_abort()', + 'mandatory' => false, + 'condition' => function_exists('ignore_user_abort'), + 'memo' => 'ignore_user_abort() must be enabled in your PHP configuration for the native web-based queue runner to work.', + ), + array( + 'name' => 'password_hash()', 'mandatory' => true, - 'condition' => extension_loaded('json'), - 'memo' => 'The JSON extension is required for JSON encoding and decoding.', + 'condition' => function_exists('password_hash'), + 'memo' => 'The password_hash() function is required so Craft can create secure passwords.', ), array( - 'name' => 'proc_open()', + 'name' => 'proc_close()', 'mandatory' => false, - 'condition' => function_exists('proc_open'), - 'memo' => 'The proc_open() function is required for Plugin Store operations as well as sending emails.', + 'condition' => function_exists('proc_close'), + 'memo' => 'The proc_close() function is required for Plugin Store operations as well as sending emails.', ), array( 'name' => 'proc_get_status()', @@ -198,10 +204,10 @@ 'memo' => 'The proc_get_status() function is required for Plugin Store operations as well as sending emails.', ), array( - 'name' => 'proc_close()', + 'name' => 'proc_open()', 'mandatory' => false, - 'condition' => function_exists('proc_close'), - 'memo' => 'The proc_close() function is required for Plugin Store operations as well as sending emails.', + 'condition' => function_exists('proc_open'), + 'memo' => 'The proc_open() function is required for Plugin Store operations as well as sending emails.', ), array( 'name' => 'proc_terminate()', @@ -209,18 +215,17 @@ 'condition' => function_exists('proc_terminate'), 'memo' => 'The proc_terminate() function is required for Plugin Store operations as well as sending emails.', ), + array( 'name' => 'allow_url_fopen', 'mandatory' => false, 'condition' => ini_get('allow_url_fopen'), 'memo' => 'allow_url_fopen must be enabled in your PHP configuration for Plugin Store and updating operations.', ), - array( - 'name' => 'ignore_user_abort()', - 'mandatory' => false, - 'condition' => function_exists('ignore_user_abort'), - 'memo' => 'ignore_user_abort() must be enabled in your PHP configuration for the native web-based queue runner to work.', - ), -)); + + $this->iniSetRequirement(), + $this->memoryLimitRequirement(), + $this->maxExecutionTimeRequirement(), +))); return $requirements; From 7a2d48504e34530bab96f1b5bace661836eab9d6 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Sat, 9 Sep 2023 11:16:50 -0700 Subject: [PATCH 02/11] Changelog cleanup --- CHANGELOG.md | 79 ---------------------------------------------------- 1 file changed, 79 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db1fad0..22fd426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,204 +1,125 @@ # Changelog for Craft CMS Server Check ## 2.1.5 - 2023-05-26 - -### Fixed - Fixed an error that could occur when running the requirements checker using PHP 8+. ## 2.1.4 - 2022-04-16 - -### Added - Added checks for relying on the default `@web` alias. ## 2.1.3 - 2022-02-15 - -### Added - Added the BCMath extension as a requirement. ## 2.1.2 - 2022-02-14 - -### Changed - Bumped the PHP requirement to 8.0.2+. ## 2.1.1 - 2022-02-10 - -### Fixed - Fixed a bug where the MariaDB version wasn’t always being parsed correctly. ([craftcms/cms#10456](https://github.com/craftcms/cms/issues/10456)) ## 2.1.0 - 2022-02-09 - -### Changed - Bumped the PHP requirement to 8.0 for Craft 4.0. - Bumped the PostgreSQL requirement to 10.0 for Craft 4.0. - The `intl` extension is now required for Craft 4.0. ## 2.0.1 - 2021-12-07 - -### Added - There is now an explicit check for MariaDB, and it requires version 10.2.7 or higher. ## 1.2.1 - 2021-05-25 - -### Added - Added a check for MySQL to see if the server has been configured with full timezone support. ## 1.2.0 2020-11-04 - -### Changed - Bumped the PHP requirement to 7.2.5 for Craft 3.6.0. ## 1.1.9 - 2020-05-28 - -### Added - Added `ignore_user_abort` as an optional method. ## 1.1.8 - 2020-01-17 - -### Changed - Changed the image extension check to make sure that if Imagick is installed, it can actually process images. ## 1.1.7 - 2019-01-31 - -### Added - Added a new `max_execution_time` check. - -### Changed - External links now have `rel="noopener"`. ([#9](https://github.com/craftcms/server-check/pull/9)) - The `memory_limit` check now adds 1MB to the current value if not set to `-1`. ([#10](https://github.com/craftcms/server-check/pull/10)) ## 1.1.6 - 2018-08-17 - -### Changed - The `ctype` extension is now required because of Yii 2.x. ## 1.1.5 - 2018-08-14 - -### Changed - The `iconv` extension is now required because of Twig 2.0. ## 1.1.4 - 2018-07-25 - -### Changed - Added `proc_open`, `proc_close`, `proc_terminate`, and `proc_get_status` methods as optional. - `allow_url_fopen` is now checked to see if it is enabled for Plugin Store and updating operations. ## 1.1.3 - 2018-07-18 - -### Changed - The JSON extension is now required. ([#7](https://github.com/craftcms/server-check/issues/7)) ## 1.1.2 - 2018-07-18 - -### Changed - The Fileinfo extension is now required, not recommended. ([#6](https://github.com/craftcms/server-check/issues/6)) - Improved the wording of some requirement memos. ([#5](https://github.com/craftcms/server-check/issues/5)) - Removed the “Max Upload File Size” and “Max POST Size” requirement checks, as they weren’t actually checking anything. ## 1.1.1 - 2017-12-15 - -### Changed - Links within requirement descriptions now open in a new window. ([craftcms/cms#2205](https://github.com/craftcms/cms/issues/2205)) ## 1.1.0 - 2017-11-10 - -### Changed - The requirements checker no longer attempts to parse a DB config file, and will only run DB requirement checks if a valid `dsn` is provided. - Lots of refactoring ## 1.0.17 - 2017-06-29 - -### Changed - `RequirementsChecker::checkWebRoot()` no longer checks if the `plugins/` folder is in the web root, as there is no `plugins/` folder. ## 1.0.16 - 2017-06-19 - -### Changed - `RequirementsChecker::checkWebRoot()` no longer checks if the `app/` folder is in the web root, as there is no `app/` folder. ## 1.0.15 - 2017-06-13 - -### Changed - The DOM extension is now mandatory. ## 1.0.14 - 2017-05-07 - -### Fixed - Fixed a bug where the script was considering a blank database password to be invalid. ([#4](https://github.com/craftcms/server-check/issues/4)) ## 1.0.13 - 2017-05-01 - -### Changed - Removed the PHP version requirement from `composer.json`. ## 1.0.12 - 2017-03-19 - -### Changed - Craft 3 Beta 8 compatibility. ## 1.0.11 - 2017-03-07 - -### Fixed - Fixed a bug where the PHP memory limit check would fail if `memory_limit` was set to `-1`, which means no limit. ## 1.0.10 - 2017-02-21 - -### Fixed - Fixed a bug where the requirements checker would error if the Craft project lived at the root of the file system. ## 1.0.9 - 2017-02-13 - -### Added - Added the PHP `password_hash()` function as a mandatory requirement. - Added the PHP Zip extension as a mandatory requirement. ## 1.0.8 - 2017-02-06 - -### Changed - Tweaked keywords in composer.json - -### Fixed - Fixed a bug where the default database port wasn’t being accounted for when connecting to the database. ## 1.0.7 - 2017-01-30 - -### Changed - Updated the `support` properties in composer.json - Craft 3 no longer requires `mcrypt`. ## 1.0.6 - 2017-01-17 - -### Added - Added support for configuring the database port ## 1.0.5 - 2017-01-17 - -### Fixed - Fixed a bug where `checkIniSet()` wasn’t undoing a change it made to PHP’s `memory_limit` setting. ## 1.0.4 - 2017-01-17 - -### Changed - Craft 3 now requires PHP 7 ## 1.0.3 - 2017-01-17 - -### Changed - Updated code for latest Craft coding guidelines - -### Removed - Removed check for buggy `iconv` extension ## 1.0.2 - 2016-12-30 - -### Changed - Autoloading support in composer.json ## 1.0.1 - 2016-12-30 - -### Changed - No longer specifying a minimum stability in composer.json - MIT license in composer.json ## 1.0.0 - 2016-12-30 - Initial release. From 445c8eccde570ede09dc96c39fc1357a5296520f Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Sat, 9 Sep 2023 11:16:54 -0700 Subject: [PATCH 03/11] Require OPcache with opcache.save_comments when installed Resolves craftcms/cms#13631 --- CHANGELOG.md | 3 +++ server/requirements/requirements.php | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22fd426..7138993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog for Craft CMS Server Check +## 2.1.6 - 2023-09-09 +- Added a requirement for [`opcache.save_comments`](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.save-comments) to be enabled if OPcache is installed. ([craftcms/cms#13631](https://github.com/craftcms/cms/discussions/13631)) + ## 2.1.5 - 2023-05-26 - Fixed an error that could occur when running the requirements checker using PHP 8+. diff --git a/server/requirements/requirements.php b/server/requirements/requirements.php index 66a1279..3a86a8b 100644 --- a/server/requirements/requirements.php +++ b/server/requirements/requirements.php @@ -141,6 +141,14 @@ 'condition' => extension_loaded('mbstring') && ini_get('mbstring.func_overload') == 0, 'memo' => 'Craft CMS requires the Multibyte String extension with Function Overloading disabled in order to run.' ), + array( + 'name' => extension_loaded('opcache') ? 'OPcache extension (with save_comments)' : 'OPcache extension', + 'mandatory' => extension_loaded('opcache'), + 'condition' => extension_loaded('opcache') && ini_get('opcache.save_comments') == 1, + 'memo' => extension_loaded('opcache') + ? 'The opcache.save_comments configuration setting must be enabled.' + : 'The OPcache extension is recommended in production environments.' + ), array( 'name' => 'OpenSSL extension', 'mandatory' => true, From 19436ca14543c3c2c903f5facd30d23a673d8501 Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Tue, 12 Sep 2023 15:57:08 -0400 Subject: [PATCH 04/11] Check global aliases for @web --- server/requirements/RequirementsChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/requirements/RequirementsChecker.php b/server/requirements/RequirementsChecker.php index d9c4bc8..76bda77 100644 --- a/server/requirements/RequirementsChecker.php +++ b/server/requirements/RequirementsChecker.php @@ -544,7 +544,7 @@ function maxExecutionTimeRequirement() */ function webAliasRequirement() { - $aliases = Craft::$app->getConfig()->getGeneral()->aliases; + $aliases = Craft::$aliases; $memo = 'We recommend explicitly overriding the @web alias.'; $pass = false; From 0a49f8ce0a533725bfe98beec9a5bb2d5b50a77d Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Tue, 12 Sep 2023 16:24:15 -0400 Subject: [PATCH 05/11] Check Zend OPcache for requirement --- server/requirements/requirements.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/requirements/requirements.php b/server/requirements/requirements.php index 3a86a8b..4b8641c 100644 --- a/server/requirements/requirements.php +++ b/server/requirements/requirements.php @@ -15,6 +15,7 @@ $conn = $this->getDbConnection(); $pdoExtensionRequirement = null; +$opCacheLoaded = extension_loaded('opcache') || extension_loaded('Zend OPcache'); switch ($this->dbDriver) { case 'mysql': @@ -142,10 +143,10 @@ 'memo' => 'Craft CMS requires the Multibyte String extension with Function Overloading disabled in order to run.' ), array( - 'name' => extension_loaded('opcache') ? 'OPcache extension (with save_comments)' : 'OPcache extension', - 'mandatory' => extension_loaded('opcache'), - 'condition' => extension_loaded('opcache') && ini_get('opcache.save_comments') == 1, - 'memo' => extension_loaded('opcache') + 'name' => $opCacheLoaded ? 'OPcache extension (with save_comments)' : 'OPcache extension', + 'mandatory' => $opCacheLoaded, + 'condition' => $opCacheLoaded && ini_get('opcache.save_comments') == 1, + 'memo' => $opCacheLoaded ? 'The opcache.save_comments configuration setting must be enabled.' : 'The OPcache extension is recommended in production environments.' ), From 5da97d6fc9b0bc6cda7b00e43514730d5ef8753b Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Thu, 14 Sep 2023 09:38:01 -0400 Subject: [PATCH 06/11] remove max_execution_time requirement --- server/requirements/RequirementsChecker.php | 20 -------------------- server/requirements/requirements.php | 1 - 2 files changed, 21 deletions(-) diff --git a/server/requirements/RequirementsChecker.php b/server/requirements/RequirementsChecker.php index d9c4bc8..8cabe08 100644 --- a/server/requirements/RequirementsChecker.php +++ b/server/requirements/RequirementsChecker.php @@ -519,26 +519,6 @@ function memoryLimitRequirement() ); } - /** - * @return array - * - * @see https://php.net/manual/en/info.configuration.php#ini.max-execution-time - */ - function maxExecutionTimeRequirement() - { - $maxExecutionTime = (int)trim(ini_get('max_execution_time')); - - $humanTime = $maxExecutionTime . ($maxExecutionTime === 0 ? ' (no limit)' : ''); - $memo = "Craft requires a minimum PHP max execution time of 120 seconds. The max_execution_time directive in php.ini is currently set to {$humanTime}."; - - return array( - 'name' => 'Max Execution Time', - 'mandatory' => false, - 'condition' => $maxExecutionTime === 0 || $maxExecutionTime >= 120, - 'memo' => $memo, - ); - } - /** * @return array */ diff --git a/server/requirements/requirements.php b/server/requirements/requirements.php index 3a86a8b..012bc23 100644 --- a/server/requirements/requirements.php +++ b/server/requirements/requirements.php @@ -233,7 +233,6 @@ $this->iniSetRequirement(), $this->memoryLimitRequirement(), - $this->maxExecutionTimeRequirement(), ))); return $requirements; From a9b1ad332cd6061e5ff08bf58328d082bc49b726 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 18 Sep 2023 21:08:02 -0700 Subject: [PATCH 07/11] Changelog for c0aad0ed461f0ce677254bce0b4ecb78411b52cf --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7138993..ea7718f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog for Craft CMS Server Check +## Unreleased +- Fixed a bug where Opcache extension might not be correct detected on some systems. + ## 2.1.6 - 2023-09-09 - Added a requirement for [`opcache.save_comments`](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.save-comments) to be enabled if OPcache is installed. ([craftcms/cms#13631](https://github.com/craftcms/cms/discussions/13631)) From bfafa0f52271275fb896490f638c543ca5b168a1 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 19 Sep 2023 18:55:39 -0700 Subject: [PATCH 08/11] Changelog for PRs --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea7718f..e4ea6cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # Changelog for Craft CMS Server Check ## Unreleased -- Fixed a bug where Opcache extension might not be correct detected on some systems. +- Fixed a bug where Opcache extension might not be correct detected on some systems. ([#25](https://github.com/craftcms/server-check/pull/25)) +- Removed the check for php.ini’s `max_execution_time` setting. ([#26](https://github.com/craftcms/server-check/pull/26)) +- The `@web` alias check now checks `Craft::$aliases;` instead of `Craft::$app->getConfig()->getGeneral()->aliases;`. ## 2.1.6 - 2023-09-09 - Added a requirement for [`opcache.save_comments`](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.save-comments) to be enabled if OPcache is installed. ([craftcms/cms#13631](https://github.com/craftcms/cms/discussions/13631)) From 97c09a55cee207cb0a79243606354d9783d693d8 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 19 Sep 2023 18:56:57 -0700 Subject: [PATCH 09/11] 2.1.7 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4ea6cd..2295504 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog for Craft CMS Server Check -## Unreleased +## 2.1.7 - 2023-09-19 - Fixed a bug where Opcache extension might not be correct detected on some systems. ([#25](https://github.com/craftcms/server-check/pull/25)) - Removed the check for php.ini’s `max_execution_time` setting. ([#26](https://github.com/craftcms/server-check/pull/26)) - The `@web` alias check now checks `Craft::$aliases;` instead of `Craft::$app->getConfig()->getGeneral()->aliases;`. From 88304a34d3bb2102894a3fbc27d14cd31406e14d Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 25 Sep 2023 10:28:03 -0700 Subject: [PATCH 10/11] Revert "Merge pull request #24 from craftcms/check-global-aliases" This reverts commit 30a7d56af1ac67e4f0dc715f615fdeebc5a93328, reversing changes made to c88fa02fa11e28617f388c9b1637959dbc82c3ae. --- CHANGELOG.md | 3 +++ server/requirements/RequirementsChecker.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2295504..21750f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog for Craft CMS Server Check +## Unreleased +- Reverted “The `@web` alias check now checks `Craft::$aliases;` instead of `Craft::$app->getConfig()->getGeneral()->aliases;`”. + ## 2.1.7 - 2023-09-19 - Fixed a bug where Opcache extension might not be correct detected on some systems. ([#25](https://github.com/craftcms/server-check/pull/25)) - Removed the check for php.ini’s `max_execution_time` setting. ([#26](https://github.com/craftcms/server-check/pull/26)) diff --git a/server/requirements/RequirementsChecker.php b/server/requirements/RequirementsChecker.php index 3171586..8cabe08 100644 --- a/server/requirements/RequirementsChecker.php +++ b/server/requirements/RequirementsChecker.php @@ -524,7 +524,7 @@ function memoryLimitRequirement() */ function webAliasRequirement() { - $aliases = Craft::$aliases; + $aliases = Craft::$app->getConfig()->getGeneral()->aliases; $memo = 'We recommend explicitly overriding the @web alias.'; $pass = false; From c86e8aeabc73333111e2bfb4483d7b5402232e48 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 25 Sep 2023 10:28:37 -0700 Subject: [PATCH 11/11] 2.1.8 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21750f4..8502b32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog for Craft CMS Server Check -## Unreleased +## 2.1.8 - 2023-09-25 - Reverted “The `@web` alias check now checks `Craft::$aliases;` instead of `Craft::$app->getConfig()->getGeneral()->aliases;`”. ## 2.1.7 - 2023-09-19