I’m upgrading a yii2 project to PHP8.2
I see that the latest release of Yii is 2.0.47 which isn’t ready for PHP8.2
There is a branch php82
I want to use the php82 branch, and if I find any problems I can help out with a pull request.
I’ve forked github yii2
created new branch dev-php82
Thanks that works on my local dev install.
pushing that up to a server using git — arghh submodules
The problem I’m seeing as that the PK of a model has changed from string to integer (on windows) under PHP8.2 vs PHP8.0.
Gii doesn’t include the PK in the rules so there is no explicit typing in the PHP model.
I’ve now compared PHP8.0 with PHP8.2 on both linux and windows.
integer PKs have changed from string (PHP8.0) to integer (PHP8.2) on both platforms.
In mysql there were always integer. Yii models presented them as strings up to now.
It’s breaking a lot of code!!!
This happened on the current release 2.0.47 as well, so it’s not the php82 branch doing it, it’s PHP8.2.
Excuse my lousy language. I mean some sort of alpha release that can be installable by simply adding it to composer file that juggling around. It took me few minutes to change PHP to 8.1 after long time of trying to install this branch.
I guess it will be hard to test this branch as many cannot really afford the cost. What about merging it to master so that we can easily test it? I have a quiet big app that can do a good amount of testing. But will have to wait until it is merged to master