From 1cfe8aeae596019827d8102762a48b7dbcbe3ef8 Mon Sep 17 00:00:00 2001 From: Alex Plekhanov Date: Sun, 7 Nov 2021 23:40:49 +0100 Subject: [PATCH 1/5] chore: updated tests workflow --- .github/workflows/tests.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b18fa1c..73200c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 From af39ddc6fb374afb882f47111bf325f07c40b4a9 Mon Sep 17 00:00:00 2001 From: Alex Plekhanov Date: Sun, 7 Nov 2021 23:47:10 +0100 Subject: [PATCH 2/5] chore: updated coverage workflow to use ramsey/composer-install (cherry picked from commit e083d12710120c8884484cc13012886407cbc2a7) --- .github/workflows/coverage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index fb68798..2819371 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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 From 270e8db132a795b24508825f0044b962a6938e22 Mon Sep 17 00:00:00 2001 From: Alex Plekhanov Date: Tue, 23 Nov 2021 21:11:55 +0000 Subject: [PATCH 3/5] Apply fixes from StyleCI [ci skip] [skip ci] --- src/Pushbullet.php | 1 - src/PushbulletChannel.php | 7 +++---- src/PushbulletMessage.php | 9 ++------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/Pushbullet.php b/src/Pushbullet.php index b0b2f45..5f2ac09 100644 --- a/src/Pushbullet.php +++ b/src/Pushbullet.php @@ -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 diff --git a/src/PushbulletChannel.php b/src/PushbulletChannel.php index e077349..d9bfd66 100644 --- a/src/PushbulletChannel.php +++ b/src/PushbulletChannel.php @@ -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 */ @@ -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 { diff --git a/src/PushbulletMessage.php b/src/PushbulletMessage.php index 4426e15..9db6b26 100644 --- a/src/PushbulletMessage.php +++ b/src/PushbulletMessage.php @@ -43,8 +43,7 @@ class PushbulletMessage public $url; /** - * @param string $message - * + * @param string $message * @return static */ public static function create($message): self @@ -53,7 +52,7 @@ public static function create($message): self } /** - * @param string $message + * @param string $message */ public function __construct($message) { @@ -62,7 +61,6 @@ public function __construct($message) /** * @param \NotificationChannels\Pushbullet\Targets\Targetable $targetable - * * @return $this */ public function target(Targetable $targetable): self @@ -100,7 +98,6 @@ public function link(): self * Set notification title. * * @param string $title - * * @return $this */ public function title($title): self @@ -114,7 +111,6 @@ public function title($title): self * Set notification message. * * @param string $message - * * @return $this */ public function message($message): self @@ -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 From 1bed39bfddd7381289110803a425c1521611278d Mon Sep 17 00:00:00 2001 From: Alex Plekhanov Date: Tue, 23 Nov 2021 22:22:06 +0100 Subject: [PATCH 4/5] chore: jumped to higher versions of phpunit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a84075f..70fa8a7 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ }, "require-dev": { "mockery/mockery": "^1.2.0", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^8.5.21 | ^9.4.4" }, "autoload": { "psr-4": { From b339f7d25538cf76ff2f2cb72c56c18c996f25cb Mon Sep 17 00:00:00 2001 From: Alex Plekhanov Date: Tue, 23 Nov 2021 22:25:03 +0100 Subject: [PATCH 5/5] chore: limited php version to 8.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 70fa8a7..4441509 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "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"