Skip to content

Commit 8788173

Browse files
committed
update
1 parent e9a6f51 commit 8788173

File tree

6 files changed

+30
-54
lines changed

6 files changed

+30
-54
lines changed

.github/workflows/pest.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ ubuntu-latest ]
16-
php: [ 8.3, 8.2, 8.1 ]
17-
laravel: [ 10.*, 11.* ]
16+
php: [ 8.2, 8.3, 8.4 ]
17+
laravel: [ 11.*, 12.* ]
1818
stability: [ prefer-lowest, prefer-stable ]
1919
include:
20-
- laravel: 10.*
21-
testbench: ^8
2220
- laravel: 11.*
2321
testbench: ^9
24-
exclude:
25-
- php: 8.1
26-
laravel: 11.*
22+
- laravel: 12.*
23+
testbench: ^10
2724

2825
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2926

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.2'
19+
php-version: '8.3'
2020
coverage: none
2121

2222
- name: Install composer dependencies

composer.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^8.1",
21-
"illuminate/contracts": "^10 | ^11"
20+
"php": "^8.2",
21+
"illuminate/contracts": "^11.0 | ^12.0"
2222
},
2323
"require-dev": {
2424
"brianium/paratest": "^7",
25-
"larastan/larastan": "^2.0",
26-
"laravel/pint": "^1.13",
27-
"nunomaduro/collision": "^7 | ^8.1",
28-
"orchestra/testbench": "^8.0",
29-
"pestphp/pest": "^2.30",
30-
"phpstan/extension-installer": "^1.1",
31-
"phpstan/phpstan-deprecation-rules": "^1.0",
32-
"phpstan/phpstan-phpunit": "^1.0"
25+
"larastan/larastan": "^3.0",
26+
"laravel/pint": "^1.21",
27+
"nunomaduro/collision": "^8.6",
28+
"orchestra/testbench": "^10.0",
29+
"pestphp/pest": "^3.0",
30+
"phpstan/phpstan-deprecation-rules": "^2.0",
31+
"phpstan/phpstan-phpunit": "^2.0"
3332
},
3433
"autoload": {
3534
"psr-4": {
@@ -62,8 +61,7 @@
6261
"config": {
6362
"sort-packages": true,
6463
"allow-plugins": {
65-
"pestphp/pest-plugin": true,
66-
"phpstan/extension-installer": true
64+
"pestphp/pest-plugin": true
6765
}
6866
},
6967
"extra": {

phpstan.neon.dist

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
includes:
2+
- vendor/larastan/larastan/extension.neon
3+
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+
- vendor/phpstan/phpstan-phpunit/extension.neon
5+
- vendor/phpstan/phpstan-phpunit/rules.neon
26
- phpstan-baseline.neon
37

48
parameters:
5-
level: 4
9+
level: max
610
paths:
7-
- src
811
- config
9-
#- database
10-
- tests
12+
- src
1113
tmpDir: build/phpstan
1214
checkOctaneCompatibility: true
1315
checkModelProperties: true

src/Changelog.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Changelog
1313
*/
1414
public function path(): string
1515
{
16-
return config('changelog.file', base_path('CHANGELOG.md'));
16+
return config()->string('changelog.file', base_path('CHANGELOG.md'));
1717
}
1818

1919
/**
@@ -29,7 +29,12 @@ public function raw(): string
2929
throw new ChangelogNotFoundException();
3030
}
3131

32-
return file_get_contents($file);
32+
$contents = file_get_contents($file);
33+
if ($contents === false) {
34+
throw new ChangelogNotFoundException();
35+
}
36+
37+
return $contents;
3338
}
3439

3540
/**

src/ChangelogServiceProvider.php

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,19 @@ class ChangelogServiceProvider extends ServiceProvider
99
/**
1010
* Bootstrap the application services.
1111
*/
12-
public function boot()
12+
public function boot(): void
1313
{
14-
/*
15-
* Optional methods to load your package assets
16-
*/
17-
// $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'changelog');
18-
// $this->loadViewsFrom(__DIR__.'/../resources/views', 'changelog');
19-
// $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
20-
// $this->loadRoutesFrom(__DIR__.'/routes.php');
21-
2214
if ($this->app->runningInConsole()) {
2315
$this->publishes([
2416
__DIR__.'/../config/changelog.php' => config_path('changelog.php'),
2517
], 'config');
26-
27-
// Publishing the views.
28-
/*$this->publishes([
29-
__DIR__.'/../resources/views' => resource_path('views/vendor/changelog'),
30-
], 'views');*/
31-
32-
// Publishing assets.
33-
/*$this->publishes([
34-
__DIR__.'/../resources/assets' => public_path('vendor/changelog'),
35-
], 'assets');*/
36-
37-
// Publishing the translation files.
38-
/*$this->publishes([
39-
__DIR__.'/../resources/lang' => resource_path('lang/vendor/changelog'),
40-
], 'lang');*/
41-
42-
// Registering package commands.
43-
// $this->commands([]);
4418
}
4519
}
4620

4721
/**
4822
* Register the application services.
4923
*/
50-
public function register()
24+
public function register(): void
5125
{
5226
// Automatically apply the package configuration
5327
$this->mergeConfigFrom(__DIR__.'/../config/changelog.php', 'changelog');

0 commit comments

Comments
 (0)