phpstan-src
phpstan-src copied to clipboard
PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository.
fixes https://github.com/phpstan/phpstan/issues/13856 Took inspiration from https://github.com/phpstan/phpstan-src/pull/3817 when implementing the fix. Not entirely 100% sure about the proposed changes here, as passing through the `$originalNode` to the `PropertyWrite` constructor feels a...
Closes https://github.com/phpstan/phpstan/issues/13708
Static analysis is failing because TypeTraverserInstanceofVisitor doesn't support SimultaneousTypeTraverser (not sure it should). The only current test failing is ``` 16: Function ReturnListNullables\doFoo() should return array|null but returns list. ```...
Closes https://github.com/phpstan/phpstan/issues/11707, closes https://github.com/phpstan/phpstan/issues/12585 Supersedes https://github.com/phpstan/phpstan-src/pull/3828, supersedes https://github.com/phpstan/phpstan-src/pull/3131, supersedes https://github.com/phpstan/phpstan-src/pull/3823 Hello! This adds generalized dynamic parameter type extensions and deprecates the parameter closure type extensions per https://github.com/phpstan/phpstan/issues/11707#issuecomment-2358932350. This also fixes...
closes https://github.com/phpstan/phpstan/issues/13358 closes https://github.com/phpstan/phpstan/issues/11441 ### Summary `@phpstan-assert-if-true` on `$this` with union types produced incorrect type inference. ### Repro See added test: `tests/PHPStan/Rules/Methods/AssertIfTrueOnThisTest.php`. ### Cause Union handling for `$this` assertions wasn’t...
Fix https://github.com/phpstan/phpstan/issues/13353 This is the fix for the issue above. If you see any changes to make, please let me know; this is my first contribution to the project.
references [#7498](https://github.com/phpstan/phpstan/issues/7498) only a draft for now, I want to see which test are all failing and for what reasons.
closes https://github.com/phpstan/phpstan/issues/13272
This pr is trying to fix a false positive. ``` /** * @param list $array * @param positive-int $index */ public function guardNotSafeLowerBound(array $array, int $index) { if ($index <...