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

Fix DOMDocument::create*() return types #3737

Merged
merged 3 commits into from
Dec 17, 2024
Merged

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Dec 17, 2024

@ondrejmirtes
Copy link
Member

I'd rather do benevolent unions here, because the failures are going to be rare.

@ondrejmirtes ondrejmirtes merged commit 73d0f13 into phpstan:1.12.x Dec 17, 2024
452 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@dimadeush
Copy link

dimadeush commented Dec 17, 2024

@ondrejmirtes Sometimes I can see that doc from PHPStorm is not the same as documentation on the php web site. F.e.

/**
     * Adds new child at the end of the children
     * @link https://php.net/manual/en/domnode.appendchild.php
     * @param DOMNode $node <p>
     * The appended child.
     * </p>
     * @return DOMNode The node added.
     */
    public function appendChild(DOMNode $node) {}

But on the php web-site we can see next:

public DOMNode::appendChild(DOMNode $node): DOMNode|false

Currently I don't know where the "proper" way and maybe we need to communicate JetBrains as of PHPStorm jar plugin related. Will be done with link to this example. Also I don't know if other php functionality can have wrong description.

@dimadeush
Copy link

Created issue for JetBrains as several products can be related - https://youtrack.jetbrains.com/issue/WI-80068/Wrong-php-documentation-inside-php-jar-plugin

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