Skip to content

Baseline PropertyNotSetInConstructor reported at the returns of constructors - #17

Merged
orklah merged 1 commit into
psalm:masterfrom
jirkace:baseline-ctor-return-init
Nov 8, 2026
Merged

orklah merged 1 commit into
psalm:masterfrom
jirkace:baseline-ctor-return-init

Conversation

@jirkace

@jirkace jirkace commented Nov 8, 2026 •

Copy link
Copy Markdown

Baselines the three PropertyNotSetInConstructor that vimeo/psalm#13085 reports where a constructor returns before it has initialised a property: ExecutionOrderDependency::$shallowClone/$deepClone (the invalid dependency returns early) and DefaultPrinter::$isPhpStream (the socket:// path returns before setting it, and flush() reads it).

This repository holds PHPUnit 11.0. The three are real in this snapshot (reading them throws Error: Typed property ... must not be accessed before initialization), but upstream PHPUnit has already fixed them: in 12.5, 13.4, 13.5 and main the constructors assign the properties before the early return, so there is nothing to report upstream.

With the baseline both configs (.psalm/config.xml and .psalm/static-analysis.xml) report no errors on vimeo/psalm#13085 (bdcc8fcf6).

…ructors

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@orklah
orklah merged commit fc9f85e into psalm:master Nov 8, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants