10000 [ErrorHandler][VarDumper] Remove PHP 8.4 deprecations · symfony/error-handler@db15ba0 · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"db15ba0fd50890156ed40087ccedc7851a1f5b76","url":"/symfony/error-handler/commit/db15ba0fd50890156ed40087ccedc7851a1f5b76","authoredDate":"2024-07-22T14:51:40.000+02:00","committedDate":"2024-07-23T14:34:05.000+02:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003e[ErrorHandler][VarDumper] Remove PHP 8.4 deprecations\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"","authors":[{"login":"alexandre-daubois","displayName":"Alexandre Daubois","avatarUrl":"https://avatars.githubusercontent.com/u/2144837?v=4","path":"/alexandre-daubois","isGitHub":false}],"committerAttribution":false,"committer":{"login":"alexandre-daubois","displayName":"Alexandre Daubois","avatarUrl":"https://avatars.githubusercontent.com/u/2144837?v=4","path":"/alexandre-daubois","isGitHub":false},"pusher":null,"pushedDate":null,"parents":["59ee8765919191f21aa021fef3204ddd7c4cdb82"],"globalRelayId":"C_kwDOC8ZX09oAKGRiMTViYTBmZDUwODkwMTU2ZWQ0MDA4N2NjZWRjNzg1MWExZjViNzY","sha1":"59ee8765919191f21aa021fef3204ddd7c4cdb82","sha2":"db15ba0fd50890156ed40087ccedc7851a1f5b76"},"currentUser":null,"repo":{"id":197547987,"defaultBranch":"7.3","name":"error-handler","ownerLogin":"symfony","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2019-07-18T08:42:44.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/143937?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":54,"text":"@@ -55,7 +55,6 @@ class ErrorHandler","html":"@@ -55,7 +55,6 @@ class ErrorHandler","displayNoNewLineWarning":false,"position":0,"left":54,"right":54},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":55,"text":" \\E_USER_DEPRECATED =\u003e 'User Deprecated',","html":" \\\u003cspan class=pl-c1\u003eE_USER_DEPRECATED\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eUser Deprecated\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":1,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" \\E_NOTICE =\u003e 'Notice',","html":" \\\u003cspan class=pl-c1\u003eE_NOTICE\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eNotice\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":56,"right":56},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":57,"text":" \\E_USER_NOTICE =\u003e 'User Notice',","html":" \\\u003cspan class=pl-c1\u003eE_USER_NOTICE\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eUser Notice\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":3,"left":57,"right":57},{"stylingDirective":null,"type":"DELETION","blobLineNumber":58,"text":"- \\E_STRICT =\u003e 'Runtime Notice',","html":"- \\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eRuntime Notice\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":58,"right":57},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":58,"text":" \\E_WARNING =\u003e 'Warning',","html":" \\\u003cspan class=pl-c1\u003eE_WARNING\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eWarning\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":59,"right":58},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":59,"text":" \\E_USER_WARNING =\u003e 'User Warning',","html":" \\\u003cspan class=pl-c1\u003eE_USER_WARNING\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eUser Warning\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":6,"left":60,"right":59},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":60,"text":" \\E_COMPILE_WARNING =\u003e 'Compile Warning',","html":" \\\u003cspan class=pl-c1\u003eE_COMPILE_WARNING\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eCompile Warning\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":7,"left":61,"right":60},{"stylingDirective":null,"type":"HUNK","blobLineNumber":71,"text":"@@ -73,7 +72,6 @@ class ErrorHandler","html":"@@ -73,7 +72,6 @@ class ErrorHandler","displayNoNewLineWarning":false,"position":8,"left":72,"right":71},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":72,"text":" \\E_USER_DEPRECATED =\u003e [null, LogLevel::INFO],","html":" \\\u003cspan class=pl-c1\u003eE_USER_DEPRECATED\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eINFO\u003c/span\u003e],","displayNoNewLineWarning":false,"position":9,"left":73,"right":72},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":73,"text":" \\E_NOTICE =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_NOTICE\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":10,"left":74,"right":73},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":74,"text":" \\E_USER_NOTICE =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_USER_NOTICE\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":11,"left":75,"right":74},{"stylingDirective":null,"type":"DELETION","blobLineNumber":76,"text":"- \\E_STRICT =\u003e [null, LogLevel::WARNING],","html":"- \\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":12,"left":76,"right":74},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":75,"text":" \\E_WARNING =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":13,"left":77,"right":75},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":76,"text":" \\E_USER_WARNING =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_USER_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":14,"left":78,"right":76},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":77,"text":" \\E_COMPILE_WARNING =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_COMPILE_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":15,"left":79,"right":77},{"stylingDirective":null,"type":"HUNK","blobLineNumber":180,"text":"@@ -183,6 +181,11 @@ public static function call(callable $function, ...$arguments)","html":"@@ -183,6 +181,11 @@ public static function call(callable $function, ...$arguments)","displayNoNewLineWarning":false,"position":16,"left":182,"right":180},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":181,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":17,"left":183,"right":181},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":182,"text":" public function __construct(?BufferingLogger $bootstrappingLogger = null, bool $debug = false)","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003e__construct\u003c/span\u003e(?\u003cspan class=pl-smi\u003e\u003cspan class=pl-smi\u003eBufferingLogger\u003c/span\u003e\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootstrappingLogger\u003c/span\u003e = \u003cspan class=pl-c1\u003enull\u003c/span\u003e, \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003edebug\u003c/span\u003e = \u003cspan class=pl-c1\u003efalse\u003c/span\u003e)","displayNoNewLineWarning":false,"position":18,"left":184,"right":182},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":183,"text":" {","html":" {","displayNoNewLineWarning":false,"position":19,"left":185,"right":183},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":184,"text":"+ if (\\PHP_VERSION_ID \u003c 80400) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003ePHP_VERSION_ID\u003c/span\u003e \u0026lt; \u003cspan class=pl-c1\u003e80400\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":20,"left":185,"right":184},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":185,"text":"+ $this-\u003elevels[\\E_STRICT] = 'Runtime Notice';","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elevels\u003c/span\u003e[\\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e] = \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eRuntime Notice\u003c/span\u003e\u0026#39;\u003c/span\u003e;","displayNoNewLineWarning":false,"position":21,"left":185,"right":185},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":186,"text":"+ $this-\u003eloggers[\\E_STRICT] = [null, LogLevel::WARNING];","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eloggers\u003c/span\u003e[\\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e] = [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e];","displayNoNewLineWarning":false,"position":22,"left":185,"right":186},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":187,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":23,"left":185,"right":187},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":188,"text":"+","html":"+","displayNoNewLineWarning":false,"position":24,"left":185,"right":188},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":189,"text":" if ($bootstrappingLogger) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootstrappingLogger\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":25,"left":186,"right":189},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":190,"text":" $this-\u003ebootstrappingLogger = $bootstrappingLogger;","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ebootstrappingLogger\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootstrappingLogger\u003c/span\u003e;","displayNoNewLineWarning":false,"position":26,"left":187,"right":190},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":191,"text":" $this-\u003esetDefaultLogger($bootstrappingLogger);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003esetDefaultLogger\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootstrappingLogger\u003c/span\u003e);","displayNoNewLineWarning":false,"position":27,"left":188,"right":191}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":813,"linesChanged":7,"newTreeEntry":{"lineCount":813,"path":"ErrorHandler.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"ErrorHandler.php","mode":100644},"linesAdded":5,"linesDeleted":2,"path":"ErrorHandler.php","pathDigest":"56ca8e9a82464bc5fe724abd27d352b413542beefc2e1b9d298598a60e9a3da0","status":"MODIFIED","truncatedReason":null,"oldOid":"59ee8765919191f21aa021fef3204ddd7c4cdb82","newOid":"db15ba0fd50890156ed40087ccedc7851a1f5b76","copilotChatReference":null,"deletedSha":"59ee8765919191f21aa021fef3204ddd7c4cdb82","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":212,"text":"@@ -213,7 +213,6 @@ public function testDefaultLogger()","html":"@@ -213,7 +213,6 @@ public function testDefaultLogger()","displayNoNewLineWarning":false,"position":0,"left":212,"right":212},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":213,"text":" \\E_USER_DEPRECATED =\u003e [null, LogLevel::INFO],","html":" \\\u003cspan class=pl-c1\u003eE_USER_DEPRECATED\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eINFO\u003c/span\u003e],","displayNoNewLineWarning":false,"position":1,"left":213,"right":213},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":214,"text":" \\E_NOTICE =\u003e [$logger, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_NOTICE\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003elogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":2,"left":214,"right":214},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":215,"text":" \\E_USER_NOTICE =\u003e [$logger, LogLevel::CRITICAL],","html":" \\\u003cspan class=pl-c1\u003eE_USER_NOTICE\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003elogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eCRITICAL\u003c/span\u003e],","displayNoNewLineWarning":false,"position":3,"left":215,"right":215},{"stylingDirective":null,"type":"DELETION","blobLineNumber":216,"text":"- \\E_STRICT =\u003e [null, LogLevel::WARNING],","html":"- \\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":4,"left":216,"right":215},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":216,"text":" \\E_WARNING =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":5,"left":217,"right":216},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":217,"text":" \\E_USER_WARNING =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_USER_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":6,"left":218,"right":217},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":218,"text":" \\E_COMPILE_WARNING =\u003e [null, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_COMPILE_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":7,"left":219,"right":218},{"stylingDirective":null,"type":"HUNK","blobLineNumber":223,"text":"@@ -225,6 +224,11 @@ public function testDefaultLogger()","html":"@@ -225,6 +224,11 @@ public function testDefaultLogger()","displayNoNewLineWarning":false,"position":8,"left":224,"right":223},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":224,"text":" \\E_ERROR =\u003e [null, LogLevel::CRITICAL],","html":" \\\u003cspan class=pl-c1\u003eE_ERROR\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eCRITICAL\u003c/span\u003e],","displayNoNewLineWarning":false,"position":9,"left":225,"right":224},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":225,"text":" \\E_CORE_ERROR =\u003e [null, LogLevel::CRITICAL],","html":" \\\u003cspan class=pl-c1\u003eE_CORE_ERROR\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eCRITICAL\u003c/span\u003e],","displayNoNewLineWarning":false,"position":10,"left":226,"right":225},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":226,"text":" ];","html":" ];","displayNoNewLineWarning":false,"position":11,"left":227,"right":226},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":227,"text":"+","html":"+","displayNoNewLineWarning":false,"position":12,"left":227,"right":227},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":228,"text":"+ if (\\PHP_VERSION_ID \u003c 80400) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003ePHP_VERSION_ID\u003c/span\u003e \u0026lt; \u003cspan class=pl-c1\u003e80400\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":13,"left":227,"right":228},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":229,"text":"+ $loggers[\\E_STRICT] = [null, LogLevel::WARNING];","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eloggers\u003c/span\u003e[\\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e] = [\u003cspan class=pl-c1\u003enull\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e];","displayNoNewLineWarning":false,"position":14,"left":227,"right":229},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":230,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":15,"left":227,"right":230},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":231,"text":"+","html":"+","displayNoNewLineWarning":false,"position":16,"left":227,"right":231},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":232,"text":" $this-\u003eassertSame($loggers, $handler-\u003esetLoggers([]));","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eassertSame\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eloggers\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehandler\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003esetLoggers\u003c/span\u003e([]));","displayNoNewLineWarning":false,"position":17,"left":228,"right":232},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":233,"text":" } finally {","html":" } \u003cspan class=pl-k\u003efinally\u003c/span\u003e {","displayNoNewLineWarning":false,"position":18,"left":229,"right":233},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":234,"text":" restore_error_handler();","html":" \u003cspan class=pl-en\u003erestore_error_handler\u003c/span\u003e();","displayNoNewLineWarning":false,"position":19,"left":230,"right":234},{"stylingDirective":null,"type":"HUNK","blobLineNumber":481,"text":"@@ -478,7 +482,6 @@ public function testBootstrappingLogger()","html":"@@ -478,7 +482,6 @@ public function testBootstrappingLogger()","displayNoNewLineWarning":false,"position":20,"left":477,"right":481},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":482,"text":" \\E_USER_DEPRECATED =\u003e [$bootLogger, LogLevel::INFO],","html":" \\\u003cspan class=pl-c1\u003eE_USER_DEPRECATED\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eINFO\u003c/span\u003e],","displayNoNewLineWarning":false,"position":21,"left":478,"right":482},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":483,"text":" \\E_NOTICE =\u003e [$bootLogger, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_NOTICE\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":22,"left":479,"right":483},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":484,"text":" \\E_USER_NOTICE =\u003e [$bootLogger, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_USER_NOTICE\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":23,"left":480,"right":484},{"stylingDirective":null,"type":"DELETION","blobLineNumber":481,"text":"- \\E_STRICT =\u003e [$bootLogger, LogLevel::WARNING],","html":"- \\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":24,"left":481,"right":484},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":485,"text":" \\E_WARNING =\u003e [$bootLogger, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":25,"left":482,"right":485},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":486,"text":" \\E_USER_WARNING =\u003e [$bootLogger, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_USER_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":26,"left":483,"right":486},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":487,"text":" \\E_COMPILE_WARNING =\u003e [$bootLogger, LogLevel::WARNING],","html":" \\\u003cspan class=pl-c1\u003eE_COMPILE_WARNING\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e],","displayNoNewLineWarning":false,"position":27,"left":484,"right":487},{"stylingDirective":null,"type":"HUNK","blobLineNumber":493,"text":"@@ -491,6 +494,10 @@ public function testBootstrappingLogger()","html":"@@ -491,6 +494,10 @@ public function testBootstrappingLogger()","displayNoNewLineWarning":false,"position":28,"left":490,"right":493},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":494,"text":" \\E_CORE_ERROR =\u003e [$bootLogger, LogLevel::CRITICAL],","html":" \\\u003cspan class=pl-c1\u003eE_CORE_ERROR\u003c/span\u003e =\u0026gt; [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eCRITICAL\u003c/span\u003e],","displayNoNewLineWarning":false,"position":29,"left":491,"right":494},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":495,"text":" ];","html":" ];","displayNoNewLineWarning":false,"position":30,"left":492,"right":495},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":496,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":31,"left":493,"right":496},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":497,"text":"+ if (\\PHP_VERSION_ID \u003c 80400) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003ePHP_VERSION_ID\u003c/span\u003e \u0026lt; \u003cspan class=pl-c1\u003e80400\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":32,"left":493,"right":497},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":498,"text":"+ $loggers[\\E_STRICT] = [$bootLogger, LogLevel::WARNING];","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eloggers\u003c/span\u003e[\\\u003cspan class=pl-c1\u003eE_STRICT\u003c/span\u003e] = [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ebootLogger\u003c/span\u003e, LogLevel::\u003cspan class=pl-c1\u003eWARNING\u003c/span\u003e];","displayNoNewLineWarning":false,"position":33,"left":493,"right":498},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":499,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":34,"left":493,"right":499},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":500,"text":"+","html":"+","displayNoNewLineWarning":false,"position":35,"left":493,"right":500},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":501,"text":" $this-\u003eassertSame($loggers, $handler-\u003esetLoggers([]));","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eassertSame\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eloggers\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehandler\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003esetLoggers\u003c/span\u003e([]));","displayNoNewLineWarning":false,"position":36,"left":494,"right":501},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":502,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":37,"left":495,"right":502},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":503,"text":" $handler-\u003ehandleError(\\E_DEPRECATED, 'Foo message', __FILE__, 123, []);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehandler\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ehandleError\u003c/span\u003e(\\\u003cspan class=pl-c1\u003eE_DEPRECATED\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eFoo message\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-c1\u003e__FILE__\u003c/span\u003e, \u003cspan class=pl-c1\u003e123\u003c/span\u003e, []);","displayNoNewLineWarning":false,"position":38,"left":496,"right":503}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":741,"linesChanged":11,"newTreeEntry":{"lineCount":741,"path":"Tests/ErrorHandlerTest.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Tests/ErrorHandlerTest.php","mode":100644},"linesAdded":9,"linesDeleted":2,"path":"Tests/ErrorHandlerTest.php","pathDigest":"5c3c3780c06123103e268e577741dbebbebc1aeb23a887180747d5955b686a2d","status":"MODIFIED","truncatedReason":null,"oldOid":"59ee8765919191f21aa021fef3204ddd7c4cdb82","newOid":"db15ba0fd50890156ed40087ccedc7851a1f5b76","copilotChatReference":null,"deletedSha":"59ee8765919191f21aa021fef3204ddd7c4cdb82","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE0MzkzNw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/symfony/error-handler/commit/db15ba0fd50890156ed40087ccedc7851a1f5b76","fileTreeExpanded":true,"headerInfo":{"additions":14,"deletions":4,"filesChanged":2,"filesChangedString":"2"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":2,"truncated":false,"byteCount":3124,"lineShownCount":67},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"m28UJLcbKmub4C8_N4tk20wA5CtxF1qtzjWbInQxaM-MOyLUxIyut0AO4Vi-KCsyXbgz2ygMblHtV7puOLx7XQ"},"/users/diffview?diff=unified":{"post":"u6BQE5ebQaAZRQ5VkNR2oc2950wHgggsXOMGgzkS9b6s9Gbj5AzFfMKrwDIZdzlI3AUwvF6ZPNB_gSfPdZ_mLA"},"/notifications/thread":{"post":"M0MV30rZiHT48h7UIf4WnG54fg6cU_zcIYUT6SWMvkwyJ8xKqrgbgLZ-BF5_ASiiHhwTfV5tslbjtYV29vv1hA"}}},"title":"[ErrorHandler][VarDumper] Remove PHP 8.4 deprecations · symfony/error-handler@db15ba0","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-2bfe39677d14.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"show_pusher_on_commit_detail":false}}}

Commit db15ba0

Browse files
[ErrorHandler][VarDumper] Remove PHP 8.4 deprecations
1 parent 59ee876 commit db15ba0

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

ErrorHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class ErrorHandler
5555
\E_USER_DEPRECATED => 'User Deprecated',
5656
\E_NOTICE => 'Notice',
5757
\E_USER_NOTICE => 'User Notice',
58-
\E_STRICT => 'Runtime Notice',
5958
\E_WARNING => 'Warning',
6059
\E_USER_WARNING => 'User Warning',
6160
\E_COMPILE_WARNING => 'Compile Warning',
@@ -73,7 +72,6 @@ class ErrorHandler
7372
\E_USER_DEPRECATED => [null, LogLevel::INFO],
7473
\E_NOTICE => [null, LogLevel::WARNING],
7574
\E_USER_NOTICE => [null, LogLevel::WARNING],
76-
\E_STRICT => [null, LogLevel::WARNING],
7775
\E_WARNING => [null, LogLevel::WARNING],
7876
\E_USER_WARNING => [null, LogLevel::WARNING],
7977
\E_COMPILE_WARNING => [null, LogLevel::WARNING],
@@ -183,6 +181,11 @@ public static function call(callable $function, ...$arguments)
183181

184182
public function __construct(?BufferingLogger $bootstrappingLogger = null, bool $debug = false)
185183
{
184+
if (\PHP_VERSION_ID < 80400) {
185+
$this->levels[\E_STRICT] = 'Runtime Notice';
186+
$this->loggers[\E_STRICT] = [null, LogLevel::WARNING];
187+
}
188+
186189
if ($bootstrappingLogger) {
187190
$this->bootstrappingLogger = $bootstrappingLogger;
188191
$this->setDefaultLogger($bootstrappingLogger);

Tests/ErrorHandlerTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ public function testDefaultLogger()
213213
\E_USER_DEPRECATED => [null, LogLevel::INFO],
214214
\E_NOTICE => [$logger, LogLevel::WARNING],
215215
\E_USER_NOTICE => [$logger, LogLevel::CRITICAL],
216-
\E_STRICT => [null, LogLevel::WARNING],
217216
\E_WARNING => [null, LogLevel::WARNING],
218217
\E_USER_WARNING => [null, LogLevel::WARNING],
219218
\E_COMPILE_WARNING => [null, LogLevel::WARNING],
@@ -225,6 +224,11 @@ public function testDefaultLogger()
225224
\E_ERROR => [null, LogLevel::CRITICAL],
226225
\E_CORE_ERROR => [null, LogLevel::CRITICAL],
227226
];
227+
228+
if (\PHP_VERSION_ID < 80400) {
229+
$loggers[\E_STRICT] = [null, LogLevel::WARNING];
230+
}
231+
228232
$this->assertSame($loggers, $handler->setLoggers([]));
229233
} finally {
230234
restore_error_handler();
@@ -478,7 +482,6 @@ public function testBootstrappingLogger()
478482
\E_USER_DEPRECATED => [$bootLogger, LogLevel::INFO],
479483
\E_NOTICE => [$bootLogger, LogLevel::WARNING],
480484
\E_USER_NOTICE => [$bootLogger, LogLevel::WARNING],
481-
\E_STRICT => [$bootLogger, LogLevel::WARNING],
482485
\E_WARNING => [$bootLogger, LogLevel::WARNING],
483486
\E_USER_WARNING => [$bootLogger, LogLevel::WARNING],
484487
\E_COMPILE_WARNING => [$bootLogger, LogLevel::WARNING],
@@ -491,6 +494,10 @@ public function testBootstrappingLogger()
491494
\E_CORE_ERROR => [$bootLogger, LogLevel::CRITICAL],
492495
];
493496

497+
if (\PHP_VERSION_ID < 80400) {
498+
$loggers[\E_STRICT] = [$bootLogger, LogLevel::WARNING];
499+
}
500+
494501
$this->assertSame($loggers, $handler->setLoggers([]));
495502

496503
$handler->handleError(\E_DEPRECATED, 'Foo message', __FILE__, 123, []);

0 commit comments

Comments
 (0)
0