PHP 7.4.0 is already available

I wouldn't expect major issues, but I also wouldn't expect full compatibility until at least 2.1.6
 
  • Like
Reactions: rdn
It isn't compatible with XF 1.5.23 though.
Code:
ErrorException: Trying to access array offset on value of type bool - library/XenForo/ControllerPublic/Member.php:360
 
There are a few PHP 7.4 specific issues with 3rd party code that might (or might not) cause problems

Code:
FILE:  vendor/braintree/braintree_php/lib/Braintree/Digest.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
53 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $innerPad{$i}
53 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $keyDigest{$i}
53 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $innerPad{$i}
54 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $outerPad{$i}
54 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $keyDigest{$i}
54 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $outerPad{$i}
---------------------------------------------------------------------------------------------------------------------------------------------

FILE:  vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php
-----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------
53 | WARNING | Function get_magic_quotes_runtime() is deprecated since PHP 7.4
-----------------------------------------------------------------------------------------------------------

FILE:  vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php
------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------
  67 | WARNING | Function get_magic_quotes_runtime() is deprecated since PHP 7.4
------------------------------------------------------------------------------------------------------------

FILE:  vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
187 | WARNING | Passing the $glue and $pieces parameters in reverse order to implode has been deprecated since PHP 7.4; $glue should be the first parameter and
     |         | $pieces the second
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
Last edited:
  • Love
Reactions: rdn
Yes, but the 7.4 GA release is so fresh that php.net hasn't been updated yet as the release has not propagated to all mirrors and the planned release date is Nov 28th.
You should see it there by tomorrow.
 
Only one addon is affected for me
 
Looks interesting, is it tied only to opcache?

A problem for all those who can not restart their server or php_fpm after every change or update.
Also remember you'll need to restart the server (php-fpm is sufficient if you're using it) every time you want to reload the in-memory files. This might seem obvious for most, but still worth the mention.
 
Yeah XF 2.1 should be ok.

XF 2.0 and XF 1.5 probably won't work and these versions are no longer supported so will not be patched to have PHP 7.4 support.
Guess it was wishful thinking :)

PHP benchmarks 7.4 vs 7.3 vs 7.2 vs 7.1 vs 7.0 with & without Profile Guided Optimizations https://community.centminmod.com/threads/18741/ :)

PHP 7.4 has very nice incremental performance improvements :D
 
Using the Ubuntu PPA for PHP7.4, just updated to 7.4 final.

It's missing the php-redis module though. Another thing to be looking out for.
But hey, that's the problem when going bleeding edge :)
 
Does anyone know what changes in PHP7.4 would make xf1.5 incompatible with it?

Some of the deprecations in PHP 7.4 include:
  • Short open tags are to be removed.
  • The left-associative ternary operator will likely be removed, which means you’ll have to use explicit parentheses instead.
  • Curly brace syntax are no longer used, only square brackets.
  • Change the Precedence of the Concatenation Operator
Considering that around 60% of xenforo websites still seem to be on XF1, and quite a few of those seem to be currently stuck there, it would be nice to find a solution to the PHP7.4 upgrade for xf1.
 
Back
Top Bottom