Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bram-pkg committed Feb 24, 2025
1 parent e9a6f51 commit 8788173
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 54 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/pest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.3, 8.2, 8.1 ]
laravel: [ 10.*, 11.* ]
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 11.*, 12.* ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: 10.*
testbench: ^8
- laravel: 11.*
testbench: ^9
exclude:
- php: 8.1
laravel: 11.*
- laravel: 12.*
testbench: ^10

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
coverage: none

- name: Install composer dependencies
Expand Down
22 changes: 10 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@
}
],
"require": {
"php": "^8.1",
"illuminate/contracts": "^10 | ^11"
"php": "^8.2",
"illuminate/contracts": "^11.0 | ^12.0"
},
"require-dev": {
"brianium/paratest": "^7",
"larastan/larastan": "^2.0",
"laravel/pint": "^1.13",
"nunomaduro/collision": "^7 | ^8.1",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.30",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0"
"larastan/larastan": "^3.0",
"laravel/pint": "^1.21",
"nunomaduro/collision": "^8.6",
"orchestra/testbench": "^10.0",
"pestphp/pest": "^3.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -62,8 +61,7 @@
"config": {
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true
"pestphp/pest-plugin": true
}
},
"extra": {
Expand Down
10 changes: 6 additions & 4 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
includes:
- vendor/larastan/larastan/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- phpstan-baseline.neon

parameters:
level: 4
level: max
paths:
- src
- config
#- database
- tests
- src
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
9 changes: 7 additions & 2 deletions src/Changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Changelog
*/
public function path(): string
{
return config('changelog.file', base_path('CHANGELOG.md'));
return config()->string('changelog.file', base_path('CHANGELOG.md'));
}

/**
Expand All @@ -29,7 +29,12 @@ public function raw(): string
throw new ChangelogNotFoundException();
}

return file_get_contents($file);
$contents = file_get_contents($file);
if ($contents === false) {
throw new ChangelogNotFoundException();
}

return $contents;
}

/**
Expand Down
30 changes: 2 additions & 28 deletions src/ChangelogServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,19 @@ class ChangelogServiceProvider extends ServiceProvider
/**
* Bootstrap the application services.
*/
public function boot()
public function boot(): void
{
/*
* Optional methods to load your package assets
*/
// $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'changelog');
// $this->loadViewsFrom(__DIR__.'/../resources/views', 'changelog');
// $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
// $this->loadRoutesFrom(__DIR__.'/routes.php');

if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../config/changelog.php' => config_path('changelog.php'),
], 'config');

// Publishing the views.
/*$this->publishes([
__DIR__.'/../resources/views' => resource_path('views/vendor/changelog'),
], 'views');*/

// Publishing assets.
/*$this->publishes([
__DIR__.'/../resources/assets' => public_path('vendor/changelog'),
], 'assets');*/

// Publishing the translation files.
/*$this->publishes([
__DIR__.'/../resources/lang' => resource_path('lang/vendor/changelog'),
], 'lang');*/

// Registering package commands.
// $this->commands([]);
}
}

/**
* Register the application services.
*/
public function register()
public function register(): void
{
// Automatically apply the package configuration
$this->mergeConfigFrom(__DIR__.'/../config/changelog.php', 'changelog');
Expand Down

0 comments on commit 8788173

Please sign in to comment.