Skip to content

Fix imprecise types after assignment when strict-types=1 #3945

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

Merged
merged 16 commits into from
Apr 19, 2025
Merged
Prev Previous commit
fix lint condition
  • Loading branch information
staabm committed Apr 19, 2025
commit 4e0fe58294c20779df5aba671963aeb257ac9b63
4 changes: 3 additions & 1 deletion tests/PHPStan/Analyser/nsrt/bug-12902-non-strict.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types = 0); // lint >= 8.1
<?php // lint >= 8.1

declare(strict_types = 0);

namespace Bug12902NonStrict;

Expand Down
4 changes: 3 additions & 1 deletion tests/PHPStan/Analyser/nsrt/bug-12902.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types = 1); // lint >= 8.1
<?php // lint >= 8.1

declare(strict_types = 1);

namespace Bug12902;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types = 0); // lint >= 8.1
<?php // lint >= 8.1

declare(strict_types = 0);

namespace RememberNonNullablePropertyWhenStrictTypesDisabled;

Expand Down
Loading