-
Notifications
You must be signed in to change notification settings - Fork 666
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
Improve DOM extension types #1965
Conversation
I guess it might be better to assume that |
I think it's fine - if there are complaints I can allow Psalm to not care about |
I've already reverted it via fixup before the merge 🙈 Should I send another PR or will you change it? |
* Improve DOM extension types * fixup! Improve DOM extension types
* upstream/master: (609 commits) Register so it doesn’t get removed Add support for compact Allow suppression of unused variable issues Fix tests Fix unused ref in assign op Issue 1926 unused variable (vimeo#1967) Fix ignoreExceptions tags (vimeo#1966) Improve DOM extension types (vimeo#1965) Fix infinite recursion on property types Analyse binary ops always Mark private properties unused when referenced only in constructor (vimeo#1962) Prefix constant Add slash Normalise plugin path Also convert \\ to / when scanning windows configs on macs Fix file path weirdness when scanning config files Reduce with / before converting back Improve behaviour of templated template assertions Break out templated assertion tests Restore gitignore for .*.swp in sub-directories (vimeo#1958) ... # Conflicts: # src/Psalm/Config.php # src/Psalm/Context.php # src/Psalm/Internal/Analyzer/ClassAnalyzer.php # src/Psalm/Internal/Analyzer/CommentAnalyzer.php # src/Psalm/Internal/Analyzer/FileAnalyzer.php # src/Psalm/Internal/Analyzer/FunctionAnalyzer.php # src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php # src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php # src/Psalm/Internal/Analyzer/MethodAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/Call/NewAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ConstFetchAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php # src/Psalm/Internal/Analyzer/StatementsAnalyzer.php # src/Psalm/Internal/Analyzer/TypeAnalyzer.php # src/Psalm/Internal/Codebase/Analyzer.php # src/Psalm/Internal/Codebase/ClassLikes.php # src/Psalm/Internal/Codebase/Populator.php # src/Psalm/Internal/Codebase/Properties.php # src/Psalm/Internal/Codebase/Scanner.php # src/Psalm/Internal/LanguageServer/LanguageServer.php # src/Psalm/Internal/LanguageServer/Server/TextDocument.php # src/Psalm/Internal/Provider/FunctionExistenceProvider.php # src/Psalm/Internal/Provider/FunctionParamsProvider.php # src/Psalm/Internal/Provider/FunctionReturnTypeProvider.php # src/Psalm/Internal/Provider/MethodExistenceProvider.php # src/Psalm/Internal/Provider/MethodParamsProvider.php # src/Psalm/Internal/Provider/MethodReturnTypeProvider.php # src/Psalm/Internal/Provider/MethodVisibilityProvider.php # src/Psalm/Internal/Provider/PropertyExistenceProvider.php # src/Psalm/Internal/Provider/PropertyTypeProvider.php # src/Psalm/Internal/Provider/PropertyVisibilityProvider.php # src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php # src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayReduceReturnTypeProvider.php # src/Psalm/Internal/Type/ParseTree.php # src/Psalm/Internal/Type/TypeCombination.php # src/Psalm/Internal/Visitor/ReflectorVisitor.php # src/Psalm/Type.php # src/Psalm/Type/Atomic/TNamedObject.php # src/Psalm/Type/Reconciler.php # src/command_functions.php
* Improve DOM extension types * fixup! Improve DOM extension types
#1951
DOMNode::insertBefore()
acceptsnull
in place of$refnode
DOMXPath::evaluate()
andDOMXPath::query()
acceptnull
in place of$contextnode
DOMDocument::$ownerDocument
is alwaysnull
DOMNode::$attributes
isnull
unless the node is instance ofDOMElement
DOMNode::$parentNode
isnull
for root nodesDOMNode::$firstChild, $lastChild, $previousSibling, $nextSibling
can benull
if there is no such nodeDOMNode::$namespaceURI, $baseURI
can benull
if they aren't defined for the documentDOMNode::$prefix
seems to always be a string contrary to what the PHP docs say