-
Notifications
You must be signed in to change notification settings - Fork 660
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 return type of DOMXPath::query #10443
Conversation
This can also return namespace nodes, which are not a child class of DOMNode.
Thanks! |
@nielsdos Since you are doing a lot of work in DOM. Can you tell me if there is any specific reason why the namespace node is not a DOMNode? Reference : php/php-src#6939 |
I'll reply here for now but let's not disturb this place here too much. You can contact me at my nielsdos at php dot net email address if you want to discuss more in detail. I wasn't there when the decision was made 20 years ago. This is something that I would like to do though and I think it's possible to do. It's just not entirely clear what consequences this could have for the ecosystem (extensions+existing code).
|
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [vimeo/psalm](https://togithub.com/vimeo/psalm) | `~5.16.0` -> `~5.17.0` | [![age](https://developer.mend.io/api/mc/badges/age/packagist/vimeo%2fpsalm/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/vimeo%2fpsalm/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/vimeo%2fpsalm/5.16.0/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/vimeo%2fpsalm/5.16.0/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vimeo/psalm (vimeo/psalm)</summary> ### [`v5.17.0`](https://togithub.com/vimeo/psalm/releases/tag/5.17.0) [Compare Source](https://togithub.com/vimeo/psalm/compare/5.16.0...5.17.0) <!-- Release notes generated using configuration in .github/release.yml at 5.x --> #### What's Changed ##### Features - Implement by-ref closure use analysis by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10419](https://togithub.com/vimeo/psalm/pull/10419) ##### Fixes - Update MongoDB stubs for 1.17 by [@​alcaeus](https://togithub.com/alcaeus) in [https://github.com/vimeo/psalm/pull/10402](https://togithub.com/vimeo/psalm/pull/10402) - Fix backtick analysis by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10409](https://togithub.com/vimeo/psalm/pull/10409) - Declare we do not support document highlighting by [@​tm1000](https://togithub.com/tm1000) in [https://github.com/vimeo/psalm/pull/10408](https://togithub.com/vimeo/psalm/pull/10408) - update define types to be correct by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10423](https://togithub.com/vimeo/psalm/pull/10423) - Fix return type of DOMXPath::query by [@​nielsdos](https://togithub.com/nielsdos) in [https://github.com/vimeo/psalm/pull/10443](https://togithub.com/vimeo/psalm/pull/10443) - Fix CLI -r error by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10442](https://togithub.com/vimeo/psalm/pull/10442) - Use correct file path while adding unused suppressions for virtual \__… by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10434](https://togithub.com/vimeo/psalm/pull/10434) - Restore support for null coalesce on match expressions by [@​tscni](https://togithub.com/tscni) in [https://github.com/vimeo/psalm/pull/10422](https://togithub.com/vimeo/psalm/pull/10422) - Fix static magic method pureness not being inherited from traits by [@​tscni](https://togithub.com/tscni) in [https://github.com/vimeo/psalm/pull/10429](https://togithub.com/vimeo/psalm/pull/10429) - Fix POSIX only detection of absolute paths by [@​rarila](https://togithub.com/rarila) in [https://github.com/vimeo/psalm/pull/10441](https://togithub.com/vimeo/psalm/pull/10441) - Emit UnusedPsalmSuppress issues for suppressed issues already removed by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10431](https://togithub.com/vimeo/psalm/pull/10431) - Use keyed arrays when assigning literal union keys & assertion fixes by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10439](https://togithub.com/vimeo/psalm/pull/10439) ##### Internal changes - use branch name to randomize tests to ensure test dependencies will error by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10424](https://togithub.com/vimeo/psalm/pull/10424) #### New Contributors - [@​nielsdos](https://togithub.com/nielsdos) made their first contribution in [https://github.com/vimeo/psalm/pull/10443](https://togithub.com/vimeo/psalm/pull/10443) **Full Changelog**: vimeo/psalm@5.16.0...5.17.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/php-sdk). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [vimeo/psalm](https://togithub.com/vimeo/psalm) | `~5.16.0` -> `~5.17.0` | [![age](https://developer.mend.io/api/mc/badges/age/packagist/vimeo%2fpsalm/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/vimeo%2fpsalm/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/vimeo%2fpsalm/5.16.0/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/vimeo%2fpsalm/5.16.0/5.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vimeo/psalm (vimeo/psalm)</summary> ### [`v5.17.0`](https://togithub.com/vimeo/psalm/releases/tag/5.17.0) [Compare Source](https://togithub.com/vimeo/psalm/compare/5.16.0...5.17.0) <!-- Release notes generated using configuration in .github/release.yml at 5.x --> #### What's Changed ##### Features - Implement by-ref closure use analysis by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10419](https://togithub.com/vimeo/psalm/pull/10419) ##### Fixes - Update MongoDB stubs for 1.17 by [@​alcaeus](https://togithub.com/alcaeus) in [https://github.com/vimeo/psalm/pull/10402](https://togithub.com/vimeo/psalm/pull/10402) - Fix backtick analysis by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10409](https://togithub.com/vimeo/psalm/pull/10409) - Declare we do not support document highlighting by [@​tm1000](https://togithub.com/tm1000) in [https://github.com/vimeo/psalm/pull/10408](https://togithub.com/vimeo/psalm/pull/10408) - update define types to be correct by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10423](https://togithub.com/vimeo/psalm/pull/10423) - Fix return type of DOMXPath::query by [@​nielsdos](https://togithub.com/nielsdos) in [https://github.com/vimeo/psalm/pull/10443](https://togithub.com/vimeo/psalm/pull/10443) - Fix CLI -r error by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10442](https://togithub.com/vimeo/psalm/pull/10442) - Use correct file path while adding unused suppressions for virtual \__… by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10434](https://togithub.com/vimeo/psalm/pull/10434) - Restore support for null coalesce on match expressions by [@​tscni](https://togithub.com/tscni) in [https://github.com/vimeo/psalm/pull/10422](https://togithub.com/vimeo/psalm/pull/10422) - Fix static magic method pureness not being inherited from traits by [@​tscni](https://togithub.com/tscni) in [https://github.com/vimeo/psalm/pull/10429](https://togithub.com/vimeo/psalm/pull/10429) - Fix POSIX only detection of absolute paths by [@​rarila](https://togithub.com/rarila) in [https://github.com/vimeo/psalm/pull/10441](https://togithub.com/vimeo/psalm/pull/10441) - Emit UnusedPsalmSuppress issues for suppressed issues already removed by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10431](https://togithub.com/vimeo/psalm/pull/10431) - Use keyed arrays when assigning literal union keys & assertion fixes by [@​danog](https://togithub.com/danog) in [https://github.com/vimeo/psalm/pull/10439](https://togithub.com/vimeo/psalm/pull/10439) ##### Internal changes - use branch name to randomize tests to ensure test dependencies will error by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10424](https://togithub.com/vimeo/psalm/pull/10424) #### New Contributors - [@​nielsdos](https://togithub.com/nielsdos) made their first contribution in [https://github.com/vimeo/psalm/pull/10443](https://togithub.com/vimeo/psalm/pull/10443) **Full Changelog**: vimeo/psalm@5.16.0...5.17.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/php-sdk). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Tom Carrio <tom@carrio.dev>
I tried adding this change into phpstan, which sparked some interessing questions: phpstan/phpstan-src#2842 (comment) @nielsdos do you have concrete "real world" code examples for which this change is necessary/useful? |
|
This can also return namespace nodes, which are not a child class of DOMNode.