Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Spatie\PhpUnitWatcher;

use Joli\JoliNotif\DefaultNotifier;
use Joli\JoliNotif\Notification as JoliNotification;
use Joli\JoliNotif\NotifierFactory;

Expand Down Expand Up @@ -40,6 +41,8 @@ public function failingTests()

protected function send()
{
return NotifierFactory::create()->send($this->joliNotification);
return class_exists(NotifierFactory::class)
? NotifierFactory::create()->send($this->joliNotification) // Removed in JoliNotif 3
: (new DefaultNotifier())->send($this->joliNotification);
}
}