File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444\define ('KINT_PHP82 ' , \version_compare (PHP_VERSION , '8.2 ' ) >= 0 );
4545\define ('KINT_PHP83 ' , \version_compare (PHP_VERSION , '8.3 ' ) >= 0 );
4646\define ('KINT_PHP84 ' , \version_compare (PHP_VERSION , '8.4 ' ) >= 0 );
47+ \define ('KINT_PHP85 ' , \version_compare (PHP_VERSION , '8.5 ' ) >= 0 );
4748
4849// Dynamic default settings
4950if (\strlen ((string ) \ini_get ('xdebug.file_link_format ' )) > 0 ) {
Original file line number Diff line number Diff line change @@ -102,9 +102,14 @@ class DomPlugin extends AbstractPlugin implements PluginBeginInterface
102102 'previousElementSibling ' => true ,
103103 'nextElementSibling ' => true ,
104104 'innerHTML ' => false ,
105+ 'outerHTML ' => false ,
105106 'substitutedNodeValue ' => false ,
106107 ];
107108
109+ public const DOM_NS_VERSIONS = [
110+ 'outerHTML ' => KINT_PHP85 ,
111+ ];
112+
108113 /**
109114 * @psalm-var non-empty-array<string, bool> Property names to readable status
110115 */
@@ -458,6 +463,16 @@ public static function getKnownProperties(object $var): array
458463 if ($ var instanceof Attr || $ var instanceof CharacterData) {
459464 $ known_properties ['nodeValue ' ] = false ;
460465 }
466+
467+ foreach (self ::DOM_NS_VERSIONS as $ key => $ val ) {
468+ /**
469+ * @psalm-var bool $val
470+ * Psalm bug #4509
471+ */
472+ if (false === $ val ) {
473+ unset($ known_properties [$ key ]); // @codeCoverageIgnore
474+ }
475+ }
461476 } else {
462477 $ known_properties = self ::DOMNODE_PROPS ;
463478 if ($ var instanceof DOMElement) {
Original file line number Diff line number Diff line change @@ -1126,6 +1126,10 @@ private function getExpectedPropsCount(bool $old)
11261126 'NODE_PROPS ' => 14 ,
11271127 'ELEMENT_PROPS ' => 15 ,
11281128 ];
1129+
1130+ if (KINT_PHP85 ) {
1131+ ++$ expected_props ['ELEMENT_PROPS ' ];
1132+ }
11291133 }
11301134
11311135 $ expected_props ['ELEMENT_PROPS ' ] += $ expected_props ['NODE_PROPS ' ];
You can’t perform that action at this time.
0 commit comments