Skip to content

Conversation

@BinaryKitten
Copy link
Contributor

Details

In previous PR the Progress prompts file was added to alleviate that PHPStan was getting into an infinite loop and crashing - preventing CI from completing the static analysis.

After this was merged, I went to PHPStan and filed the issue with details from the Progress file. - see issue PHPStan - Path in match causes infinite loop ( iterator|int type definition )

This issue has now been fixed in PHPStan with new releases 1.12.28 and 2.1.15.

This PR updates PHPStan to minimum supported requirement of 1.12.28 and removes the Progress prompt file from being ignored by PHPStan.

@BinaryKitten
Copy link
Contributor Author

the need for the PHPStan ignores is removed if we refactor the constructor from a match call to a series of if calls there's no need to ignore the errors as they don't exist.
I opted to not perform the refactor as this felt larger modification than the expected update for PHPStan

 public function __construct(public string $label, public iterable|int $steps, public string $hint = '') { if (is_int($this->steps)) { $this->total = $this->steps; } if (is_countable($this->steps)) { $this->total = count($this->steps); } if (is_iterable($this->steps)) { $this->total = iterator_count($this->steps); } if ($this->total === 0) { throw new InvalidArgumentException('Progress bar must have at least one item.'); } }
@taylorotwell taylorotwell merged commit e3dd0d6 into laravel:main Jul 21, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants