From 9f6464a6e2be261dfeccc710b54e9c9a13a3791b Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 24 Jul 2023 21:58:22 +0300 Subject: [PATCH] filament v3 updates --- .editorconfig | 6 +- .github/ISSUE_TEMPLATE/bug.yml | 66 ++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++ composer.json | 116 +++++++++++----------- phpstan.neon.dist | 5 +- pint.json | 5 +- src/ArtemisPlugin.php | 32 ------ src/ArtemisServiceProvider.php | 12 +-- 8 files changed, 161 insertions(+), 101 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 src/ArtemisPlugin.php diff --git a/.editorconfig b/.editorconfig index 38d32d6..c82b426 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,13 +3,13 @@ root = true [*] charset = utf-8 end_of_line = lf -insert_final_newline = true -indent_style = space indent_size = 4 +indent_style = space +insert_final_newline = true trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false [*.{yml,yaml}] -indent_size = 4 \ No newline at end of file +indent_size = 2 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..8fa85ce --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,66 @@ +name: Bug Report +description: Report an Issue or Bug with the Package +title: "[Bug]: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + We're sorry to hear you have a problem. Can you help us solve it by providing the following details. + - type: textarea + id: what-happened + attributes: + label: What happened? + description: What did you expect to happen? + placeholder: I cannot currently do X thing because when I do, it breaks X thing. + validations: + required: true + - type: textarea + id: how-to-reproduce + attributes: + label: How to reproduce the bug + description: How did this occur, please add any config values used and provide a set of reliable steps if possible. + placeholder: When I do X I see Y. + validations: + required: true + - type: input + id: package-version + attributes: + label: Package Version + description: What version of our Package are you running? Please be as specific as possible + placeholder: 2.0.0 + validations: + required: true + - type: input + id: php-version + attributes: + label: PHP Version + description: What version of PHP are you running? Please be as specific as possible + placeholder: 8.2.0 + validations: + required: true + - type: input + id: laravel-version + attributes: + label: Laravel Version + description: What version of Laravel are you running? Please be as specific as possible + placeholder: 9.0.0 + validations: + required: true + - type: dropdown + id: operating-systems + attributes: + label: Which operating systems does with happen with? + description: You may select more than one. + multiple: true + options: + - macOS + - Windows + - Linux + - type: textarea + id: notes + attributes: + label: Notes + description: Use this field to provide any other notes that you feel might be relevant to the issue. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/composer.json b/composer.json index d071173..6272b64 100644 --- a/composer.json +++ b/composer.json @@ -1,58 +1,62 @@ { - "name": "lara-zeus/artemis", - "description": "artistic themes for lara zeus sky", - "keywords": [ - "laravel", - "lara-zeus", - "sky", - "cms", - "pages", - "posts", - "menu", - "news", - "wordpress laravel", - "wordpress alternative", - "laravel cms" - ], - "homepage": "https://larazeus.com", - "license": "MIT", - "type": "library", - "authors": [ - { - "name": "php coder", - "email": "wh7r.com@gmail.com", - "role": "Owner" - } - ], - "require": { - "php": "^8.0", - "lara-zeus/core": "3.x-dev" - }, - "require-dev": { - "orchestra/testbench": "^7.0 || ^8.0", - "laravel/pint": "^1.0", - "nunomaduro/collision": "^6.0", - "nunomaduro/larastan": "^2.0.1", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0" - }, - "autoload": { - "psr-4": { - "LaraZeus\\Artemis\\": "src" - } - }, - "config": { - "sort-packages": true, - "allow-plugins": { - "phpstan/extension-installer": true - } - }, - "extra": { - "laravel": { - "providers": [ - "LaraZeus\\Artemis\\ArtemisServiceProvider" - ] - } - }, - "minimum-stability": "dev" + "name": "lara-zeus/artemis", + "description": "artistic themes for lara zeus sky", + "keywords": [ + "laravel", + "lara-zeus", + "sky", + "cms", + "pages", + "posts", + "menu", + "news", + "wordpress laravel", + "wordpress alternative", + "laravel cms" + ], + "homepage": "https://larazeus.com/artemis", + "support": { + "issues": "https://github.com/lara-zeus/artemis/issues", + "source": "https://github.com/lara-zeus/artemis" + }, + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "php coder", + "email": "wh7r.com@gmail.com", + "role": "Owner" + } + ], + "require": { + "php": "^8.0", + "lara-zeus/core": "3.x-dev" + }, + "require-dev": { + "orchestra/testbench": "^7.0 || ^8.0", + "laravel/pint": "^1.0", + "nunomaduro/collision": "^6.0", + "nunomaduro/larastan": "^2.0.1", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0" + }, + "autoload": { + "psr-4": { + "LaraZeus\\Artemis\\": "src" + } + }, + "config": { + "sort-packages": true, + "allow-plugins": { + "phpstan/extension-installer": true + } + }, + "extra": { + "laravel": { + "providers": [ + "LaraZeus\\Artemis\\ArtemisServiceProvider" + ] + } + }, + "minimum-stability": "dev" } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c28de79..c885223 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,14 +2,13 @@ includes: - phpstan-baseline.neon parameters: - level: 4 + level: 6 paths: - src - config - database + - tests tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false - diff --git a/pint.json b/pint.json index 304d8f3..c6ddb49 100644 --- a/pint.json +++ b/pint.json @@ -6,6 +6,9 @@ "spacing": "one" }, "method_argument_space": true, - "single_trait_insert_per_statement": true + "single_trait_insert_per_statement": true, + "types_spaces": { + "space": "single" + } } } diff --git a/src/ArtemisPlugin.php b/src/ArtemisPlugin.php deleted file mode 100644 index d004a8d..0000000 --- a/src/ArtemisPlugin.php +++ /dev/null @@ -1,32 +0,0 @@ -resources([ - - ]); - } - - public static function make(): static - { - return app(static::class); - } - - public function boot(Panel $panel): void - { - // - } -} diff --git a/src/ArtemisServiceProvider.php b/src/ArtemisServiceProvider.php index fbfc5c8..8aa194b 100644 --- a/src/ArtemisServiceProvider.php +++ b/src/ArtemisServiceProvider.php @@ -10,22 +10,22 @@ class ArtemisServiceProvider extends PackageServiceProvider { + public static string $name = 'zeus-artemis'; + public function packageBooted(): void { - //$this->package->hasViews('zeus'); - //CoreServiceProvider::setThemePath('artemis'); - $themePath = 'zeus::themes.' . config('zeus.theme'); View::share('artemisTheme', $themePath); - App::singleton('artemisTheme', function () use ($themePath) { + // not needed in app level + /*App::singleton('artemisTheme', function () use ($themePath) { return $themePath; - }); + });*/ } public function configurePackage(Package $package): void { $package - ->name('zeus-artemis') + ->name(static::$name) ->hasAssets() ->hasConfigFile() ->hasViews('zeus')