diff --git a/README.md b/README.md index a0e8ebcb3c9..05eaaf5799b 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,35 @@ level of backwards compatibility to the official releases. **Pull requests with bug fixes and security patches from the community are encouraged and welcome!** +--- + +## Table of contents + +- [Requirements](#requirements) + - [Optional](#optional) +- [Installation](#installation) + - [Composer](#composer) + - [Git](#git) +- [Secure your installation](#secure-your-installation) +- [Changes](#changes) + - [Between Magento 1.9.4.5 and OpenMage 19.x](#between-magento-1945-and-openmage-19x) + - [Between OpenMage 19.4.18 / 20.0.16 and 19.4.19 / 20.0.17](#between-openmage-19418--20016-and-19419--20017) + - [Since OpenMage 19.5.0 / 20.1.0](#since-openmage-1950--2010) + - [New Config Options](#new-config-options) + - [New Events](#new-events) + - [Changes to SOAP/WSDL](#changes-to-soapwsdl) +- [Development Environment with ddev](#development-environment-with-ddev) +- [Development with PHP 8.1](#development-with-php-81) +- [PhpStorm Factory Helper](#phpstorm-factory-helper) +- [Versioning](#versioning) +- [Public Communication](#public-communication) +- [Maintainers](#maintainers) +- [License](#license) +- [Contributors](#contributors-) + ## Requirements -- PHP 7.3+ (PHP 8.0 is supported) +- PHP 7.3+ (PHP 8.0 is supported, PHP 8.1 is work in progress) - MySQL 5.6+ (8.0+ recommended) or MariaDB @@ -33,7 +59,7 @@ __Please be aware that although OpenMage is compatible that one or more extensio ## Installation -### Using Composer +### Composer Download the latest archive and extract it, clone the repo, or add a composer dependency to your existing project like so: @@ -49,7 +75,7 @@ composer require "openmage/magento-lts":"dev-main" Note: `dev-main` is just an alias for current `1.9.4.x` branch and may change -### Using Git +### Git If you want to contribute to the project: @@ -211,6 +237,12 @@ grep -rn 'urn:Magento' --include \*.xml $ ddev launch ``` +## Development with PHP 8.1 + +Deprecation errors are supressed by default. + +If you want to work on PHP 8.1 support, set environment variable `DEV_PHP_STRICT` to `1`, to show all errors. + ## PhpStorm Factory Helper This repo includes class maps for the core Magento files in `.phpstorm.meta.php`. diff --git a/app/code/core/Mage/Core/functions.php b/app/code/core/Mage/Core/functions.php index cc4b27d9a7c..7e94097f861 100644 --- a/app/code/core/Mage/Core/functions.php +++ b/app/code/core/Mage/Core/functions.php @@ -124,7 +124,11 @@ function mageCoreErrorHandler($errno, $errstr, $errfile, $errline) } // Suppress deprecation warnings on PHP 7.x - if ($errno == E_DEPRECATED && version_compare(PHP_VERSION, '7.0.0', '>=')) { + // set environment variable DEV_PHP_STRICT to 1 will show E_DEPRECATED errors + if ((!isset($_ENV['DEV_PHP_STRICT']) || $_ENV['DEV_PHP_STRICT'] != '1') + && $errno == E_DEPRECATED + && version_compare(PHP_VERSION, '7.0.0', '>=') + ) { return true; }