Skip to content

Commit dfab34a

Browse files
committed
Merge branch 'develop' into stable for v1.5.0
2 parents cbf3bbe + b3c4b17 commit dfab34a

29 files changed

+3988
-3142
lines changed

.distignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/.git
33
/.github
44
/.wordpress-org
5-
/bin
65
/node_modules
76
/tests
87
/vendor
@@ -15,11 +14,12 @@
1514
/.gitignore
1615
/.stylelintrc.json
1716
/.travis.yml
18-
/clover.xml
1917
/composer.json
2018
/package.json
2119
/package-lock.json
2220
/composer.lock
2321
/phpcs.xml
2422
/phpunit.xml
25-
23+
/sonar-project.properties
24+
/tests-clover.xml
25+
/tests-junit.xml

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "plugin:@wordpress/eslint-plugin/es5",
2+
"extends": "plugin:@wordpress/eslint-plugin/recommended",
33
"env": {
44
"browser": true,
55
"jquery": true

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
/package-lock.json export-ignore
1919
/phpcs.xml export-ignore
2020
/phpunit.xml export-ignore
21+
/sonar-project.properties export-ignore

.github/workflows/test.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Test
2-
on: push
2+
on: [ push, pull_request ]
33
jobs:
44
unit:
55
runs-on: ubuntu-latest
@@ -8,7 +8,9 @@ jobs:
88
php: [ '7.4', '8.0', '8.1', '8.2' ]
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
1214
- name: Setup PHP
1315
uses: shivammathur/setup-php@v2
1416
with:
@@ -17,15 +19,21 @@ jobs:
1719
- name: Install
1820
run: composer install --no-interaction
1921
- name: Unit tests
20-
run: composer test
21-
- name: Coverage Report
22+
run: |
23+
composer test
24+
sed -i 's#'$GITHUB_WORKSPACE'#/github/workspace#g' tests-*.xml
25+
- name: SonarCloud Scan
26+
uses: sonarsource/sonarcloud-github-action@master
2227
if: matrix.php == '8.1'
23-
uses: codecov/codecov-action@v3
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
31+
2432
quality:
2533
runs-on: ubuntu-latest
2634
steps:
2735
- name: Checkout
28-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
2937
- name: Setup PHP
3038
uses: shivammathur/setup-php@v2
3139
with:

.github/workflows/wordpress-plugin-asset-update.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- name: Setup PHP
1414
uses: shivammathur/setup-php@v2
1515
with:

.github/workflows/wordpress-plugin-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: Setup PHP
1515
uses: shivammathur/setup-php@v2
1616
with:

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ js/*.min.js
44
vendor/
55
node_modules/
66
.phpunit.result.cache
7-
clover.xml
7+
tests-*.xml

.wordpress-org/screenshot-1.png

14.4 KB
Loading

.wordpress-org/screenshot-2.png

16.7 KB
Loading

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### 1.5.0 ###
4+
* Replace `FILTER_SANIITZE_STRING` deprecated since PHP 8.1+ (#126) (#127)
5+
* Enforce use of custom Safe Browsing API key (#104) (#108)
6+
* Separate settings page from manual scanning with overhauled UI (#107)
7+
* Update JS to ES2015 (IE11 no longer supported) (#32)
8+
39
### 1.4.4 ###
410
* Fix warning on SafeBrowsing API errors with PHP 8.1+ (#123)
511
* Tested up to WordPress 6.2

README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
55
* Requires at least: 4.1
66
* Requires PHP: 5.2
7-
* Tested up to: 6.2
8-
* Stable tag: 1.4.4
7+
* Tested up to: 6.4
8+
* Stable tag: 1.5.0
99
* License: GPLv2 or later
1010
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -41,6 +41,12 @@ A complete documentation is available on the [AntiVirus website](https://antivir
4141

4242
## Changelog ##
4343

44+
### 1.5.0 ###
45+
* Fix deprecation warning with PHP 8.1+ (#126) (#127)
46+
* Enforce use of custom Safe Browsing API key (#104) (#108)
47+
* Separate settings page from manual scanning with overhauled UI (#107)
48+
* Update JS to ES2015 (IE11 no longer supported) (#32)
49+
4450
### 1.4.4 ###
4551
* Fix warning on SafeBrowsing API errors with PHP 8.1+ (#123)
4652
* Tested up to WordPress 6.2
@@ -90,6 +96,11 @@ For the complete changelog, check out our [GitHub repository](https://github.com
9096

9197
## Upgrade Notice ##
9298

99+
### 1.5.0 ###
100+
This update finally removed support for Safe Browsing API without an API key.
101+
If you are using this feature and did not provide your own key yet, it will be disabled.
102+
Can be easily enabled again, just enter a key.
103+
93104
### 1.4.4 ###
94105
This is a small maintenance release which fixes a PHP warning on Safe Browsing API errors with PHP 8.1.
95106

antivirus.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
* Text Domain: antivirus
99
* License: GPLv2 or later
1010
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
11-
* Version: 1.4.4
11+
* Version: 1.5.0
1212
*
1313
* @package AntiVirus
1414
*/
1515

1616
/*
1717
Copyright (C) 2009-2015 Sergej Müller
18-
Copyright (C) 2016-2021 pluginkollektiv
18+
Copyright (C) 2016-2023 pluginkollektiv
1919
2020
This program is free software; you can redistribute it and/or modify
2121
it under the terms of the GNU General Public License as published by
@@ -42,17 +42,17 @@
4242
/**
4343
* Plugin autoloader.
4444
*
45-
* @param string $class The classname.
45+
* @param string $class_name The classname.
4646
*/
47-
function antivirus_autoload( $class ) {
48-
if ( in_array( $class, array( 'AntiVirus', 'AntiVirus_CheckInternals', 'AntiVirus_SafeBrowsing', 'AntiVirus_ChecksumVerifier' ), true ) ) {
47+
function antivirus_autoload( $class_name ) {
48+
if ( in_array( $class_name, array( 'AntiVirus', 'AntiVirus_CheckInternals', 'AntiVirus_SafeBrowsing', 'AntiVirus_ChecksumVerifier' ), true ) ) {
4949
require_once sprintf(
5050
'%s%s%s%sclass-%s.php',
5151
dirname( __FILE__ ),
5252
DIRECTORY_SEPARATOR,
5353
'inc',
5454
DIRECTORY_SEPARATOR,
55-
strtolower( str_replace( '_', '-', $class ) )
55+
strtolower( str_replace( '_', '-', $class_name ) )
5656
);
5757
}
5858
}

bin/install-wp-tests.sh

-85
This file was deleted.

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
"ext-json": "*"
99
},
1010
"require-dev": {
11-
"php": ">=7.3",
12-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
13-
"10up/wp_mock": "^0.5",
11+
"php": ">=7.4",
12+
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0",
13+
"10up/wp_mock": "^1.0",
1414
"matthiasmullie/minify": "^1.3",
1515
"phpcompatibility/phpcompatibility-wp": "^2.1",
1616
"phpunit/phpunit": "^9",
1717
"squizlabs/php_codesniffer": "^3.7",
18-
"wp-coding-standards/wpcs": "^2.3"
18+
"wp-coding-standards/wpcs": "^3.0"
1919
},
2020
"scripts": {
2121
"post-install-cmd": [
@@ -52,7 +52,7 @@
5252
"minifyjs js/script.js > js/script.min.js"
5353
],
5454
"test": [
55-
"phpunit --coverage-clover clover.xml"
55+
"phpunit"
5656
]
5757
},
5858
"config": {

0 commit comments

Comments
 (0)