SilverStripe 4.10 & PHP8.1 fix deprecation warnings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"require": { | |
... | |
"cweagans/composer-patches": "^1.7" | |
... | |
"extra": { | |
"patches": { | |
"silverstripe/framework": { | |
"Fix SilverStripe deprecations error_reporting for PHP 8.1": "./fix-deprecation-error_reporting.4.10.4.patch" | |
} | |
} | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/Core/CoreKernel.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/src/Core/CoreKernel.php b/src/Core/CoreKernel.php | |
--- a/src/Core/CoreKernel.php (revision 82aba312fe2d8a2563331052d6783556b143e803) | |
+++ b/src/Core/CoreKernel.php (date 1649429323640) | |
@@ -461,7 +461,8 @@ | |
error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT | E_NOTICE)); | |
} else { | |
// Report all errors in dev / test mode | |
- error_reporting(E_ALL | E_STRICT); | |
+// error_reporting(E_ALL | E_STRICT); | |
+ error_reporting(E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED); | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment