Jan Nedbal
Jan Nedbal
> It's mainly because we already typed our code with things like int|string or numeric. Yeah, because PHPStan generally allows type widening. In our case, we have: - Custom rule...
Thanks for explanation, that works. Although it is a bit questionable behaviour. ```php /** * @psalm-param TMaybeContained $element * @psalm-return (TMaybeContained is T ? bool : false) * * @template...
Wondering if phpstan-doctrine should not raise an error if Collection is created without known template type (no constructor argument). That should prevent those problems. ``` $accounts = new ArrayCollection(); //...
No, just tested on 1.3.29
I think this is no longer an issue, can you confirm?
The failed CI job looks like a bug, reported here: https://github.com/IonBazan/composer-diff/issues/30
I tried fixing the issue as suggested in the [bugreport](https://github.com/IonBazan/composer-diff/issues/30), but as I'm just sending fork, GitHub security measures are not executing the new job (when `pull_request_target` is kept) or...
The bug should be solvable [just by bumping the version](https://github.com/IonBazan/composer-diff/issues/30#issuecomment-1979052925): ```diff diff --git a/.github/workflows/composer-diff.yml b/.github/workflows/composer-diff.yml index 3bfdb4fc..f5748bdc 100644 --- a/.github/workflows/composer-diff.yml +++ b/.github/workflows/composer-diff.yml @@ -19,6 +19,6 @@ jobs: ref: ${{ github.event.pull_request.head.sha...
Fixed conflict
Here is a more generic approach: https://github.com/shipmonk-rnd/phpstan-rules#allowcomparingonlycomparabletypes > Denies using comparison operators >, Mixing different types in those operators is also forbidden, only exception is comparing floats with integers