CRUD icon indicating copy to clipboard operation
CRUD copied to clipboard

Refactor to PHP 8.1

Open pxpm opened this issue 2 years ago • 3 comments

This is a Rector run with PHP 8.1 as the target version, and some more changes I did myself that rector didn't get. (Rector does not automatically delete notated parameters in docblock if they have adicional comments, so there is still ALOT of them!)

Some changes are preferences that we can configure if required.

pxpm avatar May 05 '23 18:05 pxpm

Is this ready for me to review? No breaking changes?

tabacitu avatar May 08 '23 11:05 tabacitu

This has no BCs that I am aware of (at least it shouldn't). I would probably just be cautious on the JSON_THROW_ON_ERROR as it may have different results than the previous behavior where errors where not handled.

Apart from that it seems that's just adding a bunch of arrow functions and removing parameters from doc block.

Can it break ? There is the possibility, it's not 0! If we say in doc block @param string $test and we move that string $test to the function, and in reality the function accepts string|null ... yes, it will fail.

I caught some of those as you can see in my commits after the big rector one.

pxpm avatar May 08 '23 11:05 pxpm

Ok got it. I've tagged this as a SHOULD and will take a look as soon as we're done with all MUSTs.

tabacitu avatar May 08 '23 13:05 tabacitu