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

Update phpstan baseline to remove latest not longer ignored errors #7361

Merged

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Apr 10, 2024

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Update phpstan baseline to remove latest not longer ignored errors

Why?

DX

@alexander-schranz alexander-schranz added the DX Affecting the end developer label Apr 10, 2024
@@ -18,7 +18,7 @@ class FilterTypeRegistry
*/
private $filterTypes;

public function __construct(iterable $filterTypes)
public function __construct(\Traversable $filterTypes)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the later called iterator_to_array would fail when a non \Traversable is given.

https://3v4l.org/TpQH3#v7.2.34

Only PHP 8.0 supports "unpacking" of array and traversable via this->filterTypes = [...$filterTypes];

@Prokyonn
Copy link
Member

@alexander-schranz linting job is still failing

@alexander-schranz
Copy link
Member Author

@Prokyonn added missing types

@alexander-schranz alexander-schranz marked this pull request as ready for review April 10, 2024 11:39
@alexander-schranz alexander-schranz merged commit bc438c6 into sulu:2.4 Apr 10, 2024
8 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/update-phpstan branch April 10, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Affecting the end developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants