Open bobbingwide opened 3 years ago
As with many other plugins
Update code to run without problems in PHP 8.1 and 8.2
Running l10n recently with PHP 8.3 I once again noticed a few Deprecated messages that could be fixed for PHP 8.3 There's no real need to specifically test with PHP 8.0, 8.1 or 8.2 any more.
Do we still need to run makeoik or can we switch to running the wp cli Internationalisation code as used by wp-scripts? I think this should be a separate issue.
When running
l10n oik-bwtrace
under PHP 8 I got a load of messages then a Fatal error.Warning: PO::export_entry(): Argument
#1
($entry) must be passed by reference, value given in C:\apache\htdocs\wordpress\wp-content\plugins\oik-i18n\pomo\po.php on line 55Fatal error: Declaration of Translator_bb_BB::translate_string($string) must be compatible with Translator::translate_string($string, $msgctxt, $translators_note, $cloud_translate = false) in C:\apache\htdocs\wordpress\wp-content\plugins\oik-i18n\class-translator-bb_BB.php on line 20
WIth PHP 7.4 this used to be a Warning level message. I hadn't seen it before trying PHP 8!
These problems need to be fixed.
After fixing the first problem I noticed
Deprecated: Required parameter $component_path follows optional parameter $locale in C:\apache\htdocs\wordpress\wp-content\plugins\oik-i18n\l10n.php on line 383
And later I got another problem for the
en_GB
version. Fatal error: Declaration of Translator_en_GB::translate_string($string, $msgctxt, $translators_note) must be compatible with Translator::translate_string($string, $msgctxt, $translators_note, $cloud_translate = false) in C:\apache\htdocs\wordpress\wp-content\plugins\oik-i18n\class-translator-en_GB.php on line 22Workaround: Switch back to PHP 7.4