Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[ErrorHandler][VarDumper] Remove PHP 8.4 deprecations#57799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -23,7 +23,7 @@ | ||
| class DOMCaster | ||
| { | ||
| private const ERROR_CODES = [ | ||
| 0 => 'DOM_PHP_ERR', | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Do we need to keep this entry? The way I readthe RFC it will no longer be needed:
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. To me, yes. It's targeting 5.4, and we better be careful and just remove deprecation with the minimum possible updates, and without changing any behavior if possible. Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Well, what I have in mind is adding this entry only in case the used PHP version is before 8.4 (or maybe when the constant is actually defined). Inlining the constant value makes it harder to identify them later when we want to clean up things. MemberAuthor
| ||
| \DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', | ||
| \DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', | ||
| \DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', | ||
| @@ -138,16 +138,12 @@ public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, boo | ||
| 'doctype' => $dom->doctype, | ||
| 'implementation' => $dom->implementation, | ||
| 'documentElement' => new CutStub($dom->documentElement), | ||
| 'encoding' => $dom->encoding, | ||
| 'xmlEncoding' => $dom->xmlEncoding, | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Where is this change coming from? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. | ||
| 'xmlStandalone' => $dom->xmlStandalone, | ||
xabbuh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| 'xmlVersion' => $dom->xmlVersion, | ||
| 'strictErrorChecking' => $dom->strictErrorChecking, | ||
| 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, | ||
| 'formatOutput' => $dom->formatOutput, | ||
| 'validateOnParse' => $dom->validateOnParse, | ||
| 'resolveExternals' => $dom->resolveExternals, | ||
| @@ -275,9 +271,6 @@ public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, bool $i | ||
| 'publicId' => $dom->publicId, | ||
| 'systemId' => $dom->systemId, | ||
| 'notationName' => $dom->notationName, | ||
| ]; | ||
| return $a; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -41,7 +41,7 @@ class ExceptionCaster | ||
| \E_USER_ERROR => 'E_USER_ERROR', | ||
| \E_USER_WARNING => 'E_USER_WARNING', | ||
| \E_USER_NOTICE => 'E_USER_NOTICE', | ||
| 2048 => 'E_STRICT', | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. should be dependent on the presence of the constant IMO (that way we can more easily identify parts of the code to be cleaned up once support for older PHP versions is going to be dropped) MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I think there are few chances to forget it with the plain string next to it. Also, it is stored in a static property in a static class. It also requires extra logic wherever the static property is called, raising chances of introducing a bug if a new usage occurrence of the static property is introduced 😕 | ||
| ]; | ||
| private static $framesCache = []; | ||