Skip to content

Commit 5ad7efb

Browse files
committed
fix: reduces psr/container to 1.1.1 for PHP 7.2 compatibility
1 parent 0e73187 commit 5ad7efb

File tree

4 files changed

+67
-30
lines changed

4 files changed

+67
-30
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stellarwp/admin-notices",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A handy package for easily displaying admin notices in WordPress with simple to complex visibility conditions",
55
"minimum-stability": "stable",
66
"license": "MIT",
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"psr/container": "2.0.1"
14+
"psr/container": "1.1.1"
1515
},
1616
"require-dev": {
1717
"codeception/module-asserts": "^1.0",

composer.lock

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

src/AdminNotice.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,26 @@ public function urgency($urgency): self
230230
return $this;
231231
}
232232

233+
public function asInfo(): self
234+
{
235+
return $this->urgency(NoticeUrgency::info());
236+
}
237+
238+
public function asSuccess(): self
239+
{
240+
return $this->urgency(NoticeUrgency::success());
241+
}
242+
243+
public function asWarning(): self
244+
{
245+
return $this->urgency(NoticeUrgency::warning());
246+
}
247+
248+
public function asError(): self
249+
{
250+
return $this->urgency(NoticeUrgency::error());
251+
}
252+
233253
/**
234254
* Sets the notice to display without the standard WordPress wrapper
235255
*

src/AdminNotices.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
class AdminNotices
1313
{
1414
/**
15-
* @var ContainerInterface
15+
* @var ContainerInterface|null
1616
*/
1717
protected static $container;
1818

1919
/**
20-
* @var NotificationsRegistrarInterface
20+
* @var NotificationsRegistrarInterface|null
2121
*/
2222
protected static $registrar;
2323

0 commit comments

Comments
 (0)