mundschenk-at / wp-typography

Improve your WordPress micro typography.
https://code.mundschenk.at/wp-typography/
Other
22 stars 3 forks source link

PHP 7 incompatibility #90

Closed anselm-urban closed 7 years ago

anselm-urban commented 7 years ago

According to "WP Engine PHP Compatibility Checker" plugin, wp-typography isn't (fully) compatible with PHP 7.

Error log:

FILE: /home/wp/disk/wordpress/wp-content/plugins/wp-typography/php-typography/class-php-typography.php
------------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AFFECTING 25 LINES
------------------------------------------------------------------------------------------------------
 1224 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1225 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1226 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1227 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1228 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1229 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1230 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1231 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1240 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1249 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1250 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1251 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1252 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1253 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1254 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1255 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1256 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1369 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1468 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1469 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1474 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1569 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1572 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1575 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
 1579 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
------------------------------------------------------------------------------------------------------

wp-typo-php7

mundschenk-at commented 7 years ago

Are you sure this is a current version of wp-Typography? If so, it's a bug in "WP Engine PHP Compatibility Checker", because WP_Typography does not use the deprecated e modifier anywhere as far as I can tell (certainly not in the regular expressions defined in PHP_Typography\Settings and executed in the listed places in PHP_Typography).

I have been running wp-Typography on PHP 7 since taking over development and every commit is checked via Travis.

anselm-urban commented 7 years ago

It's the latest version. Maybe a bug with PHP compat checker...

mundschenk-at commented 7 years ago

Has to be. I've since had a look at the class-php-typography.php file and since the time it had that name, there never was an e modifier in it.

mundschenk-at commented 7 years ago

Can't reproduce the bug with the latest version of the PHPCompatibility sniffs. The plugin didn't work on my local installation (The plugin/theme was skipped as it was too large to scan before the server killed the process.)