Commit Graph

5 Commits

Author SHA1 Message Date
Yahnis Elsts 579d537926 Add a PHPCS configuration and fix or silence all current warnings/errors
The main functional change is that PUC will now use shorter HTTP request timeouts when not running inside a Cron task. This is to comply with the WP VIP coding standard that strongly recommends a maximum timeout of 3 seconds.

Prompted by #107
2023-05-01 12:28:55 +03:00
Yahnis Elsts 749f33c5c4 Fixed many WPCS warnings
This fixes or explicitly ignores most - but not all - coding standard issues that are reported when running PHP_CodeSniffer with the basic WordPress ruleset and the WordPress-VIP ruleset. 

Notably, one of the issues that remain is the request timeout for update requests and VCS API requests. The current default is 10 seconds, but the WordPress-VIP standards appear to require 3 seconds or less. Personally, I'm not sure if that low limit is appropriate for requests that are intended to mostly run in Cron jobs.
2022-10-14 19:37:00 +03:00
Yahnis Elsts bec5c00e89 Minor: Remove obsolete code that was originally added for PHP 5.3 compatibility 2022-10-13 17:50:14 +03:00
Yahnis Elsts 4b6127f0f2 Put all^ PUC classes in namespaces.
^ Except dependencies like Parsedown.

The readme is now out of date. The legacy version of Parsedown was removed because we no longer need to support PHP versions older than 5.3. The stub file that loads ParsedownModern.php stays in place because it has the "class_exists" check.
2022-10-08 23:15:37 +03:00
Yahnis Elsts 0d4d717cde Bump version number to 5.0 2022-10-08 20:07:42 +03:00
Renamed from Puc/v4p13/UpdateChecker.php (Browse further)