Skip to content

Commit 5917a94

Browse files
authored
Always exclude topicName from webhook POST/PUT body (#174)
1 parent 9f910e5 commit 5917a94

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
9+
## [v11.0.1] - 2024-03-19
10+
### Fixes
11+
- Fixed a bug when configuring EventHub webhooks using `php artisan eventhub:webhook:configure`.
12+
913
## [v11.0.0] - 2024-03-18
1014
### Changed
1115
- Dropped support for PHP 8.1.
@@ -25,6 +29,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2529
- A number of issues with incorrect types have been corrected.
2630
- The `eventhub:queue:status` artisan command was broken on current versions of Laravel. This has been corrected.
2731

32+
## [v9.1.1] - 2024-02-19
33+
This is a backport release to support apps still using PHP 8.1.
34+
35+
### Fixes
36+
- Fixed a bug when configuring EventHub webhooks using `php artisan eventhub:webhook:configure`.
37+
2838
## [v9.1.0] - 2023-10-12
2939

3040
### Added

src/Console/Commands/EventHub/WebhookConfiguration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ protected function createOrUpdate($hook, $registered_hooks)
7474
{
7575
$topicName = $hook['topicName'];
7676

77+
// Not allowed in the POST/PUT body
78+
unset($hook['topicName']);
79+
7780
try {
7881
// If the hook exists on EventHub already, we don't need to touch the 'active' status.
7982
// But, new ones will require it.
8083
if (in_array($hook['topicName'], $registered_hooks) === false) {
81-
// Not permitted in creates since Jan 2022 (but fine for updates)
82-
unset($hook['topicName']);
83-
8484
$hook['active'] = true;
8585

8686
$this->webhook_api->create($topicName, $hook);

0 commit comments

Comments
 (0)