Skip to content

Commit 5b8c498

Browse files
Merge branch 'release/9.0.2'
2 parents e2a3164 + 82a2d78 commit 5b8c498

21 files changed

+486
-461
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"require": {
77
"php": "^7.4 | ^8.0",
88
"composer-runtime-api": "^2.0",
9-
"brianhenryie/strauss": "^0.19.1",
9+
"brianhenryie/strauss": "^0.19.4",
1010
"enshrined/svg-sanitize": "^0.16.0",
1111
"micropackage/ajax": "^1.0",
1212
"micropackage/cache": "^1.0",
@@ -63,7 +63,7 @@
6363
"classmap_prefix": "BracketSpace_Notification_Dependencies_",
6464
"exclude_from_prefix": {
6565
"file_patterns": [
66-
"compat/src-deprecated/helpers.php"
66+
"#compat\/src-deprecated\/helpers.php#"
6767
]
6868
}
6969
}
@@ -72,7 +72,7 @@
7272
"phpcbf": "phpcbf --parallel=4",
7373
"phpcs": "phpcs --parallel=4",
7474
"phplint": "parallel-lint --exclude node_modules --exclude vendor --exclude dependencies .",
75-
"phpstan": "phpstan analyze --memory-limit=-1",
75+
"phpstan": "phpstan analyze --memory-limit=-1 -v",
7676
"generate-stubs": "generate-stubs --finder=compat/stub-finder.php --out=compat/stubs.php --force",
7777
"prefix-namespaces-dev": [
7878
"strauss",

composer.lock

Lines changed: 370 additions & 329 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

notification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Description: Customisable email and webhook notifications with powerful developer friendly API for custom triggers and notifications. Send alerts easily.
55
* Author: BracketSpace
66
* Author URI: https://bracketspace.com
7-
* Version: 9.0.1
7+
* Version: 9.0.2
88
* Requires PHP: 7.4
99
* Requires at least: 5.8
1010
* License: GPL3

phpstan-baseline.neon

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,11 +1580,6 @@ parameters:
15801580
count: 1
15811581
path: src/Repository/MergeTag/Taxonomy/TermSlug.php
15821582

1583-
-
1584-
message: "#^Parameter \\#1 \\$url of function esc_url expects string, mixed given\\.$#"
1585-
count: 1
1586-
path: src/Repository/MergeTag/UrlTag.php
1587-
15881583
-
15891584
message: "#^Parameter \\#1 \\$triggerPropertyName of method BracketSpace\\\\Notification\\\\Repository\\\\MergeTag\\\\BaseMergeTag\\:\\:setTriggerProp\\(\\) expects string, mixed given\\.$#"
15901585
count: 1
@@ -1915,11 +1910,6 @@ parameters:
19151910
count: 1
19161911
path: src/Repository/Trigger/User/UserPasswordChanged.php
19171912

1918-
-
1919-
message: "#^Cannot access property \\$data on WP_User\\|false\\.$#"
1920-
count: 1
1921-
path: src/Repository/Trigger/User/UserPasswordResetRequest.php
1922-
19231913
-
19241914
message: "#^Argument of an invalid type array\\|false supplied for foreach, only iterables are supported\\.$#"
19251915
count: 1
@@ -2020,21 +2010,6 @@ parameters:
20202010
count: 1
20212011
path: src/Store/Trigger.php
20222012

2023-
-
2024-
message: "#^Cannot access offset 'host' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#"
2025-
count: 1
2026-
path: src/Utils/Settings.php
2027-
2028-
-
2029-
message: "#^Cannot access offset 'path' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#"
2030-
count: 3
2031-
path: src/Utils/Settings.php
2032-
2033-
-
2034-
message: "#^Cannot access offset 'scheme' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#"
2035-
count: 1
2036-
path: src/Utils/Settings.php
2037-
20382013
-
20392014
message: "#^Cannot access offset mixed on mixed\\.$#"
20402015
count: 2

readme.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: notification, bracketspace, Kubitomakita, tomaszadamowicz, insejn,
33
Tags: notification, notify, alert, email, mail, webhook, API, developer, framework
44
Requires at least: 4.9
55
Tested up to: 6.6
6-
Stable tag: 9.0.1
6+
Stable tag: 9.0.2
77
Requires PHP: 7.4
88
License: GPLv3
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -297,6 +297,14 @@ Yes! We're offering a [custom plugin development](https://bracketspace.com/custo
297297

298298
== Changelog ==
299299

300+
= 9.0.2 =
301+
* [Fixed] WP CLI add command function is not giving warnings anymore.
302+
* [Fixed] Comment author email and display name merge tags.
303+
* [Fixed] Do not escape HTML entities in URL merge tags.
304+
* [Fixed] Fix user password setup link and user password reset link resolvers.
305+
* [Fixed] Post triggers various user merge tags.
306+
* [Fixed] Comment triggers post author merge tags.
307+
300308
= 9.0.1 =
301309
* [Changed] Notification data is now kept in the wp_posts table for easier reverting to previous version.
302310

src/Admin/Wizard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ private function saveOptionToDismissWizard()
347347
if (get_option($this->dismissedOption) !== false) {
348348
update_option($this->dismissedOption, true);
349349
} else {
350-
add_option($this->dismissedOption, true, '', 'no');
350+
add_option($this->dismissedOption, true, '', false);
351351
}
352352
}
353353

src/Repository/MergeTag/UrlTag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public function validate($value)
4141
*/
4242
public function sanitize($value)
4343
{
44-
return esc_url($value);
44+
return is_string($value) ? esc_url_raw($value) : '';
4545
}
4646
}

src/Repository/MergeTag/User/UserPasswordResetLink.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct($params = [])
5757
sprintf(
5858
'wp-login.php?action=rp&key=%s&login=%s',
5959
$trigger->{$this->keyPropertyName},
60-
rawurlencode($trigger->{$this->getTriggerProp()}->data->user_login)
60+
rawurlencode($trigger->{$this->getTriggerProp()}->user_login)
6161
)
6262
);
6363
},

src/Repository/Trigger/Comment/CommentReplied.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public function context($commentNewStatus, $commentOldStatus, $comment)
101101
$this->parentCommentUserObject = new \StdClass();
102102
$this->parentCommentUserObject->ID = ($this->parentComment->user_id)
103103
? ($this->parentComment->user_id) : 0;
104-
$this->parentCommentUserObject->displayName = $this->parentComment->comment_author;
105-
$this->parentCommentUserObject->userEmail = $this->parentComment->comment_author_email;
104+
$this->parentCommentUserObject->display_name = $this->parentComment->comment_author;
105+
$this->parentCommentUserObject->user_email = $this->parentComment->comment_author_email;
106106

107107
parent::assignProperties();
108108
}

src/Repository/Trigger/Comment/CommentTrigger.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public function assignProperties()
110110
$this->userObject = new \StdClass();
111111
$this->userObject->ID = ($this->comment->user_id)
112112
? ($this->comment->user_id) : 0;
113-
$this->userObject->displayName = $this->comment->comment_author;
114-
$this->userObject->userEmail = $this->comment->comment_author_email;
113+
$this->userObject->display_name = $this->comment->comment_author;
114+
$this->userObject->user_email = $this->comment->comment_author_email;
115115

116116
$this->post = get_post((int)$this->comment->comment_post_ID);
117117

@@ -302,7 +302,7 @@ public function mergeTags()
302302
'slug' => 'post_author_user_ID',
303303
// Translators: singular post name.
304304
'name' => sprintf(__('%s author user ID', 'notification'), __('Post', 'notification')),
305-
'property_name' => 'post_author',
305+
'property_name' => 'postAuthor',
306306
// Translators: Post type name.
307307
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
308308
]
@@ -315,7 +315,7 @@ public function mergeTags()
315315
'slug' => 'post_author_user_login',
316316
// Translators: singular post name.
317317
'name' => sprintf(__('%s author user login', 'notification'), __('Post', 'notification')),
318-
'property_name' => 'post_author',
318+
'property_name' => 'postAuthor',
319319
// Translators: Post type name.
320320
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
321321
]
@@ -328,7 +328,7 @@ public function mergeTags()
328328
'slug' => 'post_author_user_email',
329329
// Translators: singular post name.
330330
'name' => sprintf(__('%s author user email', 'notification'), __('Post', 'notification')),
331-
'property_name' => 'post_author',
331+
'property_name' => 'postAuthor',
332332
// Translators: Post type name.
333333
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
334334
]
@@ -341,7 +341,7 @@ public function mergeTags()
341341
'slug' => 'post_author_user_nicename',
342342
// Translators: singular post name.
343343
'name' => sprintf(__('%s author user nicename', 'notification'), __('Post', 'notification')),
344-
'property_name' => 'post_author',
344+
'property_name' => 'postAuthor',
345345
// Translators: Post type name.
346346
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
347347
]
@@ -354,7 +354,7 @@ public function mergeTags()
354354
'slug' => 'post_author_user_nickname',
355355
// Translators: singular post name.
356356
'name' => sprintf(__('%s author user nickname', 'notification'), __('Post', 'notification')),
357-
'property_name' => 'post_author',
357+
'property_name' => 'postAuthor',
358358
// Translators: Post type name.
359359
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
360360
]
@@ -367,7 +367,7 @@ public function mergeTags()
367367
'slug' => 'post_author_user_display_name',
368368
// Translators: singular post name.
369369
'name' => sprintf(__('%s author user display name', 'notification'), __('Post', 'notification')),
370-
'property_name' => 'post_author',
370+
'property_name' => 'postAuthor',
371371
// Translators: Post type name.
372372
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
373373
]
@@ -380,7 +380,7 @@ public function mergeTags()
380380
'slug' => 'post_author_user_firstname',
381381
// Translators: singular post name.
382382
'name' => sprintf(__('%s author user first name', 'notification'), __('Post', 'notification')),
383-
'property_name' => 'post_author',
383+
'property_name' => 'postAuthor',
384384
// Translators: Post type name.
385385
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
386386
]
@@ -393,7 +393,7 @@ public function mergeTags()
393393
'slug' => 'post_author_user_lastname',
394394
// Translators: singular post name.
395395
'name' => sprintf(__('%s author user last name', 'notification'), __('Post', 'notification')),
396-
'property_name' => 'post_author',
396+
'property_name' => 'postAuthor',
397397
// Translators: Post type name.
398398
'group' => sprintf(__('%s author', 'notification'), $postTypeName),
399399
]

0 commit comments

Comments
 (0)