tweak configure

This commit is contained in:
awcodes
2023-07-11 13:45:41 -04:00
parent 31dcc0cf53
commit 07db1e858a
5 changed files with 26 additions and 33 deletions

View File

@@ -20,51 +20,47 @@
} }
], ],
"require": { "require": {
"php": "^8.0", "php": "^8.1",
"filament/filament": "^3.0", "filament/filament": "^3.0",
"filament/forms": "^3.0", "filament/forms": "^3.0",
"filament/tables": "^3.0", "filament/tables": "^3.0",
"spatie/laravel-package-tools": "^1.15.0", "spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^9.0|^10.0" "illuminate/contracts": "^10.0"
}, },
"require-dev": { "require-dev": {
"laravel/pint": "^1.0", "laravel/pint": "^1.0",
"nunomaduro/collision": "^6.0|^7.0", "nunomaduro/collision": "^7.9",
"nunomaduro/larastan": "^2.0.1", "nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^7.0", "orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0", "pestphp/pest": "^2.0",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0", "pestphp/pest-plugin-laravel": "^2.0",
"pestphp/pest-plugin-livewire": "^2.0",
"phpstan/extension-installer": "^1.1", "phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5|^10.0",
"spatie/laravel-ray": "^1.26" "spatie/laravel-ray": "^1.26"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"VendorName\\Skeleton\\": "src", "VendorName\\Skeleton\\": "src/",
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories" "VendorName\\Skeleton\\Database\\Factories\\": "database/factories/"
} }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
"VendorName\\Skeleton\\Tests\\": "tests" "VendorName\\Skeleton\\Tests\\": "tests/"
} }
}, },
"scripts": { "scripts": {
"pint": "vendor/bin/pint", "post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
"test:pest": "vendor/bin/pest --parallel", "analyse": "vendor/bin/phpstan analyse",
"test:phpstan": "vendor/bin/phpstan analyse", "test": "vendor/bin/pest",
"test": [ "test-coverage": "vendor/bin/pest --coverage",
"@test:pest", "format": "vendor/bin/pint"
"@test:phpstan"
]
}, },
"config": { "config": {
"sort-packages": true, "sort-packages": true,
"allow-plugins": { "allow-plugins": {
"composer/package-versions-deprecated": true,
"pestphp/pest-plugin": true, "pestphp/pest-plugin": true,
"phpstan/extension-installer": true "phpstan/extension-installer": true
} }

View File

@@ -163,10 +163,7 @@ if (! $usePhpStan) {
'nunomaduro/larastan', 'nunomaduro/larastan',
]); ]);
remove_composer_script([ remove_composer_script(['analyse']);
'test:phpstan',
'@test:phpstan',
]);
} }
if (! $usePint) { if (! $usePint) {
@@ -177,7 +174,7 @@ if (! $usePint) {
'laravel/pint', 'laravel/pint',
]); ]);
remove_composer_script(['pint']); remove_composer_script(['format']);
} }
if (! $useUpdateChangelogWorkflow) { if (! $useUpdateChangelogWorkflow) {

View File

@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Facade;
*/ */
class Skeleton extends Facade class Skeleton extends Facade
{ {
protected static function getFacadeAccessor(): string protected static function getFacadeAccessor()
{ {
return \VendorName\Skeleton\Skeleton::class; return \VendorName\Skeleton\Skeleton::class;
} }

View File

@@ -25,6 +25,11 @@ class SkeletonServiceProvider extends PackageServiceProvider
public function configurePackage(Package $package): void 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) $package->name(static::$name)
->hasCommands($this->getCommands()) ->hasCommands($this->getCommands())
->hasInstallCommand(function (InstallCommand $command) { ->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 public function boot(): void
{ {
parent::boot(); parent::boot();

5
tests/ArchTest.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
it('will not use debugging functions')
->expect(['dd', 'dump', 'ray'])
->each->not->toBeUsed();