Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PHP 8.0 in all repositories #8

Open
bobbingwide opened this issue Feb 16, 2021 · 8 comments
Open

Support PHP 8.0 in all repositories #8

bobbingwide opened this issue Feb 16, 2021 · 8 comments
Assignees
Labels
Blessed task Something that's long lasting bug Something isn't working enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Feb 16, 2021

PHP version 8.0 was released in November 2020. The current version is PHP 8.0.2. I need to be able to support PHP 8.0 as well as supported versions of PHP.

This issue is a Blessed task ( ie long running task ) to update my plugins and themes to run with no Notices, Warnings or worse when run with PHP 8

First thing to do is to enable PHP 8 in my development environment and an easy switch from PHP 7 to PHP 8.

@bobbingwide bobbingwide added bug Something isn't working enhancement New feature or request labels Feb 16, 2021
@bobbingwide bobbingwide self-assigned this Feb 16, 2021
@bobbingwide bobbingwide added the Blessed task Something that's long lasting label Feb 16, 2021
@bobbingwide
Copy link
Owner Author

bobbingwide commented Feb 17, 2021

Warning: Undefined array key "8.0" in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\admin\class-oik-trace-info.php on line 231.

This is for oik-bwtrace.

@bobbingwide
Copy link
Owner Author

There were a lot of Deprecated notices from s.b/bw - which makes use of shared libraries. The messages were about optional parameters before mandatory parameters. Solution in most cases was

  • to remove the optional value - which was basically a hint,
  • Update the Copyright date
  • Update the semantic version number
  • Distribute the change to the other plugins/ themes that use the shared library

@bobbingwide
Copy link
Owner Author

Deprecated: Required parameter $post follows optional parameter $excerpt in C:\apache\htdocs\wordpress\wp-content\plugins\oik-shortcodes\oik-shortcodes.php on line 99

Deprecated: Required parameter $dependencies follows optional parameter $plugin in C:\apache\htdocs\wordpress\wp-content\plugins\oik\libs\oik-depends.php on line 235

Deprecated: Required parameter $index follows optional parameter $array in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\class-bobbcomp.php on line 66

@bobbingwide
Copy link
Owner Author

Can't run PHPUnit8 with PHP 8. Is it time to upgrade to PHPUnit 9, which was released on 7 Feb 2020 - yes, over a year ago.

pu 

c:\apache\htdocs\phpLibraries\phpunit\phpunit-8.4.1.phar

Parse error: syntax error, unexpected token "match", expecting identifier in phar://C:/apache/htdocs/phpLibraries/phpunit/phpunit-8.4.1.phar/phpunit/Framework/MockObject/Builder/Match.php on line 17

@bobbingwide
Copy link
Owner Author

bobbingwide commented Feb 17, 2021

The output from running wp-top12's downloads.php routine with the reports parameter produced strange results today. This may not have been a PHP 8.0 problem. Probably something to do with not having run the reset() method.

@bobbingwide
Copy link
Owner Author

It looks like I'm not the only person who set default values for optional parameters which were followed by required parameters.
Jetpack produced a whole host of messages.

Other messages have come from Visualizer returning bool from a usort() callback function.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Feb 19, 2021

phpMyAdmin v4.9.5 produced a number of Deprecated messages as well.

Deprecation Notice in .\vendor\twig\twig\src\Node\IncludeNode.php#25
Required parameter $lineno follows optional parameter $only

Deprecation Notice in .\libraries\classes\Di\ReflectorItem.php#82
Method ReflectionParameter::getClass() is deprecated

@bobbingwide
Copy link
Owner Author

I've updated quite a few plugins with the shared library updates: oik-blocks, oik-css, uk-tides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blessed task Something that's long lasting bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant