no-floaters icon indicating copy to clipboard operation
no-floaters copied to clipboard

Handle "never" type as non float

Open fmata opened this issue 2 years ago • 5 comments

As MixedType, NeverType implements CompoundType witch always returns yes on isSubTypeOf() calls. It forbids the use of never native PHP type (or as annotation) with this extension.

fmata avatar Aug 16 '22 12:08 fmata

AFAIK the helper FloatTypeHelper is not tested directly but many tests cover it since it is used everywhere (DisallowFloatInFunctionSignatureRule and DisallowFloatInMethodSignatureRule for my use case). Without my modification in FloatTypeHelper, the tests with my new fixtures in tests/asset fail.

fmata avatar Aug 16 '22 12:08 fmata

@fmata so, to be clear, if we drop the changes to FloatTypeHelper, CI should go red, right?

Ocramius avatar Aug 16 '22 13:08 Ocramius

Wait... CI didn't run at all :O

Ocramius avatar Aug 16 '22 13:08 Ocramius

@fmata so, to be clear, if we drop the changes to FloatTypeHelper, CI should go red, right?

Absolutely.

Tests are successful on my side but didn't run here :innocent:

fmata avatar Aug 16 '22 13:08 fmata

I'll have to fix that before a release :D

Ocramius avatar Aug 16 '22 13:08 Ocramius

OK, even post-merge, CI didn't run.

Something is fishy 🤔

Ocramius avatar Aug 17 '22 17:08 Ocramius

Released meanwhile: https://github.com/Roave/no-floaters/releases/tag/1.6.0

Ocramius avatar Aug 17 '22 17:08 Ocramius

Thanks!

fmata avatar Aug 17 '22 18:08 fmata