keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

PHP 8.0 support #124

Closed centminmod closed 4 years ago

centminmod commented 4 years ago

PHP 8.0 RC1 is due in ~9 days time https://www.php.net/archive/2020.php#2020-09-03-3. I am testing Cache Enabler 1.4.9 with PHP 8.0.0beta3 on my Centmin Mod LEMP stack I develop.

Errors/Warnings

As per https://core.trac.wordpress.org/ticket/50343

I see following errors/warnings on Wordpress pages on front end

On index page header area

Deprecated: Required parameter $post follows optional parameter $content in /home/nginx/domains/cache-enabler.domain.com/public/wp-includes/functions.php on line 840

Warning: Private methods cannot be final as they are never overridden by other classes in /home/nginx/domains/cache-enabler.domain.com/public/wp-includes/class-wp-session-tokens.php on line 69

Deprecated: Required parameter $tt_id follows optional parameter $object_id in /home/nginx/domains/cache-enabler.domain.com/public/wp-includes/nav-menu.php on line 1060

Deprecated: Required parameter $taxonomy follows optional parameter $object_id in /home/nginx/domains/cache-enabler.domain.com/public/wp-includes/nav-menu.php on line 1060

Deprecated: Required parameter $block_attributes follows optional parameter $block_name in /home/nginx/domains/cache-enabler.domain.com/public/wp-includes/blocks.php on line 405

Deprecated: Required parameter $block_content follows optional parameter $block_name in /home/nginx/domains/cache-enabler.domain.com/public/wp-includes/blocks.php on line 405

Deprecated: Required parameter $old_user_data follows optional parameter $id in /home/nginx/domains/cache-enabler.domain.com/public/wp-content/plugins/sucuri-scanner/src/hook.lib.php on line 999

In Recent Post entry

Hello world!

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /home/nginx/domains/cache-enabler.domain.com/public/wp-includes/class-wp-comment-query.php on line 484

PHP version/extensions loaded

php -v
PHP 8.0.0beta3 (cli) (built: Sep  1 2020 20:07:51) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.0beta3, Copyright (c), by Zend Technologies
php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
enchant
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mailparse
maxminddb
mbstring
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
timezonedb
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
centminmod commented 4 years ago

Whoops just realised those are Wordpress core warnings not Cache Enabler !