Skip to content

Conversation

@takaram
Copy link
Contributor

@takaram takaram commented Jan 26, 2026

phpstan/phpstan#11598 was already resolved probably somewhere in 2.0.0.
This PR adds a regression test for the issue.

Closes phpstan/phpstan#11598

function(): void {
[ // @phpstan-ignore offsetAccess.nonArray
'bar' => $foo,
] = '';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the original code rhs was unserialize(''), but it requires level 9 (checkExplicitMixed: true) while AnalyserIntegrationTest runs analysis with level 8.
So the code is modified to make rhs not mixed.

@ondrejmirtes ondrejmirtes merged commit f46fe27 into phpstan:2.1.x Jan 26, 2026
358 of 368 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@takaram takaram deleted the regression-test-11598 branch January 26, 2026 16:34
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.

@phpstan-ignore wrongly autodetects line / next-line

2 participants