Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Nov 1, 2023
2 parents 36c26ea + 5f4eb39 commit 53338de
Show file tree
Hide file tree
Showing 267 changed files with 23,618 additions and 17,353 deletions.
5 changes: 5 additions & 0 deletions .github/hookdoc-tmpl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

ElasticPress, a fast and flexible search and query engine for WordPress, enables WordPress to find or “query” relevant content extremely fast through a variety of highly customizable features. WordPress out-of-the-box struggles to analyze content relevancy and can be very slow. ElasticPress supercharges your WordPress website making for happier users and administrators. The plugin even contains features for popular plugins.

**ElasticPress 5.0:** Minimum versions required for ElasticPress 5.0 are:
* [Elasticsearch](https://www.elastic.co) 5.2+
* [WordPress](https://wordpress.org) 6.0+
* [PHP](https://php.net/) 7.4+

**ElasticPress 4.0:** Minimum versions required for ElasticPress 4.0 are:
* [Elasticsearch](https://www.elastic.co) 5.2+ **ElasticSearch max version supported: 7.10**
* [WordPress](https://wordpress.org) 5.6+
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ on:

jobs:
cypress_local:
name: Cypress - Local
name: Local - ${{ matrix.core.name }} (${{ matrix.testGroup }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testGroup: ['@slow', '-@slow']
core:
- {name: 'WP latest', version: '', wcVersion: ''}
- {name: 'WP minimum', version: '6.0', wcVersion: '6.4.0'}

steps:
- name: Checkout
Expand Down Expand Up @@ -72,7 +75,7 @@ jobs:
run: npm run build

- name: Set up database
run: npm run cypress:setup
run: npm run cypress:setup -- --wp-version=${{ matrix.core.version }} --wc-version=${{ matrix.core.wcVersion }}

- name: Test
run: npm run cypress:run -- --env grepTags=${{ matrix.testGroup }}
Expand All @@ -81,7 +84,7 @@ jobs:
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-artifact
name: cypress-artifact-${{ matrix.core.name }}-${{ matrix.testGroup }}
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
Expand All @@ -102,12 +105,15 @@ jobs:
./bin/wp-env-cli tests-wordpress "wp --allow-root plugin uninstall ep-delete"
cypress_epio:
name: Cypress - EP.io
name: EP.io - ${{ matrix.core.name }} (${{ matrix.testGroup }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testGroup: ['@slow', '-@slow']
core:
- {name: 'WP latest', version: '', wcVersion: ''}
- {name: 'WP minimum', version: '6.0', wcVersion: '6.4.0'}

steps:
- name: Checkout
Expand Down Expand Up @@ -156,7 +162,7 @@ jobs:
run: npm run build

- name: Set up database
run: npm run cypress:setup -- --ep-host=${{ secrets.EPIO_HOST }} --es-shield='${{ secrets.EPIO_SHIELD }}' --ep-index-prefix=${{ secrets.EPIO_INDEX_PREFIX }}
run: npm run cypress:setup -- --ep-host=${{ secrets.EPIO_HOST }} --es-shield='${{ secrets.EPIO_SHIELD }}' --ep-index-prefix=${{ secrets.EPIO_INDEX_PREFIX }} --wp-version=${{ matrix.core.version }} --wc-version=${{ matrix.core.wcVersion }}

- name: Test
run: npm run cypress:run -- --env grepTags=${{ matrix.testGroup }}
Expand All @@ -165,7 +171,7 @@ jobs:
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-artifact-epio
name: cypress-artifact-epio-${{ matrix.core.name }}-${{ matrix.testGroup }}
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ jobs:
run: composer install

- name: PHPCS check
run: './vendor/bin/phpcs . -q --report=checkstyle --runtime-set testVersion 7.0- | cs2pr'
run: './vendor/bin/phpcs . -q --report=checkstyle --runtime-set testVersion 7.4- | cs2pr'
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"10up-toolkit lint-js"
],
"*.php": [
"./vendor/bin/phpcs --extensions=php --runtime-set testVersion 7.0- -s"
"./vendor/bin/phpcs --extensions=php --runtime-set testVersion 7.4- -s"
]
}
Binary file modified .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
"https://downloads.wordpress.org/plugin/debug-bar.zip",
"https://downloads.wordpress.org/plugin/debug-bar-elasticpress.zip",
"https://downloads.wordpress.org/plugin/wordpress-importer.zip",
"https://downloads.wordpress.org/plugin/woocommerce.zip",
"10up/elasticpress-proxy#develop"
],
"mappings": {
".htaccess": "./tests/cypress/wordpress-files/.htaccess",
"wp-content/mu-plugins/skip-wp-lookup.php": "./tests/cypress/wordpress-files/test-mu-plugins/skip-wp-lookup.php",
"wp-content/mu-plugins/unique-index-name.php": "./tests/cypress/wordpress-files/test-mu-plugins/unique-index-name.php",
"wp-content/plugins/auto-meta-mode.php": "./tests/cypress/wordpress-files/test-plugins/auto-meta-mode.php",
"wp-content/mu-plugins/disable-welcome-guide.php": "./tests/cypress/wordpress-files/test-mu-plugins/disable-welcome-guide.php",
"wp-content/plugins/cpt-and-custom-tax.php": "./tests/cypress/wordpress-files/test-plugins/cpt-and-custom-tax.php",
"wp-content/plugins/custom-instant-results-template.php": "./tests/cypress/wordpress-files/test-plugins/custom-instant-results-template.php",
Expand All @@ -34,6 +36,7 @@
"wp-content/plugins/filter-instant-results-per-page.php": "./tests/cypress/wordpress-files/test-plugins/filter-instant-results-per-page.php",
"wp-content/plugins/filter-instant-results-args-schema.php": "./tests/cypress/wordpress-files/test-plugins/filter-instant-results-args-schema.php",
"wp-content/plugins/filter-autosuggest-navigate-callback.php": "./tests/cypress/wordpress-files/test-plugins/filter-autosuggest-navigate-callback.php",
"wp-content/plugins/show-comments-and-terms.php": "./tests/cypress/wordpress-files/test-plugins/show-comments-and-terms.php",
"wp-content/uploads/content-example.xml": "./tests/cypress/wordpress-files/test-docs/content-example.xml"
}
}
Expand Down
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,83 @@ All notable changes to this project will be documented in this file, per [the Ke
### Security
-->

## [5.0.0] - 2023-11-01

**ElasticPress 5.0.0 contains some important changes. Make sure to read these highlights before upgrading:**
- This version does not require a full reindex but it is recommended, especially for websites using synonyms containing spaces. See [#3610](https://.github.com/10up/ElasticPress/pull/3610).
- Meta keys are not indexed by default anymore. The new Weighting Dashboard allows admin users to mark meta fields as indexables. The new `ep_prepare_meta_allowed_keys` filter allows to add meta keys programmatically. See [#3068](https://github.com/10up/ElasticPress/pull/3068).
- Features now have their fields declared in JSON. Custom features may need to implement the `set_settings_schema()` method to work. See [#3655](https://github.com/10up/ElasticPress/pull/3655).
- The `Users` feature was moved to the [ElasticPress Labs](https://github.com/10up/ElasticPressLabs) plugin and is no longer available in this plugin. If you use this feature, make sure to install and configure EP Labs before upgrading. See [#3670](https://github.com/10up/ElasticPress/pull/3670).
- The `Terms` and `Comments` features are now hidden by default for sites that do not have them active yet. Check [our blog post](https://www.elasticpress.io/blog/2023/03/enabling-comments-and-terms-in-elasticpress-5-0) for more info. See [#3691](https://github.com/10up/ElasticPress/pull/3691).
- New minimum versions (see [#3668](https://github.com/10up/ElasticPress/pull/3668)) are:
||Min|Max|
|---|:---:|:---:|
|Elasticsearch|5.2|Unset|
|WordPress|6.0+|latest|
|PHP|7.4+|latest|

### Added
* New Sync page. Props [@JakePT](https://github.com/JakePT), [@felipeelia](https://github.com/felipeelia), [@apurvrdx1](https://github.com/apurvrdx1), [@brandwaffle](https://github.com/brandwaffle), [@anjulahettige](https://github.com/anjulahettige), [@burhandodhy](https://github.com/burhandodhy), and [@MARQAS](https://github.com/MARQAS) via [#3657](https://github.com/10up/ElasticPress/pull/3657) and [#3735](https://github.com/10up/ElasticPress/pull/3735).
* New feature settings screen. Props [@JakePT](https://github.com/JakePT), [@felipeelia](https://github.com/felipeelia), [@apurvrdx1](https://github.com/apurvrdx1), [@brandwaffle](https://github.com/brandwaffle), and [@anjulahettige](https://github.com/anjulahettige) via [#3712](https://github.com/10up/ElasticPress/pull/3712).
* New weighting dashboard with support for making meta fields searchable. Props [@JakePT](https://github.com/JakePT), [@mehidi258](https://github.com/mehidi258), and [@felipeelia](https://github.com/felipeelia) via [#3068](https://github.com/10up/ElasticPress/pull/3068).
* New Date Filter Block. Props [@burhandodhy](https://github.com/burhandodhy), [@JakePT](https://github.com/JakePT), and [@felipeelia](https://github.com/felipeelia) via [#3700](https://github.com/10up/ElasticPress/pull/3700).
* Sync history to the Sync page. Props [@JakePT](https://github.com/JakePT), [@felipeelia](https://github.com/felipeelia), [@apurvrdx1](https://github.com/apurvrdx1), [@brandwaffle](https://github.com/brandwaffle), and [@anjulahettige](https://github.com/anjulahettige) via [#3664](https://github.com/10up/ElasticPress/pull/3664).
* Final status of syncs (success, with errors, failed, or aborted.) Props [@felipeelia](https://github.com/felipeelia) and [@JakePT](https://github.com/JakePT) via [#3669](https://github.com/10up/ElasticPress/pull/3669).
* REST API endpoint at `elasticpress/v1/features` for updating feature settings. Props [@JakePT](https://github.com/JakePT) via [#3676](https://github.com/10up/ElasticPress/pull/3676).
* New `ElasticsearchErrorInterpreter` class. Props [@felipeelia](https://github.com/felipeelia) via [#3661](https://github.com/10up/ElasticPress/pull/3661).
* New `default_search` analyzer to differentiate what is applied during sync and search time. Props [@felipeelia](https://github.com/felipeelia) and [@MARQAS](https://github.com/MARQAS) via [#3610](https://github.com/10up/ElasticPress/pull/3610) and [#3703](https://github.com/10up/ElasticPress/pull/3703).
* The sync page now describes what triggered the current sync, and previous syncs. Props [@JakePT](https://github.com/JakePT) via [#3722](https://github.com/10up/ElasticPress/pull/3722).
* Weighting and Synonyms Dashboards to multisites. Props [@felipeelia](https://github.com/felipeelia) via [#3724](https://github.com/10up/ElasticPress/pull/3724).
* No-cache headers to sync calls. Props [@felipeelia](https://github.com/felipeelia) via [#3731](https://github.com/10up/ElasticPress/pull/3731).

### Changed
* Abstracted Sync page logic into a provider pattern. Props [@JakePT](https://github.com/JakePT) via [#3630](https://github.com/10up/ElasticPress/pull/3630).
* Moved syncing from an `admin-ajax.php` callback to a custom REST API endpoint with support for additional arguments. Props [@JakePT](https://github.com/JakePT) via [#3643](https://github.com/10up/ElasticPress/pull/3643).
* Store previous syncs info, changed option name from `ep_last_index` to `ep_sync_history`. Props [@felipeelia](https://github.com/felipeelia) and [@JakePT](https://github.com/JakePT) via [#3647](https://github.com/10up/ElasticPress/pull/3647).
* Features settings declared as JSON. Props [@felipeelia](https://github.com/felipeelia) and [@JakePT](https://github.com/JakePT) via [#3655](https://github.com/10up/ElasticPress/pull/3655).
* Tweaked layout and notifications style on the Status Report screen for consistency with the updated Sync page. Props [@JakePT](https://github.com/JakePT) via [#3662](https://github.com/10up/ElasticPress/pull/3662).
* Moved REST API endpoint definitions to controller classes. Props [@JakePT](https://github.com/JakePT) via [#3650](https://github.com/10up/ElasticPress/pull/3650).
* SyncManager array queues are now indexed by the blog ID. Props [@sathyapulse](https://github.com/sathyapulse) and [@felipeelia](https://github.com/felipeelia) via [#3689](https://github.com/10up/ElasticPress/pull/3689).
* Comments and Terms are now hidden by default. Props [@felipeelia](https://github.com/felipeelia) via [#3691](https://github.com/10up/ElasticPress/pull/3691).
* WooCommerce-related hooks are now removed when switching to a site that does not have WC active. Props [@felipeelia](https://github.com/felipeelia) and [@MARQAS](https://github.com/MARQAS) via [#3688](https://github.com/10up/ElasticPress/pull/3688).
* Run e2e tests against the minimum supported WordPress version. Props [@felipeelia](https://github.com/felipeelia) via [#3540](https://github.com/10up/ElasticPress/pull/3540).
* Several tweaks in the Features settings API. Props [@JakePT](https://github.com/JakePT) via [#3708](https://github.com/10up/ElasticPress/pull/3708) and [#3709](https://github.com/10up/ElasticPress/pull/3709).
* EP Settings are now reverted if it is not possible to connect to the new ES Server. Props [@felipeelia](https://github.com/felipeelia), [@burhandodhy](https://github.com/burhandodhy), and [@scottbuscemi](https://github.com/scottbuscemi) via [#3684](https://github.com/10up/ElasticPress/pull/3684).
* Node packages updated. Props [@felipeelia](https://github.com/felipeelia) via [#3706](https://github.com/10up/ElasticPress/pull/3706).
* Updated the labels of feature settings and options for consistency and clarity. Props [@JakePT](https://github.com/JakePT) via [#3721](https://github.com/10up/ElasticPress/pull/3721).
* Depending on the requirements, some feature settings are now saved to be applied after a full sync. Props [@felipeelia](https://github.com/felipeelia) and [@JakePT](https://github.com/JakePT) via [#3720](https://github.com/10up/ElasticPress/pull/3720).
* Minimum requirements. Props [@felipeelia](https://github.com/felipeelia) and [@brandwaffle](https://github.com/brandwaffle) via [#3668](https://github.com/10up/ElasticPress/pull/3668).
* Old features will have their settings displayed based on their default setting values. Props [@felipeelia](https://github.com/felipeelia) and [@JakePT](https://github.com/JakePT) via [#3728](https://github.com/10up/ElasticPress/pull/3728).
* Radio and checkbox settings were changed from booleans to strings. Props [@felipeelia](https://github.com/felipeelia) and [@JakePT](https://github.com/JakePT) via [#3730](https://github.com/10up/ElasticPress/pull/3730).
* The troubleshooting article link was updated. Props [@felipeelia](https://github.com/felipeelia) and [@anjulahettige](https://github.com/anjulahettige) via [#3748](https://github.com/10up/ElasticPress/pull/3748).

### Deprecated
* The `IndexHelper::get_last_index` method was replaced by `IndexHelper::get_last_sync`. See [#3647](https://github.com/10up/ElasticPress/pull/3647).
* The `FailedQueries::maybe_suggest_solution_for_es` method was replaced by `ElasticsearchErrorInterpreter::maybe_suggest_solution_for_es`. See [#3661](https://github.com/10up/ElasticPress/pull/3661).
* `Weighting::render_settings_section`, `Weighting::handle_save`, `Weighting::redirect`, and `Weighting::save_weighting_configuration` were deprecated in favor of React components. See [#3068](https://github.com/10up/ElasticPress/pull/3068).

### Removed
* Users-related files from the main plugin. Props [@felipeelia](https://github.com/felipeelia) via [#3670](https://github.com/10up/ElasticPress/pull/3670).
* Removed mapping files related to older versions of Elasticsearch. Props [@MARQAS](https://github.com/MARQAS) via [#3704](https://github.com/10up/ElasticPress/pull/3704).

### Fixed
* Docblock for the `ep_facet_renderer_class` filter. Props [@misfist](https://github.com/misfist) via [#3696](https://github.com/10up/ElasticPress/pull/3696).
* Instant Results console warning. Props [@burhandodhy](https://github.com/burhandodhy) via [#3687](https://github.com/10up/ElasticPress/pull/3687).
* Total fields limit message interpretation. Props [@felipeelia](https://github.com/felipeelia) [@JakePT](https://github.com/JakePT) via [#3702](https://github.com/10up/ElasticPress/pull/3702).
* End to end tests intermittent failures. Props [@felipeelia](https://github.com/felipeelia) via [#3572](https://github.com/10up/ElasticPress/pull/3572).
* React warning on Sync page. Props [@burhandodhy](https://github.com/burhandodhy) via [#3718](https://github.com/10up/ElasticPress/pull/3718).
* Content was not showing properly on the tooltop on install page. Props [@burhandodhy](https://github.com/burhandodhy) via [#3725](https://github.com/10up/ElasticPress/pull/3725).
* Redirect to correct sync url after enabling feature that requires a new sync. Props [@burhandodhy](https://github.com/burhandodhy) via [#3726](https://github.com/10up/ElasticPress/pull/3726).
* Post type setting wasn't respected during sync. Props [@burhandodhy](https://github.com/burhandodhy) via [#3727](https://github.com/10up/ElasticPress/pull/3727).
* Fix a JS error appearing when sync requests are intentionally stopped. Props [@burhandodhy](https://github.com/burhandodhy) via [#3736](https://github.com/10up/ElasticPress/pull/3736).
* Features description copy. Props [@felipeelia](https://github.com/felipeelia), [@burhandodhy](https://github.com/burhandodhy), and [@MARQAS](https://github.com/MARQAS) via [#3737](https://github.com/10up/ElasticPress/pull/3737).
* Endpoint URL field is not a URL type field. Props [@burhandodhy](https://github.com/burhandodhy) via [#3733](https://github.com/10up/ElasticPress/pull/3733).
* WooCommerce feature not autoactivating. Props [@felipeelia](https://github.com/felipeelia) via [#3739](https://github.com/10up/ElasticPress/pull/3739).
* Elasticsearch errors interpretation. Props [@felipeelia](https://github.com/felipeelia) via [#3741](https://github.com/10up/ElasticPress/pull/3741).
* Deactivating a feature via WP-CLI also takes into account draft states. Props [@felipeelia](https://github.com/felipeelia) via [#3749](https://github.com/10up/ElasticPress/pull/3749).

### Security

## [4.7.2] - 2023-10-10

**Note that starting from the ElasticPress 5.0.0 release the `Users` feature will be moved to the [ElasticPress Labs](https://github.com/10up/ElasticPressLabs) plugin. The `Terms` and `Comments` features will remain in ElasticPress but will be available only if enabled via code. Check [our blog post](https://www.elasticpress.io/blog/2023/03/enabling-comments-and-terms-in-elasticpress-5-0) for more info.**
Expand Down Expand Up @@ -1955,6 +2032,7 @@ This is a bug fix release with some filter additions.
- Initial plugin release

[Unreleased]: https://github.com/10up/ElasticPress/compare/trunk...develop
[5.0.0]: https://github.com/10up/ElasticPress/compare/4.7.2...5.0.0
[4.7.2]: https://github.com/10up/ElasticPress/compare/4.7.1...4.7.2
[4.7.1]: https://github.com/10up/ElasticPress/compare/4.7.0...4.7.1
[4.7.0]: https://github.com/10up/ElasticPress/compare/4.6.1...4.7.0
Expand Down
Loading

0 comments on commit 53338de

Please sign in to comment.