| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_pull_requests_fragments |
| route-action | pull_request_layout |
| fetch-nonce | v2:4efd59e5-9ece-b120-d46d-42f72842eb08 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 88F8:2BE220:257C1E:338693:6B00C251 |
| html-safe-nonce | 58e58ccf781d35d92ee2d77b64f3d3c3c9f06f9ca197e94c973969f42dd5d41f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEY4OjJCRTIyMDoyNTdDMUU6MzM4NjkzOjZCMDBDMjUxIiwidmlzaXRvcl9pZCI6Ijg4NzI2ODE4NTE0ODgwOTI3NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a1f388d1da1f886c738bea66e051cce82694bb40fcd71a8e1de45d83ef55a728 |
| hovercard-subject-tag | pull_request:3456769772 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/pull_requests_fragments/pull_request_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/phpstan/phpstan-src/5309/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/9be91b53881ba257e9ec4ac27d966a5d1d730de167912a9644bf6ab9999fa055/phpstan/phpstan-src/pull/5309 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9be91b53881ba257e9ec4ac27d966a5d1d730de167912a9644bf6ab9999fa055/phpstan/phpstan-src/pull/5309 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ondrejmirtes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415 |
| turbo-cache-control | no-cache |
| go-import | github.com/phpstan/phpstan-src git https://github.com/phpstan/phpstan-src.git |
| octolytics-dimension-user_id | 16435710 |
| octolytics-dimension-user_login | phpstan |
| octolytics-dimension-repository_id | 219334214 |
| octolytics-dimension-repository_nwo | phpstan/phpstan-src |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 219334214 |
| octolytics-dimension-repository_network_root_nwo | phpstan/phpstan-src |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1fee81a280ea86312b69448e261b418189bfd5b5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | pull-requests |
| Skip to content | https://github.com/phpstan/phpstan-src/pull/5309#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5309 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5309 |
| Sign up | https://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 |
| Reload | https://github.com/phpstan/phpstan-src/pull/5309 |
| Reload | https://github.com/phpstan/phpstan-src/pull/5309 |
| Reload | https://github.com/phpstan/phpstan-src/pull/5309 |
| phpstan | https://github.com/phpstan |
| phpstan-src | https://github.com/phpstan/phpstan-src |
| Code | https://github.com/phpstan/phpstan-src |
| Pull requests186 (186) | https://github.com/phpstan/phpstan-src/pulls |
| Actions | https://github.com/phpstan/phpstan-src/actions |
| Security and quality | https://github.com/phpstan/phpstan-src/security |
| Insights | https://github.com/phpstan/phpstan-src/insights |
| https://github.com/phpstan/phpstan-src |
| ondrejmirtes | https://github.com/ondrejmirtes |
| 2.2.x | https://github.com/phpstan/phpstan-src/tree/2.2.x |
| in-traits | https://github.com/phpstan/phpstan-src/tree/in-traits |
| Conversation | https://github.com/phpstan/phpstan-src/pull/5309 |
| Commits10 (10) | https://github.com/phpstan/phpstan-src/pull/5309/commits |
| Checks | https://github.com/phpstan/phpstan-src/pull/5309/checks |
| Files changed | https://github.com/phpstan/phpstan-src/pull/5309/files |
| Reduce false positives about constant conditions in traits | https://github.com/phpstan/phpstan-src/pull/5309#top |
| ondrejmirtes | https://github.com/ondrejmirtes |
| 2.2.x | https://github.com/phpstan/phpstan-src/tree/2.2.x |
| in-traits | https://github.com/phpstan/phpstan-src/tree/in-traits |
|
| https://github.com/ondrejmirtes |
| ondrejmirtes | https://github.com/ondrejmirtes |
| Mar 27, 2026 | https://github.com/phpstan/phpstan-src/pull/5309#issue-4152346768 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/5309 |
| phpstan/phpstan#13023 | https://github.com/phpstan/phpstan/issues/13023 |
| phpstan/phpstan#7599 | https://github.com/phpstan/phpstan/issues/7599 |
| phpstan/phpstan#13023 | https://github.com/phpstan/phpstan/issues/13023 |
| phpstan/phpstan#13474 | https://github.com/phpstan/phpstan/issues/13474 |
| phpstan/phpstan#13687 | https://github.com/phpstan/phpstan/issues/13687 |
| phpstan/phpstan#12798 | https://github.com/phpstan/phpstan/issues/12798 |
| phpstan/phpstan#11949 | https://github.com/phpstan/phpstan/issues/11949 |
| phpstan/phpstan#12267 | https://github.com/phpstan/phpstan/issues/12267 |
| phpstan/phpstan#9515 | https://github.com/phpstan/phpstan/issues/9515 |
| phpstan/phpstan#4570 | https://github.com/phpstan/phpstan/issues/4570 |
| phpstan/phpstan#4121 | https://github.com/phpstan/phpstan/issues/4121 |
| phpstan/phpstan#8060 | https://github.com/phpstan/phpstan/issues/8060 |
| phpstan/phpstan#10353 | https://github.com/phpstan/phpstan/issues/10353 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/5309 |
| ondrejmirtes | https://github.com/ondrejmirtes |
| March 27, 2026 12:28 | https://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 |
| d4015eb | https://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 |
| 7e4ade3 | https://github.com/phpstan/phpstan-src/pull/5309/commits/7e4ade3e76a48ae6060b33f2b788432e225f8982 |
|
| https://github.com/ondrejmirtes |
| Added ConstantConditionInTraitHelper to remaining rules | https://github.com/phpstan/phpstan-src/pull/5309/commits/6b3f2d1097c3be2e39804ae8dcf17631f50aa49b |
| 6b3f2d1 | https://github.com/phpstan/phpstan-src/pull/5309/commits/6b3f2d1097c3be2e39804ae8dcf17631f50aa49b |
| https://github.com/phpstan-bot |
| phpstan-bot | https://github.com/phpstan-bot |
| Mar 27, 2026 | https://github.com/phpstan/phpstan-src/pull/5309#issuecomment-4142366554 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/5309 |
| ondrejmirtes | https://github.com/ondrejmirtes |
| March 27, 2026 15:30 | https://github.com/phpstan/phpstan-src/pull/5309#commits-pushed-4a9202b |
|
| https://github.com/ondrejmirtes |
| Regression tests | https://github.com/phpstan/phpstan-src/pull/5309/commits/4a9202b962863b78ac3735298a2a7da6bb38d7dd |
| 4a9202b | https://github.com/phpstan/phpstan-src/pull/5309/commits/4a9202b962863b78ac3735298a2a7da6bb38d7dd |
| phpstan/phpstan#13023 | https://github.com/phpstan/phpstan/issues/13023 |
| phpstan/phpstan#7599 | https://github.com/phpstan/phpstan/issues/7599 |
| phpstan/phpstan#13023 | https://github.com/phpstan/phpstan/issues/13023 |
| phpstan/phpstan#13474 | https://github.com/phpstan/phpstan/issues/13474 |
| phpstan/phpstan#13687 | https://github.com/phpstan/phpstan/issues/13687 |
| phpstan/phpstan#12798 | https://github.com/phpstan/phpstan/issues/12798 |
| phpstan/phpstan#11949 | https://github.com/phpstan/phpstan/issues/11949 |
| phpstan/phpstan#12267 | https://github.com/phpstan/phpstan/issues/12267 |
| phpstan/phpstan#9515 | https://github.com/phpstan/phpstan/issues/9515 |
| phpstan/phpstan#4570 | https://github.com/phpstan/phpstan/issues/4570 |
| phpstan/phpstan#4121 | https://github.com/phpstan/phpstan/issues/4121 |
| phpstan/phpstan#8060 | https://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 |
| 43c2d27 | https://github.com/phpstan/phpstan-src/pull/5309/commits/43c2d272a0e19bf403c367fd111f339adc55792d |
|
| https://github.com/ondrejmirtes |
| Regression test | https://github.com/phpstan/phpstan-src/pull/5309/commits/8175b6e54ab506b5f2126127faa534bbed5a425e |
| 8175b6e | https://github.com/phpstan/phpstan-src/pull/5309/commits/8175b6e54ab506b5f2126127faa534bbed5a425e |
| phpstan/phpstan#10353 | https://github.com/phpstan/phpstan/issues/10353 |
|
| https://github.com/ondrejmirtes |
| Report errors in traits with the same message just once | https://github.com/phpstan/phpstan-src/pull/5309/commits/686ab8ab6bebcf4c1ad403488b8264bcecc46e27 |
| 686ab8a | https://github.com/phpstan/phpstan-src/pull/5309/commits/686ab8ab6bebcf4c1ad403488b8264bcecc46e27 |
|
| https://github.com/ondrejmirtes |
| Fix lint | https://github.com/phpstan/phpstan-src/pull/5309/commits/7b668ec776381dcbee70d3a83fabe61a90844038 |
| 7b668ec | https://github.com/phpstan/phpstan-src/pull/5309/commits/7b668ec776381dcbee70d3a83fabe61a90844038 |
|
| https://github.com/ondrejmirtes |
| Fix tests | https://github.com/phpstan/phpstan-src/pull/5309/commits/43aed2c2c625b86678c0ac6be3c4edf3ca2b5798 |
| 43aed2c | https://github.com/phpstan/phpstan-src/pull/5309/commits/43aed2c2c625b86678c0ac6be3c4edf3ca2b5798 |
| https://github.com/ondrejmirtes |
| ondrejmirtes | https://github.com/ondrejmirtes |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/3ebe522bd55402b2763c753c5675ed808fe5921e..43aed2c2c625b86678c0ac6be3c4edf3ca2b5798 |
| 3ebe522 | https://github.com/phpstan/phpstan-src/commit/3ebe522bd55402b2763c753c5675ed808fe5921e |
| 43aed2c | https://github.com/phpstan/phpstan-src/commit/43aed2c2c625b86678c0ac6be3c4edf3ca2b5798 |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/3ebe522bd55402b2763c753c5675ed808fe5921e..43aed2c2c625b86678c0ac6be3c4edf3ca2b5798 |
| March 27, 2026 15:28 | https://github.com/phpstan/phpstan-src/pull/5309#event-23976382764 |
|
| https://github.com/ondrejmirtes |
| Remove dead @phpstan-ignore in traits | https://github.com/phpstan/phpstan-src/pull/5309/commits/b47a204e3add46a834f8b1a303b06548d33fed5e |
| b47a204 | https://github.com/phpstan/phpstan-src/pull/5309/commits/b47a204e3add46a834f8b1a303b06548d33fed5e |
| https://github.com/ondrejmirtes |
| ondrejmirtes | https://github.com/ondrejmirtes |
| 23c5fc4 | https://github.com/phpstan/phpstan-src/commit/23c5fc412f4214ee57d13baa526eaf822963de86 |
| Mar 27, 2026 | https://github.com/phpstan/phpstan-src/pull/5309#event-23976669679 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/5309 |
| https://github.com/ondrejmirtes |
| ondrejmirtes | https://github.com/ondrejmirtes |
| March 27, 2026 15:37 | https://github.com/phpstan/phpstan-src/pull/5309#event-23976670679 |
| https://github.com/ondrejmirtes |
| ondrejmirtes | https://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 |
| staabm | https://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 |
| mvorisek | https://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 |
| mabar | https://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 |
| SanderMuller | https://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 |
| ondrejmirtes | https://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 free | https://github.com/join?source=comment-repo |
| Sign in to comment | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F5309 |
| Please reload this page | https://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 page | https://github.com/phpstan/phpstan-src/pull/5309 |
|
| https://github.com/ondrejmirtes |
|
| https://github.com/phpstan-bot |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |