|
| 1 | +# Deployment Guide |
| 2 | + |
| 3 | +This document describes the workflow for deploying a PHP SDK update on GitHub. |
| 4 | + |
| 5 | +## Merge Pull Requests |
| 6 | + |
| 7 | +Merge the approved Pull Request(s) to the `main` branch. |
| 8 | + |
| 9 | +An *approved* Pull Request is when a PR passes all tests **and** has been approved by **one or more** reviewers. |
| 10 | + |
| 11 | +## Update the PHP SDK's Version Number |
| 12 | + |
| 13 | +We follow [Semantic Versioning](https://semver.org/). |
| 14 | + |
| 15 | +- In `src/ConvertKit_API.php`, change the `const VERSION` to the new version number. |
| 16 | + |
| 17 | +## Run phpDocumentor |
| 18 | + |
| 19 | +We use [phpDocumentor](https://www.phpdoc.org/) to automatically generate the [PHP SDK documentation](./docs/classes/ConvertKit_API/ConvertKit_API.md). |
| 20 | + |
| 21 | +In a Terminal window, run the phpDocumentor command to generate documentation in markdown format: |
| 22 | + |
| 23 | +```bash |
| 24 | +phpDocumentor --directory=src --target=docs --template="vendor/saggre/phpdocumentor-markdown/themes/markdown" |
| 25 | +``` |
| 26 | + |
| 27 | +## Commit Changes |
| 28 | + |
| 29 | +Commit the updated files, which should comprise of: |
| 30 | + |
| 31 | +- `src/ConvertKit_API.php` |
| 32 | +- `docs/classes/ConvertKit_API/ConvertKit_API.md` |
| 33 | + |
| 34 | +## Create a New Release |
| 35 | + |
| 36 | +[Create a New Release](https://github.com/ConvertKit/convertkitsdk-php/releases/new), completing the following: |
| 37 | + |
| 38 | +- Choose a tag: Click this button and enter the new version number (e.g. `1.0`) |
| 39 | +- Release title: The version number (e.g. `1.0`) |
| 40 | +- Describe this release: Add a changelog detailing the applicable changes this version introduces, with a link to each PR, using the below template |
| 41 | + |
| 42 | +``` |
| 43 | +# Deprecations / Notices |
| 44 | +
|
| 45 | +- PHP: Minimum supported version is now `7.4` |
| 46 | +- `add_tag()` will trigger an `E_USER_NOTICE`, as the method name is misleading, and we prefer methods with named arguments; use `tag_subscribe()` (#44) |
| 47 | +- `form_subscribe()` will trigger an `E_USER_NOTICE`, as we prefer methods with named arguments; use `add_subscriber_to_form()` (#54) |
| 48 | +- `form_unsubscribe()` will trigger an `E_USER_NOTICE`, as the method name is misleading, and we prefer methods with named arguments; use `unsubscribe()` (#45) |
| 49 | +
|
| 50 | +# Features / Additions |
| 51 | +
|
| 52 | +- Added User-Agent on API requests (#34) |
| 53 | +- Added `get()`, `post()`, `put()` and `delete()` methods (#36) |
| 54 | +- Added `get_forms()` and `get_landing_pages()` methods (#41) |
| 55 | +- Added `get_form_subscriptions()` method (#42) |
| 56 | +- Added Tag methods `get_tags()`, `create_tag()`, `tag_subscriber()`, `remove_tag_from_subscriber()`, `remove_tag_from_subscriber_by_email()` (#44) |
| 57 | +- Added Subscriber methods `update_subscriber()`, `unsubscribe()` (#45) |
| 58 | +- Added `add_subscriber_to_sequence()` to support name, custom fields and tags (#43) |
| 59 | +- Added Custom Field methods `get_custom_fields()`, `add_custom_field()`, `add_custom_fields()`, `update_custom_field()`, `delete_custom_field()` (#46) |
| 60 | +- Added Purchase method `get_purchase()` (#47) |
| 61 | +- Added Webhook methods `create_webhook()`, `destroy_webhook() (#48) |
| 62 | +- Added Broadcast methods `create_broadcast()`, `get_broadcast()`, `get_broadcast_stats()`, `update_broadcast()`, `destroy_broadcast()` |
| 63 | +
|
| 64 | +# Fixes / Improvements |
| 65 | +
|
| 66 | +- Fixed: Guzzle version set to 6.5 or higher (#20, #26, #27) |
| 67 | +- Fixed: `get_subscriber_id()` performance (#21, #22, #29, #39) |
| 68 | +- Refactored: fetching legacy forms and landing pages (#32) |
| 69 | +- Refactored: using `api_version` property, API calls and logging (#37, #38) |
| 70 | +- Removed: Caching of resources and markup in class life cycle (#52) |
| 71 | +- Removed: `InvalidArgumentException` where type hints for methods now exist (#43) |
| 72 | +
|
| 73 | +# Testing |
| 74 | +- Added PHPStan static analysis (#40) |
| 75 | +- Added PSR-12 coding standards with some modifications (#33) |
| 76 | +- Updated PHPUnit test coverage (#30, #35) |
| 77 | +``` |
| 78 | + |
| 79 | +Generic changelog items such as `Fix: Various bugfixes` or `Several edge-case bug fixes` should be avoided. They don't tell users (or us, as developers) |
| 80 | +what took place in this version. |
| 81 | + |
| 82 | +Each line in the changelog should start with `Added` or `Fix`. |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +## Publish the Release |
| 87 | + |
| 88 | +When you're happy with the above, click `Publish Release`. |
| 89 | + |
| 90 | +This will then make the release available to developers, who can include it manually or using composer. |
| 91 | + |
| 92 | +The release will also be available to view on the [Releases](https://github.com/ConvertKit/convertkitsdk-php/releases) section of this GitHub repository. |
0 commit comments