Skip to content

Commit

Permalink
2.2.1 (#6)
Browse files Browse the repository at this point in the history
* Replaced `phpcs/phpcbf` by `laravel/pint`
  • Loading branch information
Okipa committed Aug 1, 2022
1 parent 37437b6 commit 5cd3694
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 41 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Lower PHP and laravel versions.

- name: PHPUnit
- name: PHPUnit without code coverage
if: matrix.php != '8.1' || matrix.laravel != '9.*'
run: vendor/bin/testbench package:test --parallel --no-coverage

Expand All @@ -59,11 +59,11 @@ jobs:
- name: Code analysis
if: matrix.php == '8.1' && matrix.laravel == '9.*'
run: |
vendor/bin/phpcs
vendor/bin/pint --test -vvv
vendor/bin/phpmd config,src,tests text phpmd.xml
vendor/bin/phpstan analyse
- name: PHPUnit + Code coverage
- name: PHPUnit with code coverage
if: matrix.php == '8.1' && matrix.laravel == '9.*'
run: |
mkdir -p build/logs
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [2.2.1](https://github.com/Okipa/laravel-supervisor-downtime-notifier/compare/2.2.0...2.2.1)

2022-08-01

* Replaced `phpcs/phpcbf` by `laravel/pint`

## [2.2.0](https://github.com/Okipa/laravel-supervisor-downtime-notifier/compare/2.1.0...2.2.0)

2022-07-21
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"orchestra/testbench": "^6.0|^7.0",
"phpmd/phpmd": "^2.11",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.6"
"laravel/pint": "^1.1"
},
"autoload": {
"psr-4": {
Expand All @@ -53,11 +53,11 @@
}
},
"scripts": {
"phpcs": ["vendor/bin/phpcbf", "vendor/bin/phpcs"],
"pint": ["vendor/bin/pint"],
"phpmd": "vendor/bin/phpmd config,src,tests text phpmd.xml",
"phpstan": "vendor/bin/phpstan analyse --memory-limit=2G",
"phpunit" : "vendor/bin/testbench package:test --parallel --no-coverage",
"test": ["@phpcs", "@phpmd", "@phpstan", "@phpunit"]
"test": ["@pint", "@phpcs", "@phpmd", "@phpunit"]
},
"suggest": {
"guzzlehttp/guzzle": "Required for sending notifications via Slack",
Expand Down
4 changes: 2 additions & 2 deletions config/supervisor-downtime-notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
'sudo' => true,
'processes' => [
// 'laravel-horizon-project-production:*',
]
],
],
'preprod' => [
'sudo' => true,
'processes' => [
// 'laravel-horizon-project-preprod:*',
]
],
],
],

Expand Down
23 changes: 0 additions & 23 deletions phpcs.xml

This file was deleted.

10 changes: 10 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"preset": "laravel",
"rules": {
"concat_space": {
"spacing": "one"
},
"heredoc_to_nowdoc": false,
"Laravel/laravel_phpdoc_alignment": false
}
}
16 changes: 8 additions & 8 deletions src/Notifications/ServiceNotStarted.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ public function toSlack(): SlackMessage
{
return (new SlackMessage())->error()
->content('⚠ ' . (string) __('`[:app - :env]` supervisor service is not started on :url.', [
'app' => config('app.name'),
'env' => config('app.env'),
'url' => config('app.url'),
]));
'app' => config('app.name'),
'env' => config('app.env'),
'url' => config('app.url'),
]));
}

public function toWebhook(): WebhookMessage
{
// Rocket chat webhook example.
return WebhookMessage::create()->data([
'text' => '⚠ ' . (string) __('`[:app - :env]` supervisor service is not started on :url.', [
'app' => config('app.name'),
'env' => config('app.env'),
'url' => config('app.url'),
]),
'app' => config('app.name'),
'env' => config('app.env'),
'url' => config('app.url'),
]),
])->header('Content-Type', 'application/json');
}
}
1 change: 0 additions & 1 deletion tests/Unit/SupervisorMonitoringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Okipa\LaravelSupervisorDowntimeNotifier\Test\Unit;

use DB;
use Illuminate\Support\Facades\Notification as NotificationFacade;
use Okipa\LaravelSupervisorDowntimeNotifier\Commands\SimulateSupervisorDownTime;
use Okipa\LaravelSupervisorDowntimeNotifier\Exceptions\InvalidAllowedToRun;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
return new class extends Migration
{
public function up(): void
{
Schema::create('failed_jobs', static function (Blueprint $table) {
Expand Down

0 comments on commit 5cd3694

Please sign in to comment.