Skip to content

refactor: align framework-init props with plugin-laravel - #8

Merged
alies-dev merged 1 commit into
mainfrom
refactor/align-init-props-with-plugin-laravel
Jul 13, 2026
Merged

refactor: align framework-init props with plugin-laravel#8
alies-dev merged 1 commit into
mainfrom
refactor/align-init-props-with-plugin-laravel

Conversation

@alies-dev

Copy link
Copy Markdown
Member

Follow-up to #7 (pure rename, no behavioural change).

Renames the PropertyNotSetInConstructor helpers so NovaSuppressHandler reads the same as psalm/plugin-laravel's Handlers\Diagnostics\SuppressHandler, which uses the identical initialized_properties mechanism:

before after
FRAMEWORK_INITIALISED_PROPERTIES FRAMEWORK_INITIALIZED_PROPERTIES_BY_FQCN
markFrameworkInitialised() markFrameworkInitializedProperties()
markInitialised() markPropertyInitialized()

Also:

  • Map keys are the actual mixed-case FQCNs instead of pre-lowercased strings. ClassLikeStorageProvider::has()/get() lowercase internally, so resolution is unchanged.
  • The declaring-class lookup now falls back to null (and skips) rather than the base FQCN, matching the sibling handler.

No behavioural change. Local phpcs and psalm pass; the −47 PropertyNotSetInConstructor result from #7 is unchanged (re-verified on the consuming project).

Rename the PropertyNotSetInConstructor helpers introduced in the previous
commit to match psalm/plugin-laravel's Handlers\Diagnostics\SuppressHandler,
so the two plugins' framework-initialised-property handlers read the same:

- FRAMEWORK_INITIALISED_PROPERTIES -> FRAMEWORK_INITIALIZED_PROPERTIES_BY_FQCN
- markFrameworkInitialised()       -> markFrameworkInitializedProperties()
- markInitialised()                -> markPropertyInitialized()

Keys are now the actual (mixed-case) FQCNs rather than pre-lowercased
strings; ClassLikeStorageProvider::has()/get() lowercase internally, so
resolution is unchanged. The declaring-class lookup falls back to null
(and skips) instead of the base FQCN, matching the sibling handler.

Pure rename/cosmetic: no behavioural change.
@alies-dev alies-dev changed the title refactor(suppress): align framework-init props with plugin-laravel refactor: align framework-init props with plugin-laravel Jul 13, 2026
@alies-dev alies-dev changed the title refactor: align framework-init props with plugin-laravel refactor(suppress): align framework-init props with plugin-laravel Jul 13, 2026
@alies-dev alies-dev changed the title refactor(suppress): align framework-init props with plugin-laravel refactor: align framework-init props with plugin-laravel Jul 13, 2026
@alies-dev
alies-dev merged commit 1c09cb9 into main Jul 13, 2026
4 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.

1 participant