Skip to content

Commit 3a01115

Browse files
John Spellmanpwtyler
authored andcommitted
CONTRIBUTING.md updates (#252)
* update contrib.md and version number * use correct pr number * fix lint error introduced in #249
1 parent aaa97f7 commit 3a01115

4 files changed

Lines changed: 44 additions & 17 deletions

File tree

CONTRIBUTING.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,34 @@ Behat requires a Pantheon site. Once you've created the site, you'll need [insta
2121

2222
## Workflow
2323

24-
The `develop` branch is the development branch which means it contains the next version to be released. `main` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`.
24+
Development and releases are structured around two branches, `develop` and `main`. The `develop` branch is the default branch for the repository, and is the source and destination for feature branches.
25+
26+
We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `develop` when merging, and to include the PR # in the commit message. PRs to `develop` should also include any relevent updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `develop`.
27+
28+
`develop` should be stable and usable, though possibly a few commits ahead of the public release on wp.org.
29+
30+
The `main` branch matches the latest stable release deployed to [wp.org](wp.org).
2531

2632
## Release Process
2733

28-
1. Starting from `develop`, cut a release branch named `release_X.Y.Z` containing your changes.
29-
1. Update plugin version in `package.json`, `README.md`, `readme.txt`, and `pantheon-sessions.php`.
30-
1. Update the Changelog with the latest changes.
31-
1. Create a PR against the `main` branch.
32-
1. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into `main`.
33-
1. Pull `main` locally, create a new tag, and push up.
34-
1. (Optional) Download the zipped asset from the release and unzip locally, confirming that the expected files are present (and unexpected files, e.g. files outlined in [.gitattributes](https://github.com/pantheon-systems/wp-native-php-sessions/blob/main/.gitattributes) are omitted).
35-
1. Create a [new release](https://github.com/pantheon-systems/wp-native-php-sessions/releases/new) using the tag created in the previous steps, naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues if applicable.
36-
1. Wait for the [_Release wp-native-php-sessions plugin to wp.org_ action](https://github.com/pantheon-systems/wp-native-php-sessions/actions/workflows/wordpress-plugin-deploy.yml) 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.
37-
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/wp-native-php-sessions/. This may take a few minutes.
34+
1. From `develop`, checkout a new branch `release_X.Y.Z`.
35+
1. Make a release commit:
36+
* Drop the `-dev` from the version number in `README.md`, `readme.txt`, and `pantheon-sessions.php`.
37+
* Update the "Latest" heading in the changelog to the new version number with the date
38+
* Commit these changes with the message `Release X.Y.Z`
39+
* Push the release branch up.
40+
1. Open a Pull Request to merge `release_X.Y.Z` into `main`. Your PR should consist of all commits to `develop` since the last release, and one commit to update the version number. The PR name should also be `Release X.Y.Z`.
41+
1. After all tests pass and you have received approval from a [CODEOWNER](./CODEOWNERS), merge the PR into `main`. "Rebase and merge" is preferred in this case. _Never_ squash to `main`.
42+
1. Pull `main` locally, create a new tag (based on version number from previous steps), and push up. The tag should _only_ be the version number. It _should not_ be prefixed `v` (i.e. `X.Y.Z`, not `vX.Y.X`).
43+
1. Confirm that the necessary assets are present in the newly created tag, and test on a WP install if desired.
44+
1. Create a [new release](https://github.com/pantheon-systems/wp-native-php-sessions/releases/new) using the tag created in the previous steps, naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from the `Changelog` section of [the readme](readme.txt) into the body of the release, including the links to the closed issues if applicable.
45+
1. Wait for the [_Release wp-native-php-sessions plugin to wp.org_ action](https://github.com/pantheon-systems/wp-native-php-sessions/actions/workflows/wordpress-plugin-deploy.yml) to finish deploying to the WordPress.org plugin repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
46+
1. Check WordPress.org: Ensure that the changes are live on [the plugin repository](https://wordpress.org/plugins/native-php-sessions/). This may take a few minutes.
47+
1. Following the release, prepare the next dev version with the following steps:
48+
* `git checkout develop`
49+
* `git rebase main`
50+
* Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new verison will be `1.2.4-dev`)
51+
* Add a new `** Latest **` heading to the changelog
52+
* `git add -A .`
53+
* `git commit -m "Prepare X.Y.X-dev"`
54+
* `git push origin develop`

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Tags:** comments, sessions
44
**Requires at least:** 4.7
55
**Tested up to:** 6.2
6-
**Stable tag:** 1.3.5
6+
**Stable tag:** 1.3.6-dev
77
**Requires PHP:** 5.4
88
**License:** GPLv2 or later
99
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
@@ -71,6 +71,11 @@ This mu-plugin will load WP Native PHP Sessions before all other plugins, while
7171

7272
## Changelog ##
7373

74+
### Latest ###
75+
* Update CONTRIBUTING.md [[#252](https://github.com/pantheon-systems/wp-native-php-sessions/pull/252)].
76+
* Update informational Error message for the case of headers already sent [[#249](https://github.com/pantheon-systems/wp-native-php-sessions/pull/249)].
77+
* Add pantheon-wp-coding-standards [[#247](https://github.com/pantheon-systems/wp-native-php-sessions/pull/247)].
78+
7479
### 1.3.5 (April 7, 2023) ###
7580
* Bump yoast/phpunit-polyfills from 1.0.4 to 1.0.5 [[#245](https://github.com/pantheon-systems/wp-native-php-sessions/pull/245)].
7681
* Bump tested up to version

pantheon-sessions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* Plugin Name: Native PHP Sessions for WordPress
4-
* Version: 1.3.5
4+
* Version: 1.3.6-dev
55
* Description: Offload PHP's native sessions to your database for multi-server compatibility.
66
* Author: Pantheon
77
* Author URI: https://www.pantheon.io/
@@ -13,7 +13,7 @@
1313

1414
use Pantheon_Sessions\Session;
1515

16-
define( 'PANTHEON_SESSIONS_VERSION', '1.3.5' );
16+
define( 'PANTHEON_SESSIONS_VERSION', '1.3.6-dev' );
1717

1818
/**
1919
* Main controller class for the plugin.
@@ -164,9 +164,9 @@ private function initialize_session_override() {
164164
require_once __DIR__ . '/inc/class-session-handler.php';
165165
$session_handler = new Pantheon_Sessions\Session_Handler();
166166
if ( PHP_SESSION_ACTIVE !== session_status() ) {
167-
// Check if headers have already been sent
167+
// Check if headers have already been sent.
168168
if ( headers_sent( $file, $line ) ) {
169-
// Output a friendly error message if headers are already sent
169+
// Output a friendly error message if headers are already sent.
170170
trigger_error(
171171
sprintf(
172172
/* translators: %1s: File path, %2d: Line number */

readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: getpantheon, outlandish josh, mpvanwinkle77, danielbachhuber, andr
33
Tags: comments, sessions
44
Requires at least: 4.7
55
Tested up to: 6.2
6-
Stable tag: 1.3.5
6+
Stable tag: 1.3.6-dev
77
Requires PHP: 5.4
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -69,6 +69,11 @@ To fix, create a new file at `wp-content/mu-plugins/000-loader.php` and include
6969
This mu-plugin will load WP Native PHP Sessions before all other plugins, while letting you still use the WordPress plugin updater to keep the plugin up-to-date.
7070

7171
== Changelog ==
72+
= Latest =
73+
* Update CONTRIBUTING.md [[#252](https://github.com/pantheon-systems/wp-native-php-sessions/pull/252)].
74+
* Update informational Error message for the case of headers already sent [[#249](https://github.com/pantheon-systems/wp-native-php-sessions/pull/249)].
75+
* Add pantheon-wp-coding-standards [[#247](https://github.com/pantheon-systems/wp-native-php-sessions/pull/247)].
76+
7277
= 1.3.5 (April 7, 2023) =
7378
* Bump yoast/phpunit-polyfills from 1.0.4 to 1.0.5 [[#245](https://github.com/pantheon-systems/wp-native-php-sessions/pull/245)].
7479
* Bump tested up to version

0 commit comments

Comments
 (0)