Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce plugin manager static analysis file #204

Merged
merged 13 commits into from
Mar 2, 2024

Conversation

boesing
Copy link
Member

@boesing boesing commented Aug 27, 2023

Q A
QA yes

Description

Test is currently failing, I will debug this file with psalm to provide a proper fix to psalm itself.

@boesing
Copy link
Member Author

boesing commented Aug 27, 2023

Psalm fix is available in vimeo/psalm#10157

@boesing boesing added this to the 4.0.0 milestone Aug 27, 2023
composer.json Outdated Show resolved Hide resolved
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
To enable proper static analysis without side-effects, we are removing the container plugin here to verify provided psalm-types from `ServiceLocatorInterface` and `PluginManagerInterface`

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
… by `psalm.xml`

Due to the way, psalm moves forward, this issue will be removed - most probably with v6.
The reasoning behind this is, that `mixed` is not bad per-se, depending on how it is used.
If a codebase accepts `mixed` in a method (even tho that might be revealing method complexity), that is a absolutely okay and thus, passing `mixed` and esp. assigning `mixed` is absolutely fine in case the following code is accepting mixed and/or the value is narrowed down at some point.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…er#build`

The `AbstractSingleInstancePluginManager` has to always return an object as thats what it is used for. Therefore, type-narrowing here is absolutely fine and still fits liskov substitution principle.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…tion.NoAssignment` for inline var annotation

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
These methods were initially introduced to fix psalm issues. These were fixed in one of the more recent versions and thus these methods are redundant as of now.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing merged commit a18bb35 into laminas:4.0.x Mar 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant