WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
207 stars 38 forks source link

Internal.Exception -- function update_current_version() should be removed. #242

Open WraithKenny opened 4 years ago

WraithKenny commented 4 years ago
{
    "resource": "/Users/wraithkenny/Projects/dev/some-theme/tgmpa/class-tgm-plugin-activation.php",
    "owner": "_generated_diagnostic_collection_name_#3",
    "severity": 8,
    "message": "An error occurred during processing; checking has been aborted. The error message was: file_get_contents(https://api.github.com/repos/TGMPA/TGM-Plugin-Activation/releases/latest): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden\\r\\n in /Users/wraithkenny/Projects/dev/vendor/wptrt/wpthemereview/WPThemeReview/Sniffs/Plugins/CorrectTGMPAVersionSniff.php on line 482\n(Internal.Exception)",
    "source": "phpcs",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 1,
    "endColumn": 2
}

There are several problems with the update_current_version() function. (WPThemeReview/Sniffs/Plugins/CorrectTGMPAVersionSniff.php)

There is no actual need to retain this function. It should be replaced with '2.6.1' and if TGMPA ever updates, it should be updated in the sniff.