Skip to content

Commit

Permalink
Remove dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
slunak committed Sep 28, 2024
1 parent a636e87 commit 9db68a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"require": {
"php": ">=8.2",
"ext-curl": "*",
"ext-json": "*",
"symfony/deprecation-contracts": "^3.5"
"ext-json": "*"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.43",
Expand Down
8 changes: 6 additions & 2 deletions src/Recipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ public function getUserKey(): string
}

/**
* @deprecated since 1.7.0, to be removed in 2.0. Use getDevices() instead.
*
* @return array<string>
*/
public function getDevice(): array
{
trigger_deprecation('serhiy/pushover', '1.7.0', 'Method %s() is deprecated and will be removed in 2.0. Use %s() instead.', __METHOD__, 'getDevices()');
@trigger_error(sprintf('Since serhiy/pushover 1.7.0: Method %s() is deprecated and will be removed in 2.0. Use %s() instead.', __METHOD__, 'getDevices()'), \E_USER_DEPRECATED);

return $this->getDevices();
}
Expand Down Expand Up @@ -101,11 +103,13 @@ public function addDevice(string $device): void
}

/**
* @deprecated since 1.7.0, to be removed in 2.0. Use getDeviceListCommaSeparated() instead.
*
* Converts devices array to comma separated list and returns it.
*/
public function getDeviceListCommaSeparated(): string
{
trigger_deprecation('serhiy/pushover', '1.7.0', 'Method %s() is deprecated and will be removed in 2.0. Use %s() instead.', __METHOD__, 'getDevicesCommaSeparated()');
@trigger_error(sprintf('Since serhiy/pushover 1.7.0: Method %s() is deprecated and will be removed in 2.0. Use %s() instead.', __METHOD__, 'getDevicesCommaSeparated()'), \E_USER_DEPRECATED);

return $this->getDevicesCommaSeparated();
}
Expand Down

0 comments on commit 9db68a1

Please sign in to comment.