mirror of
https://github.com/filamentphp/plugin-skeleton.git
synced 2025-12-06 13:38:53 +08:00
tweak configure
This commit is contained in:
@@ -20,51 +20,47 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"php": "^8.1",
|
||||
"filament/filament": "^3.0",
|
||||
"filament/forms": "^3.0",
|
||||
"filament/tables": "^3.0",
|
||||
"spatie/laravel-package-tools": "^1.15.0",
|
||||
"illuminate/contracts": "^9.0|^10.0"
|
||||
"illuminate/contracts": "^10.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.0",
|
||||
"nunomaduro/collision": "^6.0|^7.0",
|
||||
"nunomaduro/collision": "^7.9",
|
||||
"nunomaduro/larastan": "^2.0.1",
|
||||
"orchestra/testbench": "^7.0",
|
||||
"orchestra/testbench": "^8.0",
|
||||
"pestphp/pest": "^2.0",
|
||||
"pestphp/pest-plugin-arch": "^2.0",
|
||||
"pestphp/pest-plugin-laravel": "^2.0",
|
||||
"pestphp/pest-plugin-livewire": "^2.0",
|
||||
"phpstan/extension-installer": "^1.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.0",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^9.5|^10.0",
|
||||
"spatie/laravel-ray": "^1.26"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"VendorName\\Skeleton\\": "src",
|
||||
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories"
|
||||
"VendorName\\Skeleton\\": "src/",
|
||||
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"VendorName\\Skeleton\\Tests\\": "tests"
|
||||
"VendorName\\Skeleton\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"pint": "vendor/bin/pint",
|
||||
"test:pest": "vendor/bin/pest --parallel",
|
||||
"test:phpstan": "vendor/bin/phpstan analyse",
|
||||
"test": [
|
||||
"@test:pest",
|
||||
"@test:phpstan"
|
||||
]
|
||||
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
|
||||
"analyse": "vendor/bin/phpstan analyse",
|
||||
"test": "vendor/bin/pest",
|
||||
"test-coverage": "vendor/bin/pest --coverage",
|
||||
"format": "vendor/bin/pint"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"composer/package-versions-deprecated": true,
|
||||
"pestphp/pest-plugin": true,
|
||||
"phpstan/extension-installer": true
|
||||
}
|
||||
|
||||
@@ -163,10 +163,7 @@ if (! $usePhpStan) {
|
||||
'nunomaduro/larastan',
|
||||
]);
|
||||
|
||||
remove_composer_script([
|
||||
'test:phpstan',
|
||||
'@test:phpstan',
|
||||
]);
|
||||
remove_composer_script(['analyse']);
|
||||
}
|
||||
|
||||
if (! $usePint) {
|
||||
@@ -177,7 +174,7 @@ if (! $usePint) {
|
||||
'laravel/pint',
|
||||
]);
|
||||
|
||||
remove_composer_script(['pint']);
|
||||
remove_composer_script(['format']);
|
||||
}
|
||||
|
||||
if (! $useUpdateChangelogWorkflow) {
|
||||
|
||||
@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Facade;
|
||||
*/
|
||||
class Skeleton extends Facade
|
||||
{
|
||||
protected static function getFacadeAccessor(): string
|
||||
protected static function getFacadeAccessor()
|
||||
{
|
||||
return \VendorName\Skeleton\Skeleton::class;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,11 @@ class SkeletonServiceProvider extends PackageServiceProvider
|
||||
|
||||
public function configurePackage(Package $package): void
|
||||
{
|
||||
/*
|
||||
* This class is a Package Service Provider
|
||||
*
|
||||
* More info: https://github.com/spatie/laravel-package-tools
|
||||
*/
|
||||
$package->name(static::$name)
|
||||
->hasCommands($this->getCommands())
|
||||
->hasInstallCommand(function (InstallCommand $command) {
|
||||
@@ -54,16 +59,6 @@ class SkeletonServiceProvider extends PackageServiceProvider
|
||||
}
|
||||
}
|
||||
|
||||
public function register(): void
|
||||
{
|
||||
parent::register();
|
||||
|
||||
// Facade Registration
|
||||
app()->bind('skeleton', function (): Skeleton {
|
||||
return new Skeleton();
|
||||
});
|
||||
}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
5
tests/ArchTest.php
Normal file
5
tests/ArchTest.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
it('will not use debugging functions')
|
||||
->expect(['dd', 'dump', 'ray'])
|
||||
->each->not->toBeUsed();
|
||||
Reference in New Issue
Block a user