Skip to content

Commit 54eaea5

Browse files
authored
Merge pull request #94 from jolicode/tweaks
Fix permissions on Windows notifiers binaries
2 parents a6ceac9 + 39ba3f3 commit 54eaea5

27 files changed

+11
-252
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes between versions
22

3+
## Not yet released
4+
5+
* Fixed permissions on Windows notifiers binaries
6+
37
## 2.5.0 (2022-12-24)
48

59
* Dropped support for PHP 7.4

bin/notifu/notifu.exe

100644100755
File mode changed.

bin/snoreToast/snoretoast-x86.exe

100644100755
File mode changed.

example/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131

3232
$result = $notifier->send($notification);
3333

34-
echo 'Notification ', $result ? 'successfully sent' : 'failed', ' with ', get_class($notifier), \PHP_EOL;
34+
echo 'Notification ', $result ? 'successfully sent' : 'failed', ' with ', $notifier::class, \PHP_EOL;

src/Notifier/AppleScriptNotifier.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
class AppleScriptNotifier extends CliBasedNotifier
2121
{
22-
/**
23-
* {@inheritdoc}
24-
*/
2522
public function isSupported(): bool
2623
{
2724
if (OsHelper::isMacOS() && version_compare(OsHelper::getMacOSVersion(), '10.9.0', '>=')) {
@@ -31,25 +28,16 @@ public function isSupported(): bool
3128
return false;
3229
}
3330

34-
/**
35-
* {@inheritdoc}
36-
*/
3731
public function getBinary(): string
3832
{
3933
return 'osascript';
4034
}
4135

42-
/**
43-
* {@inheritdoc}
44-
*/
4536
public function getPriority(): int
4637
{
4738
return static::PRIORITY_LOW;
4839
}
4940

50-
/**
51-
* {@inheritdoc}
52-
*/
5341
protected function getCommandLineArguments(Notification $notification): array
5442
{
5543
$script = 'display notification "' . str_replace('"', '\\"', $notification->getBody()) . '"';

src/Notifier/CliBasedNotifier.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ abstract class CliBasedNotifier implements Notifier
3030
*/
3131
private int $support = self::SUPPORT_UNKNOWN;
3232

33-
/**
34-
* {@inheritdoc}
35-
*/
3633
public function isSupported(): bool
3734
{
3835
if (self::SUPPORT_UNKNOWN !== $this->support) {
@@ -56,9 +53,6 @@ public function isSupported(): bool
5653
return false;
5754
}
5855

59-
/**
60-
* {@inheritdoc}
61-
*/
6256
public function send(Notification $notification): bool
6357
{
6458
if (!$notification->getBody()) {

src/Notifier/GrowlNotifyNotifier.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,16 @@
1818
*/
1919
class GrowlNotifyNotifier extends CliBasedNotifier
2020
{
21-
/**
22-
* {@inheritdoc}
23-
*/
2421
public function getBinary(): string
2522
{
2623
return 'growlnotify';
2724
}
2825

29-
/**
30-
* {@inheritdoc}
31-
*/
3226
public function getPriority(): int
3327
{
3428
return static::PRIORITY_HIGH;
3529
}
3630

37-
/**
38-
* {@inheritdoc}
39-
*/
4031
protected function getCommandLineArguments(Notification $notification): array
4132
{
4233
$arguments = [

src/Notifier/KDialogNotifier.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,16 @@
1919
*/
2020
class KDialogNotifier extends CliBasedNotifier
2121
{
22-
/**
23-
* {@inheritdoc}
24-
*/
2522
public function getBinary(): string
2623
{
2724
return 'kdialog';
2825
}
2926

30-
/**
31-
* {@inheritdoc}
32-
*/
3327
public function getPriority(): int
3428
{
3529
return static::PRIORITY_HIGH;
3630
}
3731

38-
/**
39-
* {@inheritdoc}
40-
*/
4132
protected function getCommandLineArguments(Notification $notification): array
4233
{
4334
$arguments = [];

src/Notifier/NotifuNotifier.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,57 +20,36 @@
2020
*/
2121
class NotifuNotifier extends CliBasedNotifier implements BinaryProvider
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
2623
public function getBinary(): string
2724
{
2825
return 'notifu';
2926
}
3027

31-
/**
32-
* {@inheritdoc}
33-
*/
3428
public function getPriority(): int
3529
{
3630
return static::PRIORITY_LOW;
3731
}
3832

39-
/**
40-
* {@inheritdoc}
41-
*/
4233
public function canBeUsed(): bool
4334
{
4435
return OsHelper::isWindows() && OsHelper::isWindowsSeven();
4536
}
4637

47-
/**
48-
* {@inheritdoc}
49-
*/
5038
public function getRootDir(): string
5139
{
5240
return \dirname(__DIR__, 2) . '/bin/notifu';
5341
}
5442

55-
/**
56-
* {@inheritdoc}
57-
*/
5843
public function getEmbeddedBinary(): string
5944
{
6045
return 'notifu.exe';
6146
}
6247

63-
/**
64-
* {@inheritdoc}
65-
*/
6648
public function getExtraFiles(): array
6749
{
6850
return [];
6951
}
7052

71-
/**
72-
* {@inheritdoc}
73-
*/
7453
protected function getCommandLineArguments(Notification $notification): array
7554
{
7655
$arguments = [

src/Notifier/NotifySendNotifier.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,16 @@
1919
*/
2020
class NotifySendNotifier extends CliBasedNotifier
2121
{
22-
/**
23-
* {@inheritdoc}
24-
*/
2522
public function getBinary(): string
2623
{
2724
return 'notify-send';
2825
}
2926

30-
/**
31-
* {@inheritdoc}
32-
*/
3327
public function getPriority(): int
3428
{
3529
return static::PRIORITY_MEDIUM;
3630
}
3731

38-
/**
39-
* {@inheritdoc}
40-
*/
4132
protected function getCommandLineArguments(Notification $notification): array
4233
{
4334
$arguments = [];

0 commit comments

Comments
 (0)