Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dom\XMLDocument is unimplemented #11079

Open
jnvsor opened this issue Aug 21, 2024 · 2 comments
Open

Dom\XMLDocument is unimplemented #11079

jnvsor opened this issue Aug 21, 2024 · 2 comments
Milestone

Comments

@jnvsor
Copy link
Contributor

jnvsor commented Aug 21, 2024

https://psalm.dev/r/fd6cc59c7d

Dom\XMLDocument is no longer an alias of DOMDocument per https://wiki.php.net/rfc/opt_in_dom_spec_compliance

I propose the following BC solution. The HTML 5 RFC added class aliases such as DOMNode -> DOM\Node etc. I propose to make them real classes instead of aliases.

Copy link

I found these snippets:

https://psalm.dev/r/fd6cc59c7d
<?php

$x = Dom\XMLDocument::createFromString('<?xml>');
$h = Dom\HTMLDocument::createFromString('<!DOCTYPE html>');
Psalm output (using commit 16b24bd):

ERROR: UndefinedClass - 3:6 - Class, interface or enum named Dom\XMLDocument does not exist

@weirdan weirdan added this to the PHP 8.4 milestone Sep 7, 2024
@weirdan
Copy link
Collaborator

weirdan commented Sep 7, 2024

PHP 8.4 is not out yet either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants