Skip to content

Commit 272db8f

Browse files
authored
Merge pull request #17 from tanhongit/develop
Develop
2 parents 255a20b + 1cb08d5 commit 272db8f

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ yarn.lock
3232

3333
build
3434
.php-cs-fixer.cache
35+
storage

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
->in([
55
__DIR__ . '/src',
66
__DIR__ . '/tests',
7+
__DIR__ . '/routes',
78
])
89
->name('*.php')
910
->ignoreDotFiles(true)

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@
4242
},
4343
"require": {
4444
"php": "^8.1",
45-
"cslant/telegram-git-notifier": "^v1.3.1"
45+
"cslant/telegram-git-notifier": "^v1.3.2"
4646
},
4747
"require-dev": {
4848
"friendsofphp/php-cs-fixer": "^v3.37.1",
49-
"pestphp/pest": "^2.24",
50-
"phpstan/phpstan": "^1.10.39"
49+
"pestphp/pest": "^2.24"
5150
},
5251
"scripts": {
5352
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",

config/telegram-git-notifier.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
<?php
22

33
return [
4+
'defaults' => [
5+
'paths' => [
6+
'view' => env(
7+
'TGN_DEFAULT_PATH_VIEW',
8+
base_path('resources/views/vendor/telegram-git-notifier')
9+
),
10+
],
11+
],
12+
413
'app' => [
514
'name' => env('TGN_APP_NAME', 'Laravel Telegram Git Notifier'),
615

src/Providers/TelegramGitNotifierServiceProvider.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ class TelegramGitNotifierServiceProvider extends ServiceProvider
1313
*/
1414
public function boot(): void
1515
{
16-
$configPath = __DIR__.'/../../config/telegram-git-notifier.php';
17-
$this->publishes([
18-
$configPath => config_path('telegram-git-notifier.php'),
19-
], 'config');
20-
2116
$routePath = __DIR__.'/../../routes/bot.php';
2217
if (file_exists($routePath)) {
2318
$this->loadRoutesFrom($routePath);
@@ -28,11 +23,16 @@ public function boot(): void
2823
$this->loadViewsFrom($viewPath, 'telegram-git-notifier');
2924
}
3025

26+
$this->loadTranslationsFrom(__DIR__.'/../../lang', 'telegram-git-notifier');
27+
28+
$configPath = __DIR__.'/../../config/telegram-git-notifier.php';
3129
$this->publishes([
32-
__DIR__.'/../../resources/views' => base_path('resources/views/vendor/telegram-git-notifier'),
33-
], 'views');
30+
$configPath => config_path('telegram-git-notifier.php'),
31+
], 'config');
3432

35-
$this->loadTranslationsFrom(__DIR__.'/../../lang', 'telegram-git-notifier');
33+
$this->publishes([
34+
__DIR__.'/../../resources/views' => config('telegram-git-notifier.defaults.paths.views'),
35+
], 'views');
3636

3737
$this->publishes([
3838
__DIR__.'/../../lang' => resource_path('lang/vendor/telegram-git-notifier'),

0 commit comments

Comments
 (0)