René's URL Explorer Experiment


Title: Reduce false positives about constant conditions in traits by ondrejmirtes · Pull Request #5309 · phpstan/phpstan-src · GitHub

Open Graph Title: Reduce false positives about constant conditions in traits by ondrejmirtes · Pull Request #5309 · phpstan/phpstan-src

X Title: Reduce false positives about constant conditions in traits by ondrejmirtes · Pull Request #5309 · phpstan/phpstan-src

Description: PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository. - Reduce false positives about constant conditions in traits by ondrejmirtes · Pull Request #5309 · phpstan/phpstan-src

Open Graph Description: When a rule detects a constant condition inside a trait, instead of reporting it directly, it emits the result via ConstantConditionInTraitCollector. The ConstantConditionInTraitRule then aggregate...

X Description: When a rule detects a constant condition inside a trait, instead of reporting it directly, it emits the result via ConstantConditionInTraitCollector. The ConstantConditionInTraitRule then aggregate...

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

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:4efd59e5-9ece-b120-d46d-42f72842eb08
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id88F8:2BE220:257C1E:338693:6B00C251
html-safe-nonce58e58ccf781d35d92ee2d77b64f3d3c3c9f06f9ca197e94c973969f42dd5d41f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEY4OjJCRTIyMDoyNTdDMUU6MzM4NjkzOjZCMDBDMjUxIiwidmlzaXRvcl9pZCI6Ijg4NzI2ODE4NTE0ODgwOTI3NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca1f388d1da1f886c738bea66e051cce82694bb40fcd71a8e1de45d83ef55a728
hovercard-subject-tagpull_request:3456769772
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/5309/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/9be91b53881ba257e9ec4ac27d966a5d1d730de167912a9644bf6ab9999fa055/phpstan/phpstan-src/pull/5309
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9be91b53881ba257e9ec4ac27d966a5d1d730de167912a9644bf6ab9999fa055/phpstan/phpstan-src/pull/5309
og:image:altWhen a rule detects a constant condition inside a trait, instead of reporting it directly, it emits the result via ConstantConditionInTraitCollector. The ConstantConditionInTraitRule then aggregate...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameondrejmirtes
hostnamegithub.com
expected-hostnamegithub.com
None93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415
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
release1fee81a280ea86312b69448e261b418189bfd5b5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/phpstan/phpstan-src/pull/5309#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5309
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%2F5309
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/5309
Reloadhttps://github.com/phpstan/phpstan-src/pull/5309
Reloadhttps://github.com/phpstan/phpstan-src/pull/5309
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
2.2.xhttps://github.com/phpstan/phpstan-src/tree/2.2.x
in-traitshttps://github.com/phpstan/phpstan-src/tree/in-traits
Conversationhttps://github.com/phpstan/phpstan-src/pull/5309
Commits10 (10)https://github.com/phpstan/phpstan-src/pull/5309/commits
Checkshttps://github.com/phpstan/phpstan-src/pull/5309/checks
Files changedhttps://github.com/phpstan/phpstan-src/pull/5309/files
Reduce false positives about constant conditions in traitshttps://github.com/phpstan/phpstan-src/pull/5309#top
ondrejmirteshttps://github.com/ondrejmirtes
2.2.xhttps://github.com/phpstan/phpstan-src/tree/2.2.x
in-traitshttps://github.com/phpstan/phpstan-src/tree/in-traits
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Mar 27, 2026https://github.com/phpstan/phpstan-src/pull/5309#issue-4152346768
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5309
phpstan/phpstan#13023https://github.com/phpstan/phpstan/issues/13023
phpstan/phpstan#7599https://github.com/phpstan/phpstan/issues/7599
phpstan/phpstan#13023https://github.com/phpstan/phpstan/issues/13023
phpstan/phpstan#13474https://github.com/phpstan/phpstan/issues/13474
phpstan/phpstan#13687https://github.com/phpstan/phpstan/issues/13687
phpstan/phpstan#12798https://github.com/phpstan/phpstan/issues/12798
phpstan/phpstan#11949https://github.com/phpstan/phpstan/issues/11949
phpstan/phpstan#12267https://github.com/phpstan/phpstan/issues/12267
phpstan/phpstan#9515https://github.com/phpstan/phpstan/issues/9515
phpstan/phpstan#4570https://github.com/phpstan/phpstan/issues/4570
phpstan/phpstan#4121https://github.com/phpstan/phpstan/issues/4121
phpstan/phpstan#8060https://github.com/phpstan/phpstan/issues/8060
phpstan/phpstan#10353https://github.com/phpstan/phpstan/issues/10353
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5309
ondrejmirteshttps://github.com/ondrejmirtes
March 27, 2026 12:28https://github.com/phpstan/phpstan-src/pull/5309#commits-pushed-d4015eb
https://github.com/ondrejmirtes
Plumbing for reducing false positives about constant conditions in tr…https://github.com/phpstan/phpstan-src/pull/5309/commits/d4015ebbd114afefed634b7bfd017a525157cfdd
d4015ebhttps://github.com/phpstan/phpstan-src/pull/5309/commits/d4015ebbd114afefed634b7bfd017a525157cfdd
https://github.com/ondrejmirtes
Use ConstantConditionInTraitHelper in StrictComparisonOfDifferentType…https://github.com/phpstan/phpstan-src/pull/5309/commits/7e4ade3e76a48ae6060b33f2b788432e225f8982
7e4ade3https://github.com/phpstan/phpstan-src/pull/5309/commits/7e4ade3e76a48ae6060b33f2b788432e225f8982
https://github.com/ondrejmirtes
Added ConstantConditionInTraitHelper to remaining ruleshttps://github.com/phpstan/phpstan-src/pull/5309/commits/6b3f2d1097c3be2e39804ae8dcf17631f50aa49b
6b3f2d1https://github.com/phpstan/phpstan-src/pull/5309/commits/6b3f2d1097c3be2e39804ae8dcf17631f50aa49b
https://github.com/phpstan-bot
phpstan-bothttps://github.com/phpstan-bot
Mar 27, 2026https://github.com/phpstan/phpstan-src/pull/5309#issuecomment-4142366554
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5309
ondrejmirteshttps://github.com/ondrejmirtes
March 27, 2026 15:30https://github.com/phpstan/phpstan-src/pull/5309#commits-pushed-4a9202b
https://github.com/ondrejmirtes
Regression testshttps://github.com/phpstan/phpstan-src/pull/5309/commits/4a9202b962863b78ac3735298a2a7da6bb38d7dd
4a9202bhttps://github.com/phpstan/phpstan-src/pull/5309/commits/4a9202b962863b78ac3735298a2a7da6bb38d7dd
phpstan/phpstan#13023https://github.com/phpstan/phpstan/issues/13023
phpstan/phpstan#7599https://github.com/phpstan/phpstan/issues/7599
phpstan/phpstan#13023https://github.com/phpstan/phpstan/issues/13023
phpstan/phpstan#13474https://github.com/phpstan/phpstan/issues/13474
phpstan/phpstan#13687https://github.com/phpstan/phpstan/issues/13687
phpstan/phpstan#12798https://github.com/phpstan/phpstan/issues/12798
phpstan/phpstan#11949https://github.com/phpstan/phpstan/issues/11949
phpstan/phpstan#12267https://github.com/phpstan/phpstan/issues/12267
phpstan/phpstan#9515https://github.com/phpstan/phpstan/issues/9515
phpstan/phpstan#4570https://github.com/phpstan/phpstan/issues/4570
phpstan/phpstan#4121https://github.com/phpstan/phpstan/issues/4121
phpstan/phpstan#8060https://github.com/phpstan/phpstan/issues/8060
https://github.com/ondrejmirtes
ImpossibleInstanceOfRule - add PossiblyImpureTipHelper and ConstantCo…https://github.com/phpstan/phpstan-src/pull/5309/commits/43c2d272a0e19bf403c367fd111f339adc55792d
43c2d27https://github.com/phpstan/phpstan-src/pull/5309/commits/43c2d272a0e19bf403c367fd111f339adc55792d
https://github.com/ondrejmirtes
Regression testhttps://github.com/phpstan/phpstan-src/pull/5309/commits/8175b6e54ab506b5f2126127faa534bbed5a425e
8175b6ehttps://github.com/phpstan/phpstan-src/pull/5309/commits/8175b6e54ab506b5f2126127faa534bbed5a425e
phpstan/phpstan#10353https://github.com/phpstan/phpstan/issues/10353
https://github.com/ondrejmirtes
Report errors in traits with the same message just oncehttps://github.com/phpstan/phpstan-src/pull/5309/commits/686ab8ab6bebcf4c1ad403488b8264bcecc46e27
686ab8ahttps://github.com/phpstan/phpstan-src/pull/5309/commits/686ab8ab6bebcf4c1ad403488b8264bcecc46e27
https://github.com/ondrejmirtes
Fix linthttps://github.com/phpstan/phpstan-src/pull/5309/commits/7b668ec776381dcbee70d3a83fabe61a90844038
7b668echttps://github.com/phpstan/phpstan-src/pull/5309/commits/7b668ec776381dcbee70d3a83fabe61a90844038
https://github.com/ondrejmirtes
Fix testshttps://github.com/phpstan/phpstan-src/pull/5309/commits/43aed2c2c625b86678c0ac6be3c4edf3ca2b5798
43aed2chttps://github.com/phpstan/phpstan-src/pull/5309/commits/43aed2c2c625b86678c0ac6be3c4edf3ca2b5798
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
force-pushedhttps://github.com/phpstan/phpstan-src/compare/3ebe522bd55402b2763c753c5675ed808fe5921e..43aed2c2c625b86678c0ac6be3c4edf3ca2b5798
3ebe522https://github.com/phpstan/phpstan-src/commit/3ebe522bd55402b2763c753c5675ed808fe5921e
43aed2chttps://github.com/phpstan/phpstan-src/commit/43aed2c2c625b86678c0ac6be3c4edf3ca2b5798
Compare https://github.com/phpstan/phpstan-src/compare/3ebe522bd55402b2763c753c5675ed808fe5921e..43aed2c2c625b86678c0ac6be3c4edf3ca2b5798
March 27, 2026 15:28https://github.com/phpstan/phpstan-src/pull/5309#event-23976382764
https://github.com/ondrejmirtes
Remove dead @phpstan-ignore in traitshttps://github.com/phpstan/phpstan-src/pull/5309/commits/b47a204e3add46a834f8b1a303b06548d33fed5e
b47a204https://github.com/phpstan/phpstan-src/pull/5309/commits/b47a204e3add46a834f8b1a303b06548d33fed5e
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
23c5fc4https://github.com/phpstan/phpstan-src/commit/23c5fc412f4214ee57d13baa526eaf822963de86
Mar 27, 2026https://github.com/phpstan/phpstan-src/pull/5309#event-23976669679
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5309
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
March 27, 2026 15:37https://github.com/phpstan/phpstan-src/pull/5309#event-23976670679
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Apr 1, 2026 https://github.com/phpstan/phpstan-src/pull/5309#ref-issue-4184677297
Warns too much about non-nullable class-property phpstan/phpstan#14416 https://github.com/phpstan/phpstan/issues/14416
https://github.com/staabm
staabmhttps://github.com/staabm
May 5, 2026 https://github.com/phpstan/phpstan-src/pull/5309#ref-issue-2044314417
False positive: Dead catch phpstan/phpstan#10315 https://github.com/phpstan/phpstan/issues/10315
https://github.com/mvorisek
mvorisekhttps://github.com/mvorisek
May 28, 2026 https://github.com/phpstan/phpstan-src/pull/5309#ref-issue-4540127666
Some @phpstan-ignore are ignored in traits since v2.2.0 phpstan/phpstan#14718 https://github.com/phpstan/phpstan/issues/14718
https://github.com/mabar
mabarhttps://github.com/mabar
Jul 21, 2026 https://github.com/phpstan/phpstan-src/pull/5309#ref-issue-4826615500
if.alwaysTrue when found in traits isn't reported correctly through context of a user class phpstan/phpstan#14932 https://github.com/phpstan/phpstan/issues/14932
https://github.com/SanderMuller
SanderMullerhttps://github.com/SanderMuller
Aug 7, 2026 https://github.com/phpstan/phpstan-src/pull/5309#ref-pullrequest-4976298814
Avoid warning about non-nullable class-property in traits. #6100 https://github.com/phpstan/phpstan-src/pull/6100
https://github.com/ondrejmirtes
ondrejmirteshttps://github.com/ondrejmirtes
Aug 26, 2026 https://github.com/phpstan/phpstan-src/pull/5309#ref-pullrequest-5258780787
Account for deduplicated trait errors per using-class context #6280 https://github.com/phpstan/phpstan-src/pull/6280
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%2F5309
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5309
If trait has an abstract function that return a union type, the conditions in this trait are considered to always be true or false https://github.com/phpstan/phpstan/issues/9515
Traits and spurious errors https://github.com/phpstan/phpstan/issues/8060
[Enum/Trait] Call to function method_exists() will always evaluate to false https://github.com/phpstan/phpstan/issues/7599
Traits are evaluated based on static knowledge in assembled classes https://github.com/phpstan/phpstan/issues/4570
Self::class in Traits https://github.com/phpstan/phpstan/issues/4121
Instanceof on $this in traits should not report always false https://github.com/phpstan/phpstan/issues/10353
Specific conclusion about reused Trait makes no sense (const) https://github.com/phpstan/phpstan/issues/11949
Specific conclusion about reused Trait makes no sense (generic) https://github.com/phpstan/phpstan/issues/12267
Checking is_subclass_of in enum trait results in always{False,True} errors https://github.com/phpstan/phpstan/issues/12798
function.alreadyNarrowedType and function.impossibleType after updates to 2.1.15 https://github.com/phpstan/phpstan/issues/13023
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/5309
https://github.com/ondrejmirtes
https://github.com/phpstan-bot
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.