Skip to content

Commit

Permalink
feat(*): Add 6.4 compatibility (#145)
Browse files Browse the repository at this point in the history
* test(*): Add 6.4 tests

* test(multisite): Remove obsolete part as it now handled by wpcli

* feat(*): Prepare release 2.5.2
  • Loading branch information
julienloizelet authored Nov 23, 2023
1 parent 60cfba8 commit 5210588
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-auto-prepend-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "6.0", "6.1", "6.2","6.3" ]
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "6.0", "6.2","6.4" ]
php-version: [ "7.2", "7.4", "8.0" ]
exclude:
- { php-version: "7.4", wp-version: "4.9" }
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/end-to-end-multisite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
wp-version: [ "4.9", "6.2", "6.3" ]
wp-version: [ "4.9", "6.2", "6.4" ]
php-version: [ "7.2" ]
subsite: ["site1", "site2"]

Expand Down Expand Up @@ -64,6 +64,10 @@ jobs:
sed -i -e 's/#ddev-generated//g' wp-config-ddev.php
echo "define( 'AUTOMATIC_UPDATER_DISABLED', true );" >> wp-config-ddev.php
- name: Disable DDEV config
run: |
sed -i -e 's/#ddev-generated//g' wp-config.php
- name: Add Redis, Memcached, Crowdsec and Playwright
run: |
ddev get ddev/ddev-redis
Expand All @@ -86,14 +90,6 @@ jobs:
- name: Copy multisite .htaccess
run: cp .ddev/okaeli-add-on/wordpress/custom_files/.htaccess-multisite-subfolder .htaccess

- name: Prepare multisite config
run: |
sed -i -e 's/#ddev-generated//g' wp-config-ddev.php
sed -i -e 's/REPLACE_SUBDOMAIN_INSTALL/false/g' .ddev/okaeli-add-on/wordpress/custom_files/multisite-config.php
sed -i -e 's/REPLACE_PROJECT_URI/${{ env.WP_VERSION_CODE }}.ddev.site/g' .ddev/okaeli-add-on/wordpress/custom_files/multisite-config.php
sed -i '/DB_HOST/ r .ddev/okaeli-add-on/wordpress/custom_files/multisite-config.php' wp-config-ddev.php
sed -i -e 's/#ddev-generated//g' wp-config-ddev.php
- name: Create sub sites
run: |
ddev wp site create --slug="site1" --title="WordPress Site1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "6.0", "6.1", "6.2", "6.3" ]
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "6.0", "6.2", "6.4" ]
php-version: [ "7.2", "7.4", "8.0" ]
exclude:
- { php-version: "7.4", wp-version: "4.9" }
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



## [2.5.2](https:/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.5.2) - 2023-11-23
[_Compare with previous release_](https:/crowdsecurity/cs-wordpress-bouncer/compare/v2.5.1...v2.5.2)

### Added

- Add compatibility with WordPress 6.4


---

## [2.5.1](https:/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.5.1) - 2023-09-14
[_Compare with previous release_](https:/crowdsecurity/cs-wordpress-bouncer/compare/v2.5.0...v2.5.1)

Expand Down
6 changes: 3 additions & 3 deletions crowdsec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
* Plugin URI: https:/crowdsecurity/cs-wordpress-bouncer
* Description: Safer Together. Protect your WordPress application with CrowdSec.
* Tags: crowdsec-bouncer, wordpress, security, firewall, captcha, ip-scanner, ip-blocker, ip-blocking, ip-address, ip-database, ip-range-check, crowdsec, ban-hosts, ban-management, anti-hacking, hacker-protection, captcha-image, captcha-generator, captcha-generation, captcha-service
* Version: 2.5.1
* Version: 2.5.2
* Author: CrowdSec
* Author URI: https://www.crowdsec.net/
* Github: https:/crowdsecurity/cs-wordpress-bouncer
* License: MIT
* License URI: https://opensource.org/licenses/MIT
* Requires PHP: 7.2
* Requires at least: 4.9
* Tested up to: 6.3
* Stable tag: 2.5.1
* Tested up to: 6.4
* Stable tag: 2.5.2
* Text Domain: crowdsec-wp
* First release: 2021.
*/
Expand Down
2 changes: 1 addition & 1 deletion inc/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ class Constants extends LibConstants
public const LOG_BASE_PATH = __DIR__ . '/../logs/';
public const CACHE_PATH = __DIR__ . '/../.cache';
public const CONFIG_PATH = __DIR__ . '/standalone-settings.php';
public const VERSION = 'v2.5.1';
public const VERSION = 'v2.5.2';
}
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: crowdsec
Donate link: https://crowdsec.net/
Tags: crowdsec-bouncer, wordpress, security, firewall, captcha, ip-scanner, ip-blocker, ip-blocking, ip-address, ip-database, ip-range-check, crowdsec, ban-hosts, ban-management, anti-hacking, hacker-protection, captcha-image, captcha-generator, captcha-generation, captcha-service
Requires at least: 4.9
Tested up to: 6.3
Tested up to: 6.4
Stable tag: 2.5.1
Requires PHP: 7.2
License: MIT
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-ddev/__scripts__/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case $TYPE in
esac


CHECKMULTISITE=$(ddev exec --raw -j grep MULTISITE wp-config-ddev.php | tail -1 | sed "s/define( 'MULTISITE',//g" | sed "s/);//g" | sed 's/ //g' | sed 's/\r//g' | tail -1)
CHECKMULTISITE=$(ddev exec --raw -j grep MULTISITE wp-config.php | tail -1 | sed "s/define( 'MULTISITE',//g" | sed "s/);//g" | sed 's/ //g' | sed 's/\r//g' | tail -1)
if [[ "$CHECKMULTISITE" == "true" ]]; then
MULTISITE=true
else
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-ddev/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const onAdminSaveSettings = async (check = true) => {

if (check) {
if (MULTISITE == "true") {
await expect(page).toHaveText(".wrap .notice", "saved.");
await expect(page).toHaveText(".wrap", "saved.");
} else {
await expect(page).toHaveText(
"#setting-error-settings_updated",
Expand Down

0 comments on commit 5210588

Please sign in to comment.