Skip to content

Commit d0c5423

Browse files
committed
Merge branch 'release/2.4.0'
2 parents 91c66e7 + 19d5d6c commit d0c5423

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3261
-2077
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @brandonkelly

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Bug Report
3+
about: Report an issue or unexpected behavior
4+
labels: bug
5+
6+
---
7+
8+
### Description
9+
10+
11+
12+
### Steps to reproduce
13+
14+
1.
15+
2.
16+
17+
### Additional info
18+
19+
- Craft CMS version:
20+
- Webhooks version:
21+
- PHP version:
22+
- Database driver & version:
23+
- Plugins & versions:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature Request
4+
url: https://github.com/craftcms/webhooks/discussions/new?category=ideas
5+
about: Start a new discussion about your idea

CHANGELOG.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
# Release Notes for Webhooks for Craft CMS
22

3+
## 2.4.0 - 2021-08-30
4+
5+
### Added
6+
- Added new “Element is being saved for the first time” and “Element is a provisional draft” webhook filters.
7+
- Some webhook filters now disable other mutually-exclusive filters when active and enabled.
8+
- Pending webhook requests now have a “Send now” button, for manually triggering a webhook if the queue job was lost or failed. ([#35](https://github.com/craftcms/webhooks/issues/35))
9+
- Old webhook request activity is now purged during garbage collection. ([#57](https://github.com/craftcms/webhooks/discussions/57))
10+
- Added the “Initial Delay” setting. ([#53](https://github.com/craftcms/webhooks/discussions/53))
11+
- Added the “Purge Duration” setting.
12+
- Added `craft\webhooks\filters\ExclusiveFilterInterface`.
13+
14+
### Changed
15+
- Webhooks now requires Craft 3.7 or later.
16+
- Webhook request details now use a slideout instead of an HUD.
17+
- Improved the performance of clearing out completed webhook request logs. ([#32](https://github.com/craftcms/webhooks/issues/32))
18+
- Exceptions thrown for webhook requests are now logged.
19+
20+
### Fixed
21+
- Fixed an error that could occur when calling `craft\webhooks\Plugin::getRequestData()` if an invalid request ID was passed.
22+
- Fixed an exception that could occur when retrying webhook requests, if the queue driver didn’t support delayed jobs.
23+
- Fixed an exception that could occur when sending webhook requests, if Guzzle wasn’t able to connect to the server.
24+
- Fixed an error during install, if the database tables already existed. ([#46](https://github.com/craftcms/webhooks/issues/46))
25+
326
## 2.3.3 - 2021-04-01
427

528
### Fixed
6-
- Fixed a MySQL error that could occur with a large webhook response body.
29+
- Fixed a MySQL error that could occur with a large webhook response body.
730

831
## 2.3.2 - 2020-06-27
932

@@ -38,7 +61,7 @@
3861

3962
### Added
4063
- Webhooks for element events can now be executed depending on whether the element is new, is a draft/revision, or is being duplicated/propagated/bulk-resaved. ([#14](https://github.com/craftcms/webhooks/issues/14))
41-
- Modules and plugins can register additional webhook filters using the new `craft\webhooks\Plugin::EVENT_REGISTER_FILTER_TYPES` event.
64+
- Modules and plugins can register additional webhook filters using the new `craft\webhooks\Plugin::EVENT_REGISTER_FILTER_TYPES` event.
4265

4366
### Fixed
4467
- Fixed an error that could occur when detecting available component classes in Craft 3.2.
@@ -64,7 +87,7 @@
6487
## 1.1.2 - 2018-12-21
6588

6689
### Changed
67-
- Webhook requests now include data for any magic event properties defined by `fields()`, if the event class implements `yii\base\Arrayable`. ([#2](https://github.com/craftcms/webhooks/issues/2))
90+
- Webhook requests now include data for any magic event properties defined by `fields()`, if the event class implements `yii\base\Arrayable`. ([#2](https://github.com/craftcms/webhooks/issues/2))
6891

6992
## 1.1.1 - 2018-12-17
7093

@@ -79,7 +102,7 @@
79102
### Added
80103
- Added support for webhooks that send GET requests.
81104
- Webhook names and group names can now contain emojis, even if using MySQL.
82-
- Typing `->` or `=>` into a webhook’s Name field now creates a ➡️.
105+
- Typing `->` or `=>` into a webhook’s Name field now creates a ➡️.
83106

84107
## 1.0.1 - 2018-12-13
85108

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ It can be used to integrate your Craft project with task automation tools like [
88

99
## Requirements
1010

11-
This plugin requires Craft CMS 3.1.19 or later.
11+
This plugin requires Craft CMS 3.7 or later.
1212

1313
## Installation
1414

1515
You can install this plugin from the Plugin Store or with Composer.
1616

1717
#### From the Plugin Store
1818

19-
Go to the Plugin Store in your project’s Control Panel and search for “Webhooks”. Then click on the “Install” button in its modal window.
19+
Go to the Plugin Store in your project’s Control Panel and search for “Webhooks”. Then press **Install** in its modal window.
2020

2121
#### With Composer
2222

@@ -35,22 +35,26 @@ composer require craftcms/webhooks
3535

3636
## Configuration
3737

38-
To configure Webhooks, create a `config/webhooks.php` file, which returns an array.
38+
To configure Webhooks, go to **Settings****Webhooks**, or create a `config/webhooks.php` file, which returns an array.
3939

4040
```php
4141
<?php
4242
return [
4343
'maxDepth' => 10,
4444
'maxAttempts' => 3,
45+
'initialDelay' => null,
4546
'retryDelay' => 120,
47+
'purgeDuration' => 604800, // 7 days
4648
];
4749
```
4850

4951
The array can define the following keys:
5052

5153
- `maxDepth` – The maximum depth that the plugin should go into objects/arrays when converting them to arrays for event payloads. (Default is `5`.)
5254
- `maxAttempts` – The maximum number of attempts each webhook should have before giving up, if the requests are coming back with non 2xx responses. (Default is `1`.)
55+
- `initialDelay` – The delay (in seconds) that initial webhook request attempts should have.
5356
- `retryDelay` – The delay (in seconds) between webhook attempts. (Default is `60`.)
57+
- `purgeDuration` – The time (in seconds) that request history should be saved in the database before being deletable via garbage collection.
5458

5559
## Managing Webhooks
5660

composer.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "craftcms/webhooks",
33
"description": "Post webhooks when events are triggered in Craft CMS.",
4-
"version": "2.3.3",
4+
"version": "2.4.0",
55
"type": "craft-plugin",
66
"keywords": [
77
"html",
@@ -25,13 +25,19 @@
2525
"rss": "https://github.com/craftcms/webhooks/commits/master.atom"
2626
},
2727
"require": {
28-
"craftcms/cms": "^3.1.19"
28+
"craftcms/cms": "^3.7.0"
29+
},
30+
"require-dev": {
31+
"phpstan/phpstan": "^0.12.96"
2932
},
3033
"autoload": {
3134
"psr-4": {
3235
"craft\\webhooks\\": "src/"
3336
}
3437
},
38+
"scripts": {
39+
"phpstan": "phpstan --memory-limit=1G"
40+
},
3541
"extra": {
3642
"name": "Webhooks",
3743
"handle": "webhooks",

0 commit comments

Comments
 (0)