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 Mar 2, 2023
2 parents a6a0b90 + 13962ef commit 6e8f97a
Show file tree
Hide file tree
Showing 32 changed files with 5,410 additions and 797 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
/.eslintrc.json export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.husky export-ignore
/.lintstagedrc.json export-ignore
/.npmrc export-ignore
/.nvmrc export-ignore
/.stylelintignore export-ignore
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,22 @@ jobs:
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
- name: Prepare composer cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE }}
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ env.COMPOSER_VERSION }}-
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.0'
tools: cs2pr
coverage: none

- name: composer install
run: composer install

- name: PHPCS check
uses: chekalsky/phpcs-action@v1
with:
enable_warnings: true
phpcs_bin_path: './vendor/bin/phpcs . --runtime-set testVersion 7.0-'
run: './vendor/bin/phpcs . -q --report=checkstyle --runtime-set testVersion 7.0- | cs2pr'
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Setup Elasticsearch
uses: getong/[email protected]
with:
elasticsearch version: '7.5.0'

- name: Set standard 10up cache directories
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release
vendor
.idea
*.log
.phpunit.result.cache

# Editors
*.esproj
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased]

<!--
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
-->

## [2.1.0] - 2023-03-02

### Added
- Compatibility with the [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/) add-on. Props [@ecaron](https://github.com/ecaron) and [@felipeelia](https://github.com/felipeelia) via [#51](https://github.com/10up/ElasticPressLabs/pull/51).
- Users Feature (migrated from the main ElasticPress plugin). Props [@felipeelia](https://github.com/felipeelia), [@MARQAS](https://github.com/MARQAS), and [@burhandodhy](https://github.com/burhandodhy) via [#50](https://github.com/10up/ElasticPressLabs/pull/50) and [#59](https://github.com/10up/ElasticPressLabs/pull/50).
- Load PHP classes via `spl_autoload_register()`. Props [@burhandodhy](https://github.com/burhandodhy) via [#57](https://github.com/10up/ElasticPressLabs/pull/57).

## Changed
- Code standards are now applied to the test suite too. Props [@felipeelia](https://github.com/felipeelia) via [#54](https://github.com/10up/ElasticPressLabs/pull/54).
- Hide subfeatures if the required plugins are not activated. Props [@burhandodhy](https://github.com/burhandodhy) via [#56](https://github.com/10up/ElasticPressLabs/pull/56).

### Fixed
- Adjusted the method used to determine if classes are loaded. Props [@ecaron](https://github.com/ecaron) via [#51](https://github.com/10up/ElasticPressLabs/pull/51).
- Ensure feature classes are only loaded once. Props [@ecaron](https://github.com/ecaron) via [#43](https://github.com/10up/ElasticPressLabs/pull/43).
- PHP Lint on PHP 8. Props [@felipeelia](https://github.com/felipeelia) via [#49](https://github.com/10up/ElasticPressLabs/pull/49).

### Security
- Bumped `loader-utils` from 2.0.2 to 2.0.4. Props [@dependabot](https://github.com/dependabot) via [#46](https://github.com/10up/ElasticPressLabs/pull/46).
- Bumped `json5` from 1.0.1 to 1.0.2. Props [@dependabot](https://github.com/dependabot) via [#47](https://github.com/10up/ElasticPressLabs/pull/46).

## [2.0.0] - 2022-10-17

### Added
Expand Down Expand Up @@ -41,6 +70,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- Initial plugin release.

[Unreleased]: https://github.com/10up/ElasticPressLabs/compare/trunk...develop
[2.1.0]: https://github.com/10up/ElasticPressLabs/compare/2.0.0...2.1.0
[2.0.0]: https://github.com/10up/ElasticPressLabs/compare/1.2.0...2.0.0
[1.2.0]: https://github.com/10up/ElasticPressLabs/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/10up/ElasticPressLabs/compare/1.0.0...1.1.0
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ For more on how 10up writes and manages code, check out our [10up Engineering Be

## Workflow

The `develop` branch is the development branch which means it contains the next version to be released. `trunk` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`.
The `develop` branch is the development branch which means it contains the next version to be released. `trunk` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`.

## Release instructions

1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes.
1. Version bump: Bump the version number in `elasticpresslabs.php`, `/languages/ElasticPressLabs.pot`, `package-lock.json`, `package.json`, `readme.txt`, and any other relevant files if it does not already reflect the version being released. In `elasticpresslabs.php` update both the plugin "Version:" property and the plugin `ELASTICPRESS_LABS_VERSION` constant.
1. Changelog: Add/update the changelog in `CHANGELOG.md` and `readme.txt`, ensuring to link the [X.Y.Z] release reference in the footer of `CHANGELOG.md` (e.g., https://github.com/10up/ElasticPressLabs/compare/X.Y.Z-1...X.Y.Z).
1. Props: Update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
1. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
1. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
1. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`.
1. Merge: Merge the release branch/PR into `develop`, then make a non-fast-forward merge from `develop` into `trunk` (`git checkout trunk && git merge --no-ff develop`). `trunk` contains the stable development version.
1. POT file: Run `wp i18n make-pot . languages/ElasticPressLabs.pot` and commit the file. In case of errors, try to disable Xdebug (see [#3079](https://github.com/10up/ElasticPress/pull/3079#issuecomment-1291028290).)
1. Release date: Double check the release date in both changelog files.
1. Merge: Merge the release branch/PR into `develop`, then make a non-fast-forward merge from `develop` into `trunk` (`git checkout trunk && git merge --no-ff develop`). `trunk` contains the stable development version.
1. Test: While still on the `trunk` branch, test for functionality locally.
1. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`).
1. Release: Create a [new release](https://github.com/10up/elasticpresslabs/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the release changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the [milestone](https://github.com/10up/elasticpresslabs/milestone/#?closed=1).
1. SVN: Wait for the [GitHub Action](https://github.com/10up/ElasticPresslabs/actions) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/elasticpresslabs/. This may take a few minutes.
1. Close milestone: Edit the [milestone](https://github.com/10up/elasticpresslabs/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
1. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.

Expand All @@ -53,12 +53,12 @@ There may be cases where we have an urgent/important fix that ideally gets into
1. Props: Update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
1. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
1. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`.
1. POT file: Run `wp i18n make-pot . lang/elasticpress.pot` and commit the file.
1. Release date: Double check the release date in both changelog files.
1. Merge: Merge the release branch/PR into `trunk`. `trunk` contains the stable development version.
1. Test: While still on the `trunk` branch, test for functionality locally.
1. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`).
1. Release: Create a [new release](https://github.com/10up/elasticpresslabs/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the release changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the [milestone](https://github.com/10up/elasticpresslabs/milestone/#?closed=1).
1. SVN: Wait for the [GitHub Action](https://github.com/10up/ElasticPressLabs/actions) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/elasticpresslabs/. This may take a few minutes.
1. Close milestone: Edit the [milestone](https://github.com/10up/elasticpresslabs/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
1. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the hotfix release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.
1. Apply hotfix changes to `develop`: Make a non-fast-forward merge from `trunk` into `develop` (`git checkout develop && git merge --no-ff trunk`) to ensure your hotfix change(s) are in sync with active development.
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Thank you to all the people who have already contributed to this repository via
[Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez),
[Burhan Nasir (@burhandodhy)](https://github.com/burhandodhy),
[Mohammed Razzaq (@MARQAS)](https://github.com/MARQAS),
[Eric Caron (@ecaron)](https://github.com/ecaron),
and
[Felipe Elia (@felipeelia)](https://github.com/felipeelia).

Expand Down
34 changes: 25 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,45 @@
}
],
"require": {
"php": ">=7.0"
"php": "^7.0|^8.0"
},
"autoload": {
"psr-4": {
"ElasticPressLabs\\": "includes/classes/"
}
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"require-dev": {
"phpunit/phpunit": "^7",
"10up/wp_mock": "dev-master",
"phpunit/phpunit": "^9",
"10up/wp_mock": "dev-trunk",
"10up/phpcs-composer": "dev-master",
"10up/elasticpress": "*",
"yoast/phpunit-polyfills": "^1.0"
"10up/elasticpress": "dev-develop",
"yoast/phpunit-polyfills": "^1.0",
"wpackagist-plugin/woocommerce": "*"
},
"scripts": {
"lint": "phpcs .",
"lint-fix": "phpcbf .",
"lint": "phpcs . --runtime-set testVersion 7.0-",
"lint-fix": "phpcbf . --runtime-set testVersion 7.0-",
"test": "phpunit",
"setup-local-tests": "bash bin/install-wp-tests.sh epl_wp_test root password mysql trunk true"
"setup-local-tests": "bash bin/install-wp-tests.sh epl_wp_test root password 127.0.0.1 latest true"
},
"extra": {
"installer-paths": {
"vendor/{$name}/": [
"type:wordpress-plugin",
"type:wordpress-theme"
]
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true
}
}
}
Loading

0 comments on commit 6e8f97a

Please sign in to comment.