diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index 970633c..b82007d 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 557d263..699ff97 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -11,7 +11,7 @@ jobs: name: phpstan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c22bab9..2539801 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,17 +14,22 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [8.2, 8.1] - laravel: [10.*] + laravel: [10.*, 11.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* + exclude: + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index b20f3b6..94df2c3 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: main diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..2f05eb2 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +resources/views/vendor/mail +resources/views/vendor/notifications diff --git a/CHANGELOG.md b/CHANGELOG.md index 12877aa..e1dccac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,42 @@ All notable changes to `starter-kit` will be documented in this file. +## 1.3.3 - 2024-10-07 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.3.2...1.3.3 + +## 1.3.2 - 2024-10-07 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.3.1...1.3.2 + +## 1.3.1 - 2024-09-17 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.3.0...1.3.1 + +## 1.3.0 - 2024-04-07 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.2.7...1.3.0 + +## 1.2.7 - 2023-10-09 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.2.6...1.2.7 + +## 1.2.6 - 2023-09-22 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.2.5...1.2.6 + +## 1.2.5 - 2023-09-20 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.2.4...1.2.5 + +## 1.2.4 - 2023-09-19 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.2.3...1.2.4 + +## 1.2.3 - 2023-08-21 + +**Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.2.2...1.2.3 + ## 1.2.2 - 2023-06-19 **Full Changelog**: https://github.com/rockero-cz/laravel-starter-kit/compare/1.2.1...1.2.2 diff --git a/README.md b/README.md index 03ebb8a..c545d59 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Besides tests, it also prepares static analysis using the `PHPStan` tool with cu ```neon includes: - - ./vendor/nunomaduro/larastan/extension.neon + - ./vendor/larastan/larastan/extension.neon parameters: level: 7 @@ -122,6 +122,8 @@ During the installation of the starter-kit, you will be prompted to add Prettier Installation prepare `.prettierrc` where is configuration and command `php artisan prettier` to fix your code on local environment. +You can use the `.prettierignore` file to ignore any files or directories that you want. This can be useful for keeping Prettier from formatting files that you don't want it to format, or for keeping Prettier from formatting files that are not code files. + --- ### Stubs diff --git a/composer.json b/composer.json index c63f3da..e7d1ddb 100644 --- a/composer.json +++ b/composer.json @@ -18,22 +18,22 @@ } ], "require": { - "php": "^8.1", - "illuminate/contracts": "^10.0", - "nunomaduro/larastan": "^2.0", - "pestphp/pest": "^2.6", - "pestphp/pest-plugin-laravel": "^2.0", + "php": "^8.1|^8.2|^8.3", + "illuminate/contracts": "^10.0|^11.0", + "larastan/larastan": "^2.0", + "pestphp/pest": "^3.0", + "pestphp/pest-plugin-laravel": "^3.0", "spatie/laravel-package-tools": "^1.13.0", - "tightenco/duster": "2.0.0" + "tightenco/duster": "3.0.0" }, "require-dev": { - "laravel/pint": "^1.2", - "nunomaduro/collision": "^7.5", - "orchestra/testbench": "^8.0", + "laravel/pint": "^1.16", + "nunomaduro/collision": "^7.5|^8.1", + "orchestra/testbench": "^8.0|^9.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^10.1", + "phpunit/phpunit": "^10.1|^11.0", "spatie/laravel-ray": "^1.26" }, "autoload": { diff --git a/src/StarterKit.php b/src/StarterKit.php index caea478..60e53ea 100755 --- a/src/StarterKit.php +++ b/src/StarterKit.php @@ -2,6 +2,4 @@ namespace Rockero\StarterKit; -class StarterKit -{ -} +class StarterKit {} diff --git a/src/StarterKitServiceProvider.php b/src/StarterKitServiceProvider.php index 9c8e6b0..68bd468 100644 --- a/src/StarterKitServiceProvider.php +++ b/src/StarterKitServiceProvider.php @@ -58,7 +58,6 @@ public function boot(): void __DIR__.'/../stubs/phpstan.stub' => $this->app->basePath('phpstan.neon'), __DIR__.'/../stubs/pint.stub' => $this->app->basePath('pint.json'), __DIR__.'/../stubs/tlint.stub' => $this->app->basePath('tlint.json'), - __DIR__.'/../stubs/tformat.stub' => $this->app->basePath('tformat.json'), __DIR__.'/../stubs/env-testing.stub' => $this->app->basePath('.env.testing'), __DIR__.'/../stubs/config/project.stub' => $this->app->basePath('config/project.php'), // Tests stubs @@ -91,13 +90,14 @@ protected function installPrettier(InstallCommand $command): void $command->comment('Installing prettier...'); Process::path(base_path()) - ->run('npm install -D prettier@2.8.8 prettier-plugin-blade prettier-plugin-tailwindcss', function (string $type, string $output) { + ->run('npm install -D prettier@^3.2.5 prettier-plugin-blade prettier-plugin-tailwindcss@^0.5.11', function (string $type, string $output) { echo $output; }); $this->publishes([ __DIR__.'/../stubs/duster-with-prettier.stub' => $this->app->basePath('duster.json'), __DIR__.'/../stubs/.prettierrc.stub' => $this->app->basePath('.prettierrc'), + __DIR__.'/../stubs/.prettierignore.stub' => $this->app->basePath('.prettierignore'), ]); } } diff --git a/stubs/.prettierignore.stub b/stubs/.prettierignore.stub new file mode 100644 index 0000000..2f05eb2 --- /dev/null +++ b/stubs/.prettierignore.stub @@ -0,0 +1,2 @@ +resources/views/vendor/mail +resources/views/vendor/notifications diff --git a/stubs/.prettierrc.stub b/stubs/.prettierrc.stub index d5a4fd9..d5bc3a2 100644 --- a/stubs/.prettierrc.stub +++ b/stubs/.prettierrc.stub @@ -1,8 +1,11 @@ { + "singleQuote": true, + "printWidth": 120, + "tabWidth": 4, "tailwindConfig": "./tailwind.config.js", "plugins": [ - "./node_modules/prettier-plugin-blade/", - "./node_modules/prettier-plugin-tailwindcss/" + "prettier-plugin-blade", + "prettier-plugin-tailwindcss" ], "overrides": [ { diff --git a/stubs/laravel/notification.stub b/stubs/laravel/notification.stub index 78fe890..e573dcd 100644 --- a/stubs/laravel/notification.stub +++ b/stubs/laravel/notification.stub @@ -14,7 +14,7 @@ class {{ class }} extends Notification /** * Create a new notification instance. */ - public function __construct(): HasMany + public function __construct() { // } diff --git a/stubs/phpstan.stub b/stubs/phpstan.stub index 19d431e..ec184f0 100644 --- a/stubs/phpstan.stub +++ b/stubs/phpstan.stub @@ -1,11 +1,11 @@ includes: - - ./vendor/nunomaduro/larastan/extension.neon + - vendor/larastan/larastan/extension.neon parameters: - level: 7 - - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false - + level: 5 paths: - - app/ + - app + - config + reportUnmatchedIgnoredErrors: true + checkMissingIterableValueType: true + checkModelProperties: false diff --git a/stubs/tformat.stub b/stubs/tformat.stub deleted file mode 100644 index 4b2d1ed..0000000 --- a/stubs/tformat.stub +++ /dev/null @@ -1,4 +0,0 @@ -{ - "preset": "laravel", - "excluded": ["tests/"] -} diff --git a/stubs/workflows/ci.stub b/stubs/workflows/ci.stub index 40bfda9..4f06749 100644 --- a/stubs/workflows/ci.stub +++ b/stubs/workflows/ci.stub @@ -26,25 +26,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.1" + php-version: "8.2" extensions: xdebug - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: latest - cache: 'npm' - - - name: Install dependencies - run: npm install - - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');" @@ -57,6 +48,15 @@ jobs: - name: Setup permissions run: chmod -R 777 storage bootstrap/cache + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: latest + cache: 'npm' + + - name: Install dependencies + run: npm install && npm run build + - name: Run tests timeout-minutes: 30 run: vendor/bin/pest @@ -69,7 +69,7 @@ jobs: timeout-minutes: 10 run: ./vendor/bin/duster fix - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Dusting commit_user_name: GitHub Action