Skip to content

Commit df4f21d

Browse files
authored
DGR-964: Bump Tested up to version to 6.6 (#73)
* Bump Tested up to version to 6.6 * Fix phpcs setup issues * Fix WP initialization failure in CI * Fix auto coding style correction by phpcbf * Fix Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound warning * Fix Capabilities should be used instead of roles. Found administrator in function call phpcs errors
1 parent 19517a5 commit df4f21d

18 files changed

+449
-575
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,16 @@ jobs:
3232
include:
3333
- php: '5.6'
3434
composer: 1
35-
wordpress: '5.9'
36-
- php: '7.0'
37-
composer: 1
38-
wordpress: '5.9'
35+
wordpress: '6.2'
3936
- php: '7.1'
4037
composer: 1
41-
wordpress: '5.9'
42-
- php: '7.2'
43-
composer: 2
44-
wordpress: '5.9'
45-
- php: '7.3'
46-
composer: 2
47-
wordpress: '5.9'
38+
wordpress: '6.5'
4839
- php: '7.4'
4940
composer: 2
50-
wordpress: '5.9'
41+
wordpress: '6.6'
42+
- php: '8.2'
43+
composer: 2
44+
wordpress: '6.6'
5145

5246
name: WP version ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
5347

@@ -72,11 +66,14 @@ jobs:
7266
env:
7367
DB_PORT: ${{ job.services.mysql.ports[3306] }}
7468
run: |
75-
git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git vendor/wp-coding-standards/wpcs
69+
git clone -b main https://github.com/WordPress/WordPress-Coding-Standards.git vendor/wp-coding-standards/wpcs
70+
composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
7671
composer global require wp-coding-standards/wpcs
7772
composer global require phpcompatibility/phpcompatibility-paragonie
7873
composer global require phpcompatibility/phpcompatibility-wp
79-
sudo vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcompatibility/php-compatibility,vendor/phpcompatibility/phpcompatibility-paragonie,vendor/phpcompatibility/phpcompatibility-wp
74+
composer global require phpcsstandards/phpcsutils
75+
composer global require phpcsstandards/phpcsextra
76+
sudo vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcompatibility/php-compatibility,vendor/phpcompatibility/phpcompatibility-paragonie,vendor/phpcompatibility/phpcompatibility-wp,vendor/phpcsstandards/phpcsutils,vendor/phpcsstandards/phpcsextra
8077
vendor/bin/phpcs -i
8178
bash bin/install-wp-tests.sh wordpress wordpress wordpress 127.0.0.1:${{ job.services.mysql.ports[3306] }} ${{ matrix.wordpress }} true
8279

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM wordpress:5.9-php7.4-apache
1+
FROM wordpress:6.6-php8.2-apache
22

33
# Install wp-cli & composer
44
RUN apt-get update && apt-get install -y vim sudo git default-mysql-client subversion
@@ -10,7 +10,7 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
1010
&& wp --info
1111
# composer for PHP package installation: https://getcomposer.org/download/
1212
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
13-
&& php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
13+
&& php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
1414
&& php composer-setup.php \
1515
&& php -r "unlink('composer-setup.php');" \
1616
&& sudo mv composer.phar /usr/local/bin/composer \

accredible-learndash-add-on.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Plugin Name: Accredible LearnDash Add-on
88
* Plugin URI: https://github.com/accredible/accredible-learndash-add-on
99
* Description: Issue credentials, certificates, or badges for your LearnDash courses through Accredible digital credentialing.
10-
* Version: 1.0.12
10+
* Version: 1.0.13
1111
* Author: Accredible
1212
* Author URI: https://www.accredible.com/
1313
* License: GPLv2 or later
@@ -16,13 +16,13 @@
1616

1717
defined( 'ABSPATH' ) || die;
1818

19-
define( 'ACCREDIBLE_LEARNDASH_VERSION', '1.0.12' );
19+
define( 'ACCREDIBLE_LEARNDASH_VERSION', '1.0.13' );
2020
define( 'ACCREDILBE_LEARNDASH_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
2121
define( 'ACCREDILBE_LEARNDASH_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
2222
define( 'ACCREDIBLE_LEARNDASH_SCRIPT_VERSION_TOKEN', ACCREDIBLE_LEARNDASH_VERSION );
2323

2424
if ( ! defined( 'ACCREDIBLE_LEARNDASH_PLUGIN_URL' ) ) {
25-
$accredible_learndash_plugin_url = trailingslashit( WP_PLUGIN_URL . '/' . basename( dirname( __FILE__ ) ) );
25+
$accredible_learndash_plugin_url = trailingslashit( WP_PLUGIN_URL . '/' . basename( __DIR__ ) );
2626
$accredible_learndash_plugin_url = str_replace( array( 'https://', 'http://' ), array( '//', '//' ), $accredible_learndash_plugin_url );
2727

2828
/**

bin/init-wp-dev.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ vendor/bin/phpunit --version
88
# Configure WordPress-Coding-Standards
99
wpcs_dir="WordPress"
1010
wpcs_path="${PLUGIN_DIR}/vendor/squizlabs/php_codesniffer/Standards/${wpcs_dir}"
11-
git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git $wpcs_path
12-
vendor/bin/phpcs --config-set installed_paths $wpcs_path
11+
git clone -b main https://github.com/WordPress/WordPress-Coding-Standards.git $wpcs_path
12+
phpcsutils_path="${PLUGIN_DIR}/vendor/phpcsstandards/phpcsutils"
13+
phpcompatibility_path="${PLUGIN_DIR}/vendor/phpcompatibility/phpcompatibility-wp"
14+
phpcs_extra_path="${PLUGIN_DIR}/vendor/phpcsstandards/phpcsextra"
15+
vendor/bin/phpcs --config-set installed_paths $wpcs_path, $phpcsutils_path, $phpcompatibility_path, $phpcs_extra_path
1316
installed_standards=$(vendor/bin/phpcs -i)
1417
if [[ ${installed_standards} != *"WordPress-Core"* ]]; then
1518
echo "WordPress-Coding-Standards is not added to the list of coding standards."
1619
exit 1
1720
fi
21+
vendor/bin/phpcs --config-set default_standard WordPress
1822

1923
# PHP Unit
2024
bash bin/install-wp-tests.sh wordpress_test $WORDPRESS_DB_USER $WORDPRESS_DB_PASSWORD $WORDPRESS_DB_HOST $WORDPRESS_VERSION

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"yoast/phpunit-polyfills": "^1.0",
44
"squizlabs/php_codesniffer": "^3.3.1",
55
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
6-
"phpcompatibility/phpcompatibility-wp": "*"
6+
"phpcompatibility/phpcompatibility-wp": "*",
7+
"phpcsstandards/phpcsutils": "^1.0",
8+
"phpcsstandards/phpcsextra": "^1.2.0"
79
},
810
"config": {
911
"allow-plugins": {

0 commit comments

Comments
 (0)