René's URL Explorer Experiment


Title: Fix phpstan/phpstan#6934: Nullsafe operator does not narrow down type by phpstan-bot · Pull Request #5322 · phpstan/phpstan-src · GitHub

Open Graph Title: Fix phpstan/phpstan#6934: Nullsafe operator does not narrow down type by phpstan-bot · Pull Request #5322 · phpstan/phpstan-src

X Title: Fix phpstan/phpstan#6934: Nullsafe operator does not narrow down type by phpstan-bot · Pull Request #5322 · phpstan/phpstan-src

Description: PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository. - Fix phpstan/phpstan#6934: Nullsafe operator does not narrow down type by phpstan-bot · Pull Request #5322 · phpstan/phpstan-src

Open Graph Description: Summary When using chained nullsafe operators like $node?->parentNode?->removeChild($node), PHPStan did not narrow $node to non-null inside the method call arguments, even though the nullsafe...

X Description: Summary When using chained nullsafe operators like $node?->parentNode?->removeChild($node), PHPStan did not narrow $node to non-null inside the method call arguments, even though the ...

Opengraph URL: https://github.com/phpstan/phpstan-src/pull/5322

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:decf81fa-f2f1-7820-5a1a-7e16baa9d0ec
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id913C:95C88:817910:ADE0AD:6B00DD06
html-safe-noncef21db69fd6f6e69e87f62ed78fae1f3ad6ba24b738175621d5e82fc37e435e25
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTNDOjk1Qzg4OjgxNzkxMDpBREUwQUQ6NkIwMEREMDYiLCJ2aXNpdG9yX2lkIjoiNzc1ODg5OTQ5MDQ5NjUwMzA0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac291e77196fe51d613a781cb244a31480a3bd86370d58523d7e6aaae7eb03b73d
hovercard-subject-tagpull_request:3461834863
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/phpstan/phpstan-src/5322/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/2a21034952def2ae2f076eee347437d32481019f86c47f3a327314bc4a09aa95/phpstan/phpstan-src/pull/5322
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2a21034952def2ae2f076eee347437d32481019f86c47f3a327314bc4a09aa95/phpstan/phpstan-src/pull/5322
og:image:altSummary When using chained nullsafe operators like $node?->parentNode?->removeChild($node), PHPStan did not narrow $node to non-null inside the method call arguments, even though the nullsafe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamephpstan-bot
hostnamegithub.com
expected-hostnamegithub.com
None043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf
turbo-cache-controlno-cache
go-importgithub.com/phpstan/phpstan-src git https://github.com/phpstan/phpstan-src.git
octolytics-dimension-user_id16435710
octolytics-dimension-user_loginphpstan
octolytics-dimension-repository_id219334214
octolytics-dimension-repository_nwophpstan/phpstan-src
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id219334214
octolytics-dimension-repository_network_root_nwophpstan/phpstan-src
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5425dc24e8bd8d6fca9641a12afc984825a43875
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/phpstan/phpstan-src/pull/5322#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5322
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5322
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=phpstan%2Fphpstan-src
Reloadhttps://github.com/phpstan/phpstan-src/pull/5322
Reloadhttps://github.com/phpstan/phpstan-src/pull/5322
Reloadhttps://github.com/phpstan/phpstan-src/pull/5322
phpstanhttps://github.com/phpstan
phpstan-srchttps://github.com/phpstan/phpstan-src
Codehttps://github.com/phpstan/phpstan-src
Pull requests186 (186)https://github.com/phpstan/phpstan-src/pulls
Actionshttps://github.com/phpstan/phpstan-src/actions
Security and qualityhttps://github.com/phpstan/phpstan-src/security
Insightshttps://github.com/phpstan/phpstan-src/insights
https://github.com/phpstan/phpstan-src
phpstan-bothttps://github.com/phpstan-bot
phpstan:2.1.xhttps://github.com/phpstan/phpstan-src/tree/2.1.x
phpstan-bot:create-pull-request/patch-y24thcmhttps://github.com/phpstan-bot/phpstan-src/tree/create-pull-request/patch-y24thcm
Conversationhttps://github.com/phpstan/phpstan-src/pull/5322
Commits8 (8)https://github.com/phpstan/phpstan-src/pull/5322/commits
Checkshttps://github.com/phpstan/phpstan-src/pull/5322/checks
Files changedhttps://github.com/phpstan/phpstan-src/pull/5322/files
Fix phpstan/phpstan#6934: Nullsafe operator does not narrow down typehttps://github.com/phpstan/phpstan-src/pull/5322#top
phpstan-bothttps://github.com/phpstan-bot
phpstan:2.1.xhttps://github.com/phpstan/phpstan-src/tree/2.1.x
phpstan-bot:create-pull-request/patch-y24thcmhttps://github.com/phpstan-bot/phpstan-src/tree/create-pull-request/patch-y24thcm
https://github.com/phpstan-bot
phpstan-bothttps://github.com/phpstan-bot
Mar 29, 2026https://github.com/phpstan/phpstan-src/pull/5322#issue-4162407476
phpstan/phpstan#6934https://github.com/phpstan/phpstan/issues/6934
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/VincentLanglet
VincentLanglethttps://github.com/VincentLanglet
Mar 29, 2026 https://github.com/phpstan/phpstan-src/pull/5322#pullrequestreview-4027282487
View reviewed changes https://github.com/phpstan/phpstan-src/pull/5322/files
https://github.com/VincentLanglet
VincentLanglethttps://github.com/VincentLanglet
staabmhttps://github.com/staabm
March 29, 2026 21:40https://github.com/phpstan/phpstan-src/pull/5322#event-24015098515
https://github.com/staabm
staabmhttps://github.com/staabm
Mar 30, 2026 https://github.com/phpstan/phpstan-src/pull/5322#pullrequestreview-4028333869
View reviewed changes https://github.com/phpstan/phpstan-src/pull/5322/files
tests/PHPStan/Analyser/nsrt/bug-6934.phphttps://github.com/phpstan/phpstan-src/pull/5322/files#diff-88102f564b583200d79fa92f98119cd2e4110310d079635d62fa1d76bae07475
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
tests/PHPStan/Analyser/nsrt/bug-6934.phphttps://github.com/phpstan/phpstan-src/pull/5322/files#diff-88102f564b583200d79fa92f98119cd2e4110310d079635d62fa1d76bae07475
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
tests/PHPStan/Analyser/nsrt/bug-6934.phphttps://github.com/phpstan/phpstan-src/pull/5322/files#diff-88102f564b583200d79fa92f98119cd2e4110310d079635d62fa1d76bae07475
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/staabm
staabmhttps://github.com/staabm
Mar 30, 2026 https://github.com/phpstan/phpstan-src/pull/5322#pullrequestreview-4028448519
View reviewed changes https://github.com/phpstan/phpstan-src/pull/5322/files
https://github.com/staabm
staabmhttps://github.com/staabm
VincentLanglethttps://github.com/VincentLanglet
March 30, 2026 06:59https://github.com/phpstan/phpstan-src/pull/5322#event-24023676014
https://github.com/staabm
staabmhttps://github.com/staabm
Mar 30, 2026 https://github.com/phpstan/phpstan-src/pull/5322#pullrequestreview-4028454068
View reviewed changes https://github.com/phpstan/phpstan-src/pull/5322/files
tests/PHPStan/Rules/Methods/CallMethodsRuleTest.phphttps://github.com/phpstan/phpstan-src/pull/5322/files#diff-f1af728da2cab64232c349363dfddc6adf25bec1ec992639b4f524c70a7b8ea0
staabmhttps://github.com/staabm
Mar 30, 2026https://github.com/phpstan/phpstan-src/pull/5322#discussion_r3007922427
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
phpstan-bothttps://github.com/phpstan-bot
Mar 30, 2026https://github.com/phpstan/phpstan-src/pull/5322#discussion_r3007944221
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
staabmhttps://github.com/staabm
Mar 30, 2026https://github.com/phpstan/phpstan-src/pull/5322#discussion_r3007959560
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
phpstan-bothttps://github.com/phpstan-bot
Mar 30, 2026https://github.com/phpstan/phpstan-src/pull/5322#discussion_r3007997606
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/clxmstaab
clxmstaabhttps://github.com/clxmstaab
force-pushedhttps://github.com/phpstan/phpstan-src/compare/4b10170ca87b4fc5956c5c46546852afbd2ea09d..fd7af45782e6990048ee296623d5d5c6cd8bbe59
4b10170https://github.com/phpstan/phpstan-src/commit/4b10170ca87b4fc5956c5c46546852afbd2ea09d
fd7af45https://github.com/phpstan/phpstan-src/commit/fd7af45782e6990048ee296623d5d5c6cd8bbe59
Compare https://github.com/phpstan/phpstan-src/compare/4b10170ca87b4fc5956c5c46546852afbd2ea09d..fd7af45782e6990048ee296623d5d5c6cd8bbe59
March 30, 2026 09:57https://github.com/phpstan/phpstan-src/pull/5322#event-24029384740
https://github.com/staabm
staabmhttps://github.com/staabm
force-pushedhttps://github.com/phpstan/phpstan-src/compare/fd7af45782e6990048ee296623d5d5c6cd8bbe59..5ebd295233adab2a2b52f16964f06c406e650904
fd7af45https://github.com/phpstan/phpstan-src/commit/fd7af45782e6990048ee296623d5d5c6cd8bbe59
5ebd295https://github.com/phpstan/phpstan-src/commit/5ebd295233adab2a2b52f16964f06c406e650904
Compare https://github.com/phpstan/phpstan-src/compare/fd7af45782e6990048ee296623d5d5c6cd8bbe59..5ebd295233adab2a2b52f16964f06c406e650904
March 30, 2026 09:58https://github.com/phpstan/phpstan-src/pull/5322#event-24029407654
https://github.com/VincentLanglet
VincentLanglethttps://github.com/VincentLanglet
force-pushedhttps://github.com/phpstan/phpstan-src/compare/a43dab4c29213fa4645cf7720442ba5edf34b683..8903c7865f6aca731352a1348f67859eb323df24
a43dab4https://github.com/phpstan/phpstan-src/commit/a43dab4c29213fa4645cf7720442ba5edf34b683
8903c78https://github.com/phpstan/phpstan-src/commit/8903c7865f6aca731352a1348f67859eb323df24
Compare https://github.com/phpstan/phpstan-src/compare/a43dab4c29213fa4645cf7720442ba5edf34b683..8903c7865f6aca731352a1348f67859eb323df24
March 30, 2026 22:04https://github.com/phpstan/phpstan-src/pull/5322#event-24053095926
github-actionshttps://github.com/apps/github-actions
March 31, 2026 07:55https://github.com/phpstan/phpstan-src/pull/5322#commits-pushed-36c7aaf
https://github.com/apps/github-actions
https://github.com/staabm
Fixhttps://github.com/phpstan/phpstan-src/pull/5322/commits/36c7aafc9ff5f29ea5c6356e8b4ca1b023109cc4
phpstan/phpstan#6934https://github.com/phpstan/phpstan/issues/6934
: nullsafe operator does not narrow type for …https://github.com/phpstan/phpstan-src/pull/5322/commits/36c7aafc9ff5f29ea5c6356e8b4ca1b023109cc4
36c7aafhttps://github.com/phpstan/phpstan-src/pull/5322/commits/36c7aafc9ff5f29ea5c6356e8b4ca1b023109cc4
https://github.com/phpstan-bot
https://github.com/claude
https://github.com/staabm
Address review: add rule test and post-chain type assertions for bug-…https://github.com/phpstan/phpstan-src/pull/5322/commits/658bce3bbefe04cc5401151eb4664a582c38cd9a
658bce3https://github.com/phpstan/phpstan-src/pull/5322/commits/658bce3bbefe04cc5401151eb4664a582c38cd9a
https://github.com/phpstan-bot
https://github.com/claude
https://github.com/staabm
Remove unnecessary #[RequiresPhp] from testBug6934https://github.com/phpstan/phpstan-src/pull/5322/commits/10db966d23ae45af271d1fc2ea2cf716ceb4d2c4
10db966https://github.com/phpstan/phpstan-src/pull/5322/commits/10db966d23ae45af271d1fc2ea2cf716ceb4d2c4
https://github.com/phpstan-bot
https://github.com/claude
https://github.com/staabm
Add back #[RequiresPhp('>= 8.0')] to testBug6934https://github.com/phpstan/phpstan-src/pull/5322/commits/9f728c1d10d4afe0477ad17a68ffac17094ea0c8
9f728c1https://github.com/phpstan/phpstan-src/pull/5322/commits/9f728c1d10d4afe0477ad17a68ffac17094ea0c8
https://github.com/VincentLanglet
https://github.com/staabm
Deduplicate fileshttps://github.com/phpstan/phpstan-src/pull/5322/commits/e82198a0c05980b030d535cc6d722da0ec399029
e82198ahttps://github.com/phpstan/phpstan-src/pull/5322/commits/e82198a0c05980b030d535cc6d722da0ec399029
https://github.com/staabm
Update bug-6934.phphttps://github.com/phpstan/phpstan-src/pull/5322/commits/03a0d6b253801bd89f2a45e682fde3921a6bf959
03a0d6bhttps://github.com/phpstan/phpstan-src/pull/5322/commits/03a0d6b253801bd89f2a45e682fde3921a6bf959
https://github.com/VincentLanglet
https://github.com/staabm
Add asserthttps://github.com/phpstan/phpstan-src/pull/5322/commits/53b1634cb58445d3a39c631bdac03a7860aae318
53b1634https://github.com/phpstan/phpstan-src/pull/5322/commits/53b1634cb58445d3a39c631bdac03a7860aae318
https://github.com/VincentLanglet
https://github.com/staabm
Add testhttps://github.com/phpstan/phpstan-src/pull/5322/commits/9f51d3929e576bfe001c8dd5519e6a09e60f8820
9f51d39https://github.com/phpstan/phpstan-src/pull/5322/commits/9f51d3929e576bfe001c8dd5519e6a09e60f8820
https://github.com/staabm
staabmhttps://github.com/staabm
force-pushedhttps://github.com/phpstan/phpstan-src/compare/8903c7865f6aca731352a1348f67859eb323df24..9f51d3929e576bfe001c8dd5519e6a09e60f8820
8903c78https://github.com/phpstan/phpstan-src/commit/8903c7865f6aca731352a1348f67859eb323df24
9f51d39https://github.com/phpstan/phpstan-src/commit/9f51d3929e576bfe001c8dd5519e6a09e60f8820
Compare https://github.com/phpstan/phpstan-src/compare/8903c7865f6aca731352a1348f67859eb323df24..9f51d3929e576bfe001c8dd5519e6a09e60f8820
March 31, 2026 05:55https://github.com/phpstan/phpstan-src/pull/5322#event-24061650055
https://github.com/staabm
staabmhttps://github.com/staabm
Mar 31, 2026https://github.com/phpstan/phpstan-src/pull/5322#issuecomment-4160205124
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/staabm
staabmhttps://github.com/staabm
Mar 31, 2026https://github.com/phpstan/phpstan-src/pull/5322#issuecomment-4160549520
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/VincentLanglet
VincentLanglethttps://github.com/VincentLanglet
Mar 31, 2026https://github.com/phpstan/phpstan-src/pull/5322#issuecomment-4160934616
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Mar 31, 2026https://github.com/phpstan/phpstan-src/pull/5322#issuecomment-4160960414
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/staabm
staabmhttps://github.com/staabm
Mar 31, 2026https://github.com/phpstan/phpstan-src/pull/5322#issuecomment-4160962782
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Mar 31, 2026https://github.com/phpstan/phpstan-src/pull/5322#issuecomment-4160974455
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/VincentLanglet
VincentLanglethttps://github.com/VincentLanglet
Apr 23, 2026https://github.com/phpstan/phpstan-src/pull/5322#event-24809823511
https://github.com/staabm
staabmhttps://github.com/staabm
April 26, 2026 06:24https://github.com/phpstan/phpstan-src/pull/5322#event-24876241471
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5322
https://github.com/staabm
staabm https://github.com/staabm
https://github.com/phpstan/phpstan-src/pull/5322/files/52788e6dbc7069b0ee8b0ad455b2b6d11e771ce2
https://github.com/VincentLanglet
VincentLanglet https://github.com/VincentLanglet
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5322
https://github.com/phpstan-bot
https://github.com/staabm
https://github.com/VincentLanglet
https://github.com/ondrejmirtes
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.