Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ramsey composer install 1 2 #55

Open
wants to merge 7 commits into
base: 1.2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
tools: composer:v2
coverage: pcov

- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
- uses: ramsey/composer-install@v1

- name: Execute tests
run: vendor/bin/phpunit --verbose
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4, 8.0]
stability: [prefer-lowest, prefer-stable]
php: [7.2, 7.3, 7.4, 8.0, 8.1]
dependencies:
- lowest
- highest

name: Tests on PHP ${{ matrix.php }} - ${{ matrix.stability }}
name: Tests on PHP ${{ matrix.php }} - ${{ matrix.dependencies }}

steps:
- name: Checkout code
Expand All @@ -26,8 +28,9 @@ jobs:
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: Execute tests
run: vendor/bin/phpunit --verbose
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
}
],
"require": {
"php": ">=7.2",
"php": "^7.2 | ~8.0.0 | ~8.1.0",
"guzzlehttp/guzzle": "^6.2 || ^7.0",
"illuminate/notifications": "~5.5 || ~6.0 || ~7.0 || ~8.0",
"illuminate/support": "~5.5 || ~6.0 || ~7.0 || ~8.0"
},
"require-dev": {
"mockery/mockery": "^1.2.0",
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^8.5.21 | ^9.4.4"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion src/Pushbullet.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ private function getHeaders(): array
* Send request to Pushbullet API.
*
* @param array $params
*
* @return \Psr\Http\Message\ResponseInterface
*/
public function send($params): ResponseInterface
Expand Down
7 changes: 3 additions & 4 deletions src/PushbulletChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public function __construct(Pushbullet $pushbullet)
/**
* Send the given notification.
*
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
*
* @throws \NotificationChannels\Pushbullet\Exceptions\CouldNotSendNotification
*/
Expand All @@ -44,8 +44,7 @@ public function send($notifiable, Notification $notification): void

/**
* @param $notifiable
*
* @return \NotificationChannels\Pushbullet\Targets\Targetable|void
* @return \NotificationChannels\Pushbullet\Targets\Targetable|void
*/
private function getTarget($notifiable): ?Targetable
{
Expand Down
9 changes: 2 additions & 7 deletions src/PushbulletMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class PushbulletMessage
public $url;

/**
* @param string $message
*
* @param string $message
* @return static
*/
public static function create($message): self
Expand All @@ -53,7 +52,7 @@ public static function create($message): self
}

/**
* @param string $message
* @param string $message
*/
public function __construct($message)
{
Expand All @@ -62,7 +61,6 @@ public function __construct($message)

/**
* @param \NotificationChannels\Pushbullet\Targets\Targetable $targetable
*
* @return $this
*/
public function target(Targetable $targetable): self
Expand Down Expand Up @@ -100,7 +98,6 @@ public function link(): self
* Set notification title.
*
* @param string $title
*
* @return $this
*/
public function title($title): self
Expand All @@ -114,7 +111,6 @@ public function title($title): self
* Set notification message.
*
* @param string $message
*
* @return $this
*/
public function message($message): self
Expand All @@ -128,7 +124,6 @@ public function message($message): self
* Set notification url (if notification is of `link` type).
*
* @param string $url
*
* @return $this
*/
public function url($url): self
Expand Down