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

DomNode unimplemented methods have been removed in PHP 8.0 #1685

Conversation

Bellangelo
Copy link
Contributor

Reference: https://www.php.net/manual/en/class.domnode.php

8.0.0 | The unimplemented methods DOMNode::compareDocumentPosition(), DOMNode::isEqualNode(), DOMNode::getFeature(), DOMNode::setUserData() and DOMNode::getUserData() have been removed.

@LolGleb
Copy link
Contributor

LolGleb commented Oct 29, 2024

Thank you for your PR! I have checked all the mentioned methods and it seems that DOMNode::isEqualNode() was reintroduced in php 8.3 php/php-src#11690
I believe we shouldn't mark it as removed in this case.

@Bellangelo
Copy link
Contributor Author

Bellangelo commented Oct 29, 2024

Thank you for your PR! I have checked all the mentioned methods and it seems that DOMNode::isEqualNode() was reintroduced in php 8.3 php/php-src#11690
I believe we shouldn't mark it as removed in this case.

Hmm.. interesting. I guess I will have to open a PR in the docs as well :D.

Nevertheless, will something like this work? How do you handle such cases?

/**
 * @since 5.6
 * @removed 8.0
 * @since 8.3
*/
public function method(): void;

@LolGleb
Copy link
Contributor

LolGleb commented Oct 29, 2024

I wasn't able to find similar cases in the project... I don't think that it's allowed to have more than one @since mark in a PHPDoc. I guess the best thing we can do is simply leave this method without @removed or @since marks.

@nielsdos
Copy link
Contributor

compareDocumentPosition is also reintroduced with an actual implementation in PHP 8.4.

@LolGleb
Copy link
Contributor

LolGleb commented Oct 30, 2024

You are right. That means it should be also left without @removed mark.

@Bellangelo
Copy link
Contributor Author

Bellangelo commented Oct 30, 2024

@LolGleb @nielsdos I have removed the @removed from the compareDocumentPosition and isEqualNode here 908b61d

@LolGleb LolGleb merged commit 600da0e into JetBrains:master Oct 30, 2024
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

3 participants