René's URL Explorer Experiment


Title: POC: Use SimultaneousTypeTraverser in RuleLevelHelper::transformAcceptedType by VincentLanglet · Pull Request #4210 · phpstan/phpstan-src · GitHub

Open Graph Title: POC: Use SimultaneousTypeTraverser in RuleLevelHelper::transformAcceptedType by VincentLanglet · Pull Request #4210 · phpstan/phpstan-src

X Title: POC: Use SimultaneousTypeTraverser in RuleLevelHelper::transformAcceptedType by VincentLanglet · Pull Request #4210 · phpstan/phpstan-src

Description: Static analysis is failing because TypeTraverserInstanceofVisitor doesn't support SimultaneousTypeTraverser (not sure it should). The only current test failing is 16: Function ReturnListNullables\doFoo() should return array|null but returns list. but I feel like we could reproduce more errors because... UnionType/Intersection types doesn't work well with the SimultaneousTypeTraverser because when it's called with A&B&C and A we're not traversing because second type is not an Intersection when it's called with A&B&C and A&C we're not traversing because types count are different The main issue would be, when traversing A&B&C and A&C, to match types in order to traverse (A, A) traverse (B, Never) traverse (C, C)

Open Graph Description: Static analysis is failing because TypeTraverserInstanceofVisitor doesn't support SimultaneousTypeTraverser (not sure it should). The only current test failing is 16: Function ReturnListNullabl...

X Description: Static analysis is failing because TypeTraverserInstanceofVisitor doesn't support SimultaneousTypeTraverser (not sure it should). The only current test failing is 16: Function ReturnListNul...

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

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5aad0662-6cc9-d830-e90e-50b7756091bd
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA178:134361:37757D:4ABFAA:6B00C615
html-safe-nonce6bd67faa898fbb22ef9d002ed3a33393df548b01c0f4411bd13c21216d5e30f3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTc4OjEzNDM2MTozNzc1N0Q6NEFCRkFBOjZCMDBDNjE1IiwidmlzaXRvcl9pZCI6IjE0OTEwODg2MjExOTU4MDYyMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac75e3f57814135b16e8a50e976242564e68cb5bcddfccb501f5d8a57f0893e3a2
hovercard-subject-tagpull_request:2723791882
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/phpstan/phpstan-src/pull/4210/files
twitter:imagehttps://avatars.githubusercontent.com/u/9052536?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/9052536?s=400&v=4
og:image:altStatic analysis is failing because TypeTraverserInstanceofVisitor doesn't support SimultaneousTypeTraverser (not sure it should). The only current test failing is 16: Function ReturnListNullabl...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None98dc00e171c204462a6f367482a0f8c3c6b5dbca99cd7390e82d2df49ce096e4
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseef013399cf0a3c324bea644a685d7c1e0f06b5b7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/phpstan/phpstan-src/pull/4210/changes#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F4210%2Ffiles
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%2F4210%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=phpstan%2Fphpstan-src
Reloadhttps://github.com/phpstan/phpstan-src/pull/4210/changes
Reloadhttps://github.com/phpstan/phpstan-src/pull/4210/changes
Reloadhttps://github.com/phpstan/phpstan-src/pull/4210/changes
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
Sign up for GitHub https://github.com/signup?return_to=%2Fphpstan%2Fphpstan-src%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fphpstan%2Fphpstan-src%2Fissues%2Fnew%2Fchoose
VincentLanglethttps://github.com/VincentLanglet
phpstan:2.1.xhttps://github.com/phpstan/phpstan-src/tree/2.1.x
VincentLanglet:poc/12008https://github.com/VincentLanglet/phpstan-src/tree/poc/12008
Conversation 13 https://github.com/phpstan/phpstan-src/pull/4210
Commits 3 https://github.com/phpstan/phpstan-src/pull/4210/commits
Checks 643 https://github.com/phpstan/phpstan-src/pull/4210/checks
Files changed https://github.com/phpstan/phpstan-src/pull/4210/files
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4210/changes
POC: Use SimultaneousTypeTraverser in RuleLevelHelper::transformAcceptedType https://github.com/phpstan/phpstan-src/pull/4210/changes#top
Show all changes 3 commits https://github.com/phpstan/phpstan-src/pull/4210/files
6650b2f POC VincentLanglet Aug 6, 2025 https://github.com/phpstan/phpstan-src/pull/4210/commits/6650b2fe118e3140161fb9d7ea20a6ba42319a5e
89de587 Try to improve traverseSimultaneously VincentLanglet Oct 18, 2025 https://github.com/phpstan/phpstan-src/pull/4210/commits/89de5871aaeaa2a4611b1457496b441cfc917b74
f0aaef2 Fix phpstan error VincentLanglet Oct 18, 2025 https://github.com/phpstan/phpstan-src/pull/4210/commits/f0aaef227f35f016d33af757a83ffeafe50c9476
Clear filters https://github.com/phpstan/phpstan-src/pull/4210/files
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4210/changes
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4210/changes
TypeTraverserInstanceofVisitor.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-df2793f36f3a4ae24d1d4048644ffe96676101acb44874814bf526cc44931665
RuleLevelHelper.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
IntersectionType.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-e025970c864bf5fd470d54828f4425498296980c0f34d04d5e9cca7cb333c0cf
ObjectType.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3887df0457831e1b8fd86144e1d07a7737643885122108493625853be7f4a198
ObjectWithoutClassType.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3caf073525160507fe40bf45626497966f4a541d5f2b88f2d10d94f534e0c6c8
StaticType.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-d6321d73e3cd8fad2d06fea808cf49ef9151914aedf0c7696b7ec46bd99945fd
ClosureReturnTypeRuleTest.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-7d12e1ece4984222523e149748d24be67e559b09eff767af8ff02d7f42605bd5
bug-12008.php https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-172a1bc151e7b40c1909eda05e3396cc595e10d4ff1e1f39788c064201db3f18
src/Parser/TypeTraverserInstanceofVisitor.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-df2793f36f3a4ae24d1d4048644ffe96676101acb44874814bf526cc44931665
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/src/Parser/TypeTraverserInstanceofVisitor.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-df2793f36f3a4ae24d1d4048644ffe96676101acb44874814bf526cc44931665
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-df2793f36f3a4ae24d1d4048644ffe96676101acb44874814bf526cc44931665
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-df2793f36f3a4ae24d1d4048644ffe96676101acb44874814bf526cc44931665
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-df2793f36f3a4ae24d1d4048644ffe96676101acb44874814bf526cc44931665
src/Rules/RuleLevelHelper.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/src/Rules/RuleLevelHelper.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035b
src/Type/IntersectionType.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-e025970c864bf5fd470d54828f4425498296980c0f34d04d5e9cca7cb333c0cf
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/src/Type/IntersectionType.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-e025970c864bf5fd470d54828f4425498296980c0f34d04d5e9cca7cb333c0cf
https://github.com/phpstan/phpstan-src/actions/runs/22021930993/job/63632512175?pr=4210
https://github.com/phpstan/phpstan-src/actions/runs/22021930993/job/63632512184?pr=4210
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-e025970c864bf5fd470d54828f4425498296980c0f34d04d5e9cca7cb333c0cf
src/Type/ObjectType.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3887df0457831e1b8fd86144e1d07a7737643885122108493625853be7f4a198
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/src/Type/ObjectType.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3887df0457831e1b8fd86144e1d07a7737643885122108493625853be7f4a198
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3887df0457831e1b8fd86144e1d07a7737643885122108493625853be7f4a198
src/Type/ObjectWithoutClassType.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3caf073525160507fe40bf45626497966f4a541d5f2b88f2d10d94f534e0c6c8
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/src/Type/ObjectWithoutClassType.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3caf073525160507fe40bf45626497966f4a541d5f2b88f2d10d94f534e0c6c8
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-3caf073525160507fe40bf45626497966f4a541d5f2b88f2d10d94f534e0c6c8
src/Type/StaticType.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-d6321d73e3cd8fad2d06fea808cf49ef9151914aedf0c7696b7ec46bd99945fd
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/src/Type/StaticType.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-d6321d73e3cd8fad2d06fea808cf49ef9151914aedf0c7696b7ec46bd99945fd
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-d6321d73e3cd8fad2d06fea808cf49ef9151914aedf0c7696b7ec46bd99945fd
tests/PHPStan/Rules/Functions/ClosureReturnTypeRuleTest.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-7d12e1ece4984222523e149748d24be67e559b09eff767af8ff02d7f42605bd5
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/tests/PHPStan/Rules/Functions/ClosureReturnTypeRuleTest.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-7d12e1ece4984222523e149748d24be67e559b09eff767af8ff02d7f42605bd5
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-7d12e1ece4984222523e149748d24be67e559b09eff767af8ff02d7f42605bd5
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-7d12e1ece4984222523e149748d24be67e559b09eff767af8ff02d7f42605bd5
https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-7d12e1ece4984222523e149748d24be67e559b09eff767af8ff02d7f42605bd5
tests/PHPStan/Rules/Functions/data/bug-12008.phphttps://github.com/phpstan/phpstan-src/pull/4210/changes#diff-172a1bc151e7b40c1909eda05e3396cc595e10d4ff1e1f39788c064201db3f18
View file https://github.com/VincentLanglet/phpstan-src/blob/f0aaef227f35f016d33af757a83ffeafe50c9476/tests/PHPStan/Rules/Functions/data/bug-12008.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/4210/{{ revealButtonHref }}
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4210/changes
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.