Verified Commit 33bf190f authored by noplanman's avatar noplanman
Browse files

Bump dependencies, fix CI, min PHP 7.4, allow PHP 8.0

parent 6eef94c1
Pipeline #5530 passed with stage
in 1 minute and 45 seconds
...@@ -4,18 +4,17 @@ cache: ...@@ -4,18 +4,17 @@ cache:
- vendor/ - vendor/
before_script: before_script:
- apk -U add git - apk -U add icu-dev git
- curl -sS https://getcomposer.org/installer | php - curl -sS https://getcomposer.org/installer | php
- docker-php-ext-configure intl && docker-php-ext-install intl
- php composer.phar install - php composer.phar install
test:7.2:
image: php:7.2-cli-alpine
script: php composer.phar check-code
test:7.3:
image: php:7.3-cli-alpine
script: php composer.phar check-code
test:7.4: test:7.4:
image: php:7.4-cli-alpine image: php:7.4-cli-alpine
script: php composer.phar check-code script: php composer.phar check-code
tags: [dind]
test:8.0:
image: php:8.0-cli-alpine
script: php composer.phar check-code
tags: [dind]
before_commands: build:
- "composer install --prefer-dist" environment:
php: 7.4.0
checks: nodes:
php: analysis:
code_rating: true tests:
duplication: false override:
- php-scrutinizer-run
tools:
php_analyzer: true
php_mess_detector: true
php_code_sniffer:
config:
standard: "WordPress"
filter: filter:
excluded_paths: excluded_paths:
- "vendor/*" - vendor/
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
color: #800; color: #800;
} }
#wp_otp_qr_code { #wp-otp-qr-code {
background-color: #fff; background-color: #fff;
width: 222px; width: 222px;
} }
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<?php endif; ?> <?php endif; ?>
</th> </th>
<td> <td>
<img id="wp_otp_qr_code" src="<?php echo esc_attr( $otp_qr_code_img_uri ); ?>" alt="<?php esc_attr_e( 'QR Code to scan with mobile app', 'wp-otp' ); ?>"/><br> <img id="wp-otp-qr-code" src="<?php echo esc_attr( $otp_qr_code_img_uri ); ?>" alt="<?php esc_attr_e( 'QR Code to scan with mobile app', 'wp-otp' ); ?>"/><br>
</td> </td>
<td> <td>
<span class="description"> <span class="description">
......
...@@ -23,14 +23,14 @@ ...@@ -23,14 +23,14 @@
} }
], ],
"require": { "require": {
"php": "^7.2", "php": "^7.4|^8.0",
"spomky-labs/otphp": "^10.0", "spomky-labs/otphp": "^10.0",
"chillerlan/php-qrcode": "^3.3" "chillerlan/php-qrcode": "^4.3"
}, },
"require-dev": { "require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7", "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"phpcompatibility/phpcompatibility-wp": "^2.1", "phpcompatibility/phpcompatibility-wp": "^2.1",
"symfony/var-dumper": "^5.1", "symfony/var-dumper": "^5.2",
"wp-coding-standards/wpcs": "^2.3" "wp-coding-standards/wpcs": "^2.3"
}, },
"scripts": { "scripts": {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<!-- Rules: Check PHP version compatibility --> <!-- Rules: Check PHP version compatibility -->
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions --> <!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="7.2-"/> <config name="testVersion" value="7.4-"/>
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP --> <!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/> <rule ref="PHPCompatibilityWP"/>
......
...@@ -3,9 +3,9 @@ Contributors: noplanman ...@@ -3,9 +3,9 @@ Contributors: noplanman
Donate link: https://noplanman.ch/donate Donate link: https://noplanman.ch/donate
Tags: login, 2fa, two factor, otp, totp, one time password, security, recovery, google authenticator Tags: login, 2fa, two factor, otp, totp, one time password, security, recovery, google authenticator
Requires at least: 4.6 Requires at least: 4.6
Tested up to: 5.4.2 Tested up to: 5.6
Stable tag: 0.5.1 Stable tag: unreleased
Requires PHP: 7.2 Requires PHP: 7.4
Author URI: https://noplanman.ch Author URI: https://noplanman.ch
Plugin URI: https://git.feneas.org/noplanman/wp-otp Plugin URI: https://git.feneas.org/noplanman/wp-otp
License: GPLv2 or later License: GPLv2 or later
...@@ -50,7 +50,7 @@ There are a multitude of filters to be adjusted. ...@@ -50,7 +50,7 @@ There are a multitude of filters to be adjusted.
* `wp_otp_secret_length`: Length of the secret key. * `wp_otp_secret_length`: Length of the secret key.
= Minimum requirements = = Minimum requirements =
WordPress 4.6, PHP 7.2. WordPress 4.6, PHP 7.4.
= Donate / Support = = Donate / Support =
...@@ -94,6 +94,10 @@ This means that you will need to add your OTP (or recovery) code at the end of y ...@@ -94,6 +94,10 @@ This means that you will need to add your OTP (or recovery) code at the end of y
== Changelog == == Changelog ==
= unreleased =
* Require at least PHP 7.4.
* Bump dependencies.
= 0.5.1 = = 0.5.1 =
* Fix activation and deactivation hooks. * Fix activation and deactivation hooks.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Plugin Name: WP-OTP * Plugin Name: WP-OTP
* Plugin URI: https://wordpress.org/plugins/wp-otp/ * Plugin URI: https://wordpress.org/plugins/wp-otp/
* Description: WP-OTP adds 2 Factor Authentication using TOTP. (Based on "WP Secure Login" by Brijesh Kothari) * Description: WP-OTP adds 2 Factor Authentication using TOTP. (Based on "WP Secure Login" by Brijesh Kothari)
* Version: 0.5.1 * Version: unreleased
* Author: Armando Lüscher * Author: Armando Lüscher
* Author URI: https://noplanman.ch * Author URI: https://noplanman.ch
* License: GPLv2 or later * License: GPLv2 or later
...@@ -21,7 +21,7 @@ defined( 'WPINC' ) || exit; ...@@ -21,7 +21,7 @@ defined( 'WPINC' ) || exit;
// Define constants. // Define constants.
define( 'WP_OTP_SLUG', 'wp-otp' ); define( 'WP_OTP_SLUG', 'wp-otp' );
define( 'WP_OTP_VERSION', '0.5.1' ); define( 'WP_OTP_VERSION', 'unreleased' );
require_once __DIR__ . '/vendor/autoload.php'; require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/includes/class-wp-otp.php'; require_once __DIR__ . '/includes/class-wp-otp.php';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment