Skip to content

Commit

Permalink
fix: reduces psr/container to 1.1.1 for PHP 7.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheAdams committed Oct 14, 2024
1 parent 0e73187 commit 5ad7efb
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 30 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stellarwp/admin-notices",
"version": "1.0.0",
"version": "1.0.1",
"description": "A handy package for easily displaying admin notices in WordPress with simple to complex visibility conditions",
"minimum-stability": "stable",
"license": "MIT",
Expand All @@ -11,7 +11,7 @@
}
],
"require": {
"psr/container": "2.0.1"
"psr/container": "1.1.1"
},
"require-dev": {
"codeception/module-asserts": "^1.0",
Expand Down
69 changes: 43 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions src/AdminNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,26 @@ public function urgency($urgency): self
return $this;
}

public function asInfo(): self
{
return $this->urgency(NoticeUrgency::info());
}

public function asSuccess(): self
{
return $this->urgency(NoticeUrgency::success());
}

public function asWarning(): self
{
return $this->urgency(NoticeUrgency::warning());
}

public function asError(): self
{
return $this->urgency(NoticeUrgency::error());
}

/**
* Sets the notice to display without the standard WordPress wrapper
*
Expand Down
4 changes: 2 additions & 2 deletions src/AdminNotices.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
class AdminNotices
{
/**
* @var ContainerInterface
* @var ContainerInterface|null
*/
protected static $container;

/**
* @var NotificationsRegistrarInterface
* @var NotificationsRegistrarInterface|null
*/
protected static $registrar;

Expand Down

0 comments on commit 5ad7efb

Please sign in to comment.