Colonel_mortis Posted November 28, 2020 Posted November 28, 2020 (edited) PHP 8.0.0 has been released. Some bugs that I've found in a couple of minutes of testing: There are a bunch of deprecation warnings for required parameters following optional parameters - from my search with the regex function\s*\w+\s*\([^=)]*=[^)]*,\s*\$[^,)=]*[,)] there are 47 instances of this in the suite. It should be safe to remove all of the offending default parameters, since they can never be utilised. The cms lang key can_edit_item_message_record is invalid - it contains %S rather than %s, which causes the page to (randomly?) 500. Fatal error: Cannot make static method XMLReader::open() non static in class IPS\Xml\_XMLReader in .../system/Xml/XMLReader.php on line 34 (this might be a fun one to fix - it's a PHP 8 change that isn't compatible in either direction - https://www.php.net/manual/en/xmlreader.open.php#refsect1-xmlreader.open-changelog - you probably have to make a new method that delegates instead) TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given from statusContainer.phtml:133 (when viewing a feed containing status updates) PHP Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in .../applications/calendar/widgets/upcomingEvents.php on line 153 If I come across any more issues, I'll add them in this topic, and encourage others to do the same. Edited November 30, 2020 by Colonel_mortis Unparenthesized nested ternary Octavian Dima, Chris027, DawPi and 7 others 7 3
RevengeFNF Posted November 28, 2020 Posted November 28, 2020 You noticed any change in terms of performance? I need to setup a test server for this. sobrenome 1
Colonel_mortis Posted November 28, 2020 Author Posted November 28, 2020 2 hours ago, RevengeFNF said: You noticed any change in terms of performance? I need to setup a test server for this. I've only been playing around with it IN_DEV so far, but I'm not noticing a difference. I don't think the JIT compiler is expected to make too much difference for web apps, but I would love to be wrong there. sobrenome 1
Solution bfarber Posted December 1, 2020 Solution Posted December 1, 2020 I'm finding it to be a lot faster locally with IN_DEV enabled actually. I had to adjust the regex you supplied (it didn't account for typed parameters like function x( $member=NULL, \IPS\Member\Group $group ) ) but it was pretty helpful nevertheless. Thanks! I found a few more similar issues (method_exists() calls on NULL for instance) but nothing you hadn't reported. Let us know if you spot anything else. sobrenome and RevengeFNF 2
Colonel_mortis Posted December 13, 2020 Author Posted December 13, 2020 (edited) On 12/1/2020 at 2:58 AM, bfarber said: Let us know if you spot anything else. If you've not discovered it yet, I'm also getting TypeError: array_merge(): Argument #2 must be of type array, null given (0) in \IPS\forums\Forum::formatFormValues:1120 (neither $whereString nor $whereParams are defined as far as I and my IDE can tell, and $where seems to be unused). Also there are a few places where you have new\DateInterval( which seems to now be lexed as calling the function DateInterval in the namespace new, rather than applying the new operator to the root-namespace class DateInterval [1]. Edited December 13, 2020 by Colonel_mortis RFC reference sobrenome 1
bfarber Posted December 14, 2020 Posted December 14, 2020 I fixed the DateInterval issue. I can't reproduce or see the first issue however, and my code lines aren't matching up. On 12/13/2020 at 8:36 AM, Colonel_mortis said: in \IPS\forums\Forum::formatFormValues:1120 (neither $whereString nor $whereParams are defined as far as I and my IDE can tell, and $where seems to be unused). What do you have on line 1120? sobrenome 1
Colonel_mortis Posted December 14, 2020 Author Posted December 14, 2020 (edited) 7 hours ago, bfarber said: I fixed the DateInterval issue. I can't reproduce or see the first issue however, and my code lines aren't matching up. What do you have on line 1120? Ugh it's the patch from ticket #70349 again. Looking at the patch again it doesn't seem to break either of the things that I've run into, so it seems I somehow managed to misapply it (my linux git doesn't like that patch file at all, it's missing the a/ and b/ prefixes). Apologies for wasting your time twice for that. Edited December 14, 2020 by Colonel_mortis sobrenome 1
bfarber Posted December 15, 2020 Posted December 15, 2020 Oh no worries - at least it clears up why I wasn't able to find what you were seeing. Thanks for confirming! sobrenome 1
brfcs Posted December 23, 2020 Posted December 23, 2020 I run my site via Docker, and didn't specify the version of the PHP-FPM image I wanted to use and during a server migration I couldn't get past this error: www_1 | 2020/12/23 17:46:29 [error] 35#35: *9 FastCGI sent in stderr: "PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/brfcs/mb/system/3rd_party/JShrink/Minifier.php on line 546" while reading response header from upstream, client: 194.35.116.206, server: tugay.brfcs.com, request: "GET /mb/ HTTP/2.0", upstream: "fastcgi://172.19.0.3:9000", host: "tugay.brfcs.com" Turns out JSShrink has issues with PHP 8 at the moment ... sobrenome 1
bfarber Posted December 23, 2020 Posted December 23, 2020 Thanks for the heads up. I've added a note internally to our PHP8 support task. sobrenome and brfcs 2
Recommended Posts