René's URL Explorer Experiment


Title: Skip conditional expression guard when guard type is a subtype of the other branch's value by phpstan-bot · Pull Request #5848 · phpstan/phpstan-src · GitHub

Open Graph Title: Skip conditional expression guard when guard type is a subtype of the other branch's value by phpstan-bot · Pull Request #5848 · phpstan/phpstan-src

X Title: Skip conditional expression guard when guard type is a subtype of the other branch's value by phpstan-bot · Pull Request #5848 · phpstan/phpstan-src

Description: PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository. - Skip conditional expression guard when guard type is a subtype of the other branch's value by phpstan-bot · Pull Request #5848 · phpstan/phpstan-src

Open Graph Description: Summary When two if statements reuse the same left-hand condition $enum !== Case::X (a 2-case enum narrowed with !==), and the first if additionally narrows an object property via && $obj-&...

X Description: Summary When two if statements reuse the same left-hand condition $enum !== Case::X (a 2-case enum narrowed with !==), and the first if additionally narrows an object property via &&amp...

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

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:1f785587-e00b-f9b5-029d-cb15ac64366b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA20A:1F7384:7F8CA2:AAF820:6B00DD04
html-safe-nonce28d1733bd61a530b03c84c372c2d3db7463e21d75a48778520c9d3877e2e5977
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjBBOjFGNzM4NDo3RjhDQTI6QUFGODIwOjZCMDBERDA0IiwidmlzaXRvcl9pZCI6IjE1NjIzMTgwMTY2OTAwNTIzNTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7db3235c108a8fab7e689a7e7e840ac882b3355cc67971b8bf2dda23fb2b85d5
hovercard-subject-tagpull_request:3846078257
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/5848/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/e980aec1e126f9db269178265b80cd32047797b7ea2339a949732d4fd14402e2/phpstan/phpstan-src/pull/5848
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e980aec1e126f9db269178265b80cd32047797b7ea2339a949732d4fd14402e2/phpstan/phpstan-src/pull/5848
og:image:altSummary When two if statements reuse the same left-hand condition $enum !== Case::X (a 2-case enum narrowed with !==), and the first if additionally narrows an object property via && $obj-&...
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/5848#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5848
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%2F5848
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/5848
Reloadhttps://github.com/phpstan/phpstan-src/pull/5848
Reloadhttps://github.com/phpstan/phpstan-src/pull/5848
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
ondrejmirteshttps://github.com/ondrejmirtes
phpstan:2.2.xhttps://github.com/phpstan/phpstan-src/tree/2.2.x
phpstan-bot:create-pull-request/patch-pmkcr7dhttps://github.com/phpstan-bot/phpstan-src/tree/create-pull-request/patch-pmkcr7d
Conversationhttps://github.com/phpstan/phpstan-src/pull/5848
Commits2 (2)https://github.com/phpstan/phpstan-src/pull/5848/commits
Checkshttps://github.com/phpstan/phpstan-src/pull/5848/checks
Files changedhttps://github.com/phpstan/phpstan-src/pull/5848/files
Skip conditional expression guard when guard type is a subtype of the other branch's valuehttps://github.com/phpstan/phpstan-src/pull/5848#top
ondrejmirteshttps://github.com/ondrejmirtes
phpstan:2.2.xhttps://github.com/phpstan/phpstan-src/tree/2.2.x
phpstan-bot:create-pull-request/patch-pmkcr7dhttps://github.com/phpstan-bot/phpstan-src/tree/create-pull-request/patch-pmkcr7d
https://github.com/phpstan-bot
phpstan-bothttps://github.com/phpstan-bot
Jun 11, 2026https://github.com/phpstan/phpstan-src/pull/5848#issue-4639120273
phpstan/phpstan#14807https://github.com/phpstan/phpstan/issues/14807
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5848
https://github.com/phpstan-bot
Skip conditional expression guard when guard type is a subtype of the…https://github.com/phpstan/phpstan-src/pull/5848/commits/5ab52209951b865041a6066449943b2ce4d072e5
5ab5220https://github.com/phpstan/phpstan-src/pull/5848/commits/5ab52209951b865041a6066449943b2ce4d072e5
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Jun 11, 2026 https://github.com/phpstan/phpstan-src/pull/5848#pullrequestreview-4475522130
View reviewed changes https://github.com/phpstan/phpstan-src/pull/5848/files/5ab52209951b865041a6066449943b2ce4d072e5
tests/PHPStan/Analyser/nsrt/bug-14807.phphttps://github.com/phpstan/phpstan-src/pull/5848/files/5ab52209951b865041a6066449943b2ce4d072e5#diff-ec28d97823145281239e9fbf9794feac888f6f1354a8cc9b35eb1d5b2e03a466
ondrejmirteshttps://github.com/ondrejmirtes
Jun 11, 2026https://github.com/phpstan/phpstan-src/pull/5848#discussion_r3394832914
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5848
phpstan-bothttps://github.com/phpstan-bot
Jun 11, 2026https://github.com/phpstan/phpstan-src/pull/5848#discussion_r3394860725
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5848
https://github.com/phpstan-bot
https://github.com/claude
Add '// lint >= 8.1' directive to bug-14807 test data fileshttps://github.com/phpstan/phpstan-src/pull/5848/commits/6a8da51c6216d4a946ec968365be6ee6cec9ec05
6a8da51https://github.com/phpstan/phpstan-src/pull/5848/commits/6a8da51c6216d4a946ec968365be6ee6cec9ec05
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
June 11, 2026 09:42https://github.com/phpstan/phpstan-src/pull/5848#event-26618348538
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Jun 11, 2026 https://github.com/phpstan/phpstan-src/pull/5848#pullrequestreview-4475556164
View reviewed changes https://github.com/phpstan/phpstan-src/pull/5848/files/6a8da51c6216d4a946ec968365be6ee6cec9ec05
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
ad34ca7https://github.com/phpstan/phpstan-src/commit/ad34ca73954eed22f1721a910824d9b9e454993b
Jun 11, 2026https://github.com/phpstan/phpstan-src/pull/5848#event-26618357275
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5848
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
June 11, 2026 09:43https://github.com/phpstan/phpstan-src/pull/5848#event-26618358092
https://github.com/phpstan-bot
phpstan-bothttps://github.com/phpstan-bot
Jun 14, 2026 https://github.com/phpstan/phpstan-src/pull/5848#ref-pullrequest-4660304902
Record conditional definedness guards when merging if branches with a side-effect-free condition #5875 https://github.com/phpstan/phpstan-src/pull/5875
https://github.com/momala454
momala454https://github.com/momala454
Jul 3, 2026 https://github.com/phpstan/phpstan-src/pull/5848#ref-issue-4801980335
Incomplete fix for #14807: conditional narrowing still leaks when an intermediate if narrows another value, and 2.2.3 added a new in_array/function.alreadyNarrowedType symptom phpstan/phpstan#14908 https://github.com/phpstan/phpstan/issues/14908
https://github.com/phpstan-bot
phpstan-bothttps://github.com/phpstan-bot
Jul 3, 2026 https://github.com/phpstan/phpstan-src/pull/5848#ref-pullrequest-4802319911
Skip boolean conditional expression holders when the antecedent side is an unsplittable compound boolean #5983 https://github.com/phpstan/phpstan-src/pull/5983
Performance regression: reverse isSuperTypeOf() guard check in MutatingScope (phpstan-src#5848) costs 13–21% on condition-heavy benches phpstan/phpstan#14920 https://github.com/phpstan/phpstan/issues/14920
Performance regression: switch-heavy array-shape code ~30% slower since the type "reasons" commits (bench bug-7581.php) phpstan/phpstan#14918 https://github.com/phpstan/phpstan/issues/14918
Performance regression: deep !== chains ~30pp slower since TypeSpecifier→ExprHandler dispatch refactor (bench bug-14207-and.php, and-chain-truthy-blowup.php) phpstan/phpstan#14919 https://github.com/phpstan/phpstan/issues/14919
Performance regression: keeping subtype-absorbed conditional targets (phpstan-src#5876) adds ~15% on constant-array loop code (bench bug-10538.php) phpstan/phpstan#14921 https://github.com/phpstan/phpstan/issues/14921
https://github.com/phpstan-bot
phpstan-bothttps://github.com/phpstan-bot
Jul 4, 2026 https://github.com/phpstan/phpstan-src/pull/5848#ref-pullrequest-4810218448
Cache per-guard isSuperTypeOf() results in createConditionalExpressions() instead of recomputing them per target #6001 https://github.com/phpstan/phpstan-src/pull/6001
ondrejmirteshttps://github.com/ondrejmirtes
Jul 4, 2026 https://github.com/phpstan/phpstan-src/pull/5848#ref-commit-ef3fe97
https://github.com/ondrejmirtes
Cache per-guard isSuperTypeOf() results in `createConditionalExpres…https://github.com/phpstan/phpstan-src/commit/ef3fe9765aab1d1b1d092f21b30338f2b8ccebe0
ef3fe97https://github.com/phpstan/phpstan-src/commit/ef3fe9765aab1d1b1d092f21b30338f2b8ccebe0
#5848https://github.com/phpstan/phpstan-src/pull/5848
#5848https://github.com/phpstan/phpstan-src/pull/5848
#5876https://github.com/phpstan/phpstan-src/pull/5876
ondrejmirteshttps://github.com/ondrejmirtes
Jul 4, 2026 https://github.com/phpstan/phpstan-src/pull/5848#ref-commit-6807620
https://github.com/ondrejmirtes
Skip constant-array guards when creating conditional expressions for …https://github.com/phpstan/phpstan-src/commit/68076207e8ec1fba7cde37b4fe22e39fd75abbdd
6807620https://github.com/phpstan/phpstan-src/commit/68076207e8ec1fba7cde37b4fe22e39fd75abbdd
#5876https://github.com/phpstan/phpstan-src/pull/5876
#5848https://github.com/phpstan/phpstan-src/pull/5848
#5876https://github.com/phpstan/phpstan-src/pull/5876
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Nov 6, 2026 https://github.com/phpstan/phpstan-src/pull/5848#ref-pullrequest-6249720312
Decide sealed array shapes with disjoint required keys before comparing values #6986 https://github.com/phpstan/phpstan-src/pull/6986
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%2F5848
https://github.com/ondrejmirtes
ondrejmirtes https://github.com/ondrejmirtes
https://github.com/phpstan/phpstan-src/pull/5848/files/6a8da51c6216d4a946ec968365be6ee6cec9ec05
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5848
Object property narrowing leaks out of a previous if when a 2-case enum is narrowed with !== https://github.com/phpstan/phpstan/issues/14807
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5848
https://github.com/phpstan-bot
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.