diff --git a/composer.json b/composer.json index 1f85b2b..53946f2 100644 --- a/composer.json +++ b/composer.json @@ -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 } diff --git a/configure.php b/configure.php index 438936b..29e90ce 100644 --- a/configure.php +++ b/configure.php @@ -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) { diff --git a/src/Facades/Skeleton.php b/src/Facades/Skeleton.php index 571a498..1fa9076 100644 --- a/src/Facades/Skeleton.php +++ b/src/Facades/Skeleton.php @@ -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; } diff --git a/src/SkeletonServiceProvider.php b/src/SkeletonServiceProvider.php index 5e05ec2..e98565b 100644 --- a/src/SkeletonServiceProvider.php +++ b/src/SkeletonServiceProvider.php @@ -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(); diff --git a/tests/ArchTest.php b/tests/ArchTest.php new file mode 100644 index 0000000..ccc19b2 --- /dev/null +++ b/tests/ArchTest.php @@ -0,0 +1,5 @@ +expect(['dd', 'dump', 'ray']) + ->each->not->toBeUsed();