https://bugs.winehq.org/show_bug.cgi?id=56707
Bug ID: 56707 Summary: AppDB PHP8 rewrite Product: WineHQ Apps Database Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: appdb-unknown Assignee: wine-bugs@winehq.org Reporter: jnewman@codeweavers.com Distribution: ---
The current codebase is not compatible with PHP8. We are stuck on 7.4.
The main issue is how all the objects are setup. PHP8 requires you define a constructor as __construct, but the AppDB is using the old method of naming the constructor the same as the object itself. While you could just rename all those to __construct, there are places in the objects where the code refers to $this->className(), these would need to be changed to $this->__construct() or parent::__construct if called from a child class
There are other PHP8 issues to be solved as well. Things like some built in functions changing how the null type is handled.
https://bugs.winehq.org/show_bug.cgi?id=56707
vv221 accounts.winehq.org@vv221.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |accounts.winehq.org@vv221.f | |r
--- Comment #1 from vv221 accounts.winehq.org@vv221.fr --- For future reference, here is the list of the breaking changes in the PHP 7.4 → 8.0 upgrade: https://www.php.net/manual/en/migration80.incompatible.php
I am starting the work on the mandatory rename for constructor functions, I expect to have something ready soon.
https://bugs.winehq.org/show_bug.cgi?id=56707
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
https://bugs.winehq.org/show_bug.cgi?id=56707
--- Comment #2 from vv221 accounts.winehq.org@vv221.fr --- I submitted a first draft for the renaming of the constructors: https://gitlab.winehq.org/winehq/appdb/-/merge_requests/2
It’s not done yet (extra tasks are listed in the merge request description) but feel free to peek at it to ensure that I am going in the right direction.
https://bugs.winehq.org/show_bug.cgi?id=56707
--- Comment #3 from vv221 accounts.winehq.org@vv221.fr --- Before I spend too much time trying to make all the unit tests to pass, are they currently in a state where they are all expected to pass using PHP 7.4?
https://bugs.winehq.org/show_bug.cgi?id=56707
--- Comment #4 from Jeremy Newman jnewman@codeweavers.com --- I've never once run those tests, and do not have a 7.4 development environment to run them on. I doubt they will.
https://bugs.winehq.org/show_bug.cgi?id=56707
--- Comment #5 from vv221 accounts.winehq.org@vv221.fr --- Thanks, then I won’t bother with these.
I might take time later to work on updating the tests, but I guess this has a much lower priority than getting everything to work on top of PHP 8.