diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..199dcb2 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security Policy + +If you discover any security related issues, please email info@larazeus.com instead of using the issue tracker. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..30c8a49 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependencies" \ No newline at end of file diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index d7685f3..5059444 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -13,7 +13,7 @@ jobs: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.3.0 + uses: dependabot/fetch-metadata@v1.3.3 with: github-token: "${{ secrets.GITHUB_TOKEN }}" @@ -29,4 +29,4 @@ jobs: run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml new file mode 100644 index 0000000..4ecdb9f --- /dev/null +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -0,0 +1,21 @@ +name: Fix PHP code style issues + +on: [push] + +jobs: + php-code-styling: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + + - name: Fix PHP code style issues + uses: aglipanci/laravel-pint-action@1.0.0 + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Fix styling \ No newline at end of file diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..10f7697 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,26 @@ +name: PHPStan + +on: + push: + paths: + - '**.php' + - 'phpstan.neon.dist' + +jobs: + phpstan: + name: phpstan + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + coverage: none + + - name: Install composer dependencies + uses: ramsey/composer-install@v1 + + - name: Run PHPStan + run: ./vendor/bin/phpstan --error-format=github \ No newline at end of file diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..3efc226 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,47 @@ +name: run-tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, windows-latest] + php: [8.1] + laravel: [9.*] + stability: [prefer-lowest, prefer-stable] + include: + - laravel: 9.* + testbench: 7.* + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + coverage: none + + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/pest \ No newline at end of file diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index b20f3b6..7787ca1 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -25,4 +25,4 @@ jobs: with: branch: main commit_message: Update CHANGELOG - file_pattern: CHANGELOG.md + file_pattern: CHANGELOG.md \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0ae59f0..a29f628 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /public/storage /storage/*.key /vendor +/build .env .env.backup .phpunit.result.cache diff --git a/composer.json b/composer.json index c2622da..fd2001f 100644 --- a/composer.json +++ b/composer.json @@ -31,23 +31,50 @@ "filament/spatie-laravel-media-library-plugin": "^2.0", "filament/spatie-laravel-tags-plugin": "^2.0", "filament/spatie-laravel-translatable-plugin": "^2.0", - "lara-zeus/core": "^2.2", + "lara-zeus/core": "^2.3", "mohamedsabil83/filament-forms-tinyeditor": "^1.5", "spatie/laravel-medialibrary": "^10.0.0", "spatie/laravel-sluggable": "^3.3", "spatie/laravel-tags": "^4.0" }, "require-dev": { - "laravel/pint": "^1.2", - "orchestra/testbench": "^6.0 || ^7.0" + "orchestra/testbench": "^6.0 || ^7.0", + "laravel/pint": "^1.0", + "nunomaduro/larastan": "^2.0.1", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.1", + "pestphp/pest-plugin-livewire": "^1.0", + "pestphp/pest-plugin-parallel": "^0.3", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" }, "autoload": { "psr-4": { "LaraZeus\\Sky\\": "src" } }, + "autoload-dev": { + "psr-4": { + "LaraZeus\\Sky\\Tests\\": "tests" + } + }, + "scripts": { + "pint": "vendor/bin/pint", + "test:pest": "vendor/bin/pest --parallel", + "test:phpstan": "vendor/bin/phpstan analyse", + "test": [ + "@test:pest", + "@test:phpstan" + ] + }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "pestphp/pest-plugin": true, + "phpstan/extension-installer": true + } }, "extra": { "laravel": { diff --git a/composer.lock b/composer.lock index d5c11f9..523f5a0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ba5951155510f227a4635cd6f1ab6443", + "content-hash": "b549264bbd929e2023b71a096a67ed8d", "packages": [ { "name": "akaunting/laravel-money", @@ -1277,16 +1277,16 @@ }, { "name": "filament/filament", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/admin.git", - "reference": "91a73f1a583a964ed7c657f5d8627b6eb10d7903" + "reference": "9a81d4af2a18cb60d01a372843625a3e2fd19022" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/admin/zipball/91a73f1a583a964ed7c657f5d8627b6eb10d7903", - "reference": "91a73f1a583a964ed7c657f5d8627b6eb10d7903", + "url": "https://api.github.com/repos/filamentphp/admin/zipball/9a81d4af2a18cb60d01a372843625a3e2fd19022", + "reference": "9a81d4af2a18cb60d01a372843625a3e2fd19022", "shasum": "" }, "require": { @@ -1336,20 +1336,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-12T15:57:50+00:00" + "time": "2022-09-17T17:15:49+00:00" }, { "name": "filament/forms", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "0de49bf91025c25df22ee596f2df624a4a7a5039" + "reference": "2b89a8ad13d619289e60bb2ca0d62f8049cd9449" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/0de49bf91025c25df22ee596f2df624a4a7a5039", - "reference": "0de49bf91025c25df22ee596f2df624a4a7a5039", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/2b89a8ad13d619289e60bb2ca0d62f8049cd9449", + "reference": "2b89a8ad13d619289e60bb2ca0d62f8049cd9449", "shasum": "" }, "require": { @@ -1394,20 +1394,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-12T15:57:51+00:00" + "time": "2022-09-17T17:15:40+00:00" }, { "name": "filament/notifications", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "3c704738306123337acebe0ba990c6fd84b4842c" + "reference": "93919a0d067c82001ca8168eb0ac599d3c63967a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/3c704738306123337acebe0ba990c6fd84b4842c", - "reference": "3c704738306123337acebe0ba990c6fd84b4842c", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/93919a0d067c82001ca8168eb0ac599d3c63967a", + "reference": "93919a0d067c82001ca8168eb0ac599d3c63967a", "shasum": "" }, "require": { @@ -1444,11 +1444,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-12T15:57:43+00:00" + "time": "2022-09-17T17:15:43+00:00" }, { "name": "filament/spatie-laravel-media-library-plugin", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-media-library-plugin.git", @@ -1485,7 +1485,7 @@ }, { "name": "filament/spatie-laravel-tags-plugin", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-tags-plugin.git", @@ -1522,7 +1522,7 @@ }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", @@ -1568,16 +1568,16 @@ }, { "name": "filament/support", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "65d67c72ab370ba193d203f09975a033f627de09" + "reference": "27877ed82f411379dbd0ee4facbffa53bfb3fe51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/65d67c72ab370ba193d203f09975a033f627de09", - "reference": "65d67c72ab370ba193d203f09975a033f627de09", + "url": "https://api.github.com/repos/filamentphp/support/zipball/27877ed82f411379dbd0ee4facbffa53bfb3fe51", + "reference": "27877ed82f411379dbd0ee4facbffa53bfb3fe51", "shasum": "" }, "require": { @@ -1614,20 +1614,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-12T15:57:43+00:00" + "time": "2022-09-17T17:15:37+00:00" }, { "name": "filament/tables", - "version": "v2.16.2", + "version": "v2.16.6", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "b5854e190dd8ba9c463b6c5a8c26e70978e28e73" + "reference": "1feac2d27ea3ee5a22ba07bd7c7c02f28d9e27d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/b5854e190dd8ba9c463b6c5a8c26e70978e28e73", - "reference": "b5854e190dd8ba9c463b6c5a8c26e70978e28e73", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/1feac2d27ea3ee5a22ba07bd7c7c02f28d9e27d9", + "reference": "1feac2d27ea3ee5a22ba07bd7c7c02f28d9e27d9", "shasum": "" }, "require": { @@ -1670,7 +1670,7 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-12T15:57:42+00:00" + "time": "2022-09-17T17:15:41+00:00" }, { "name": "fruitcake/php-cors", @@ -2082,16 +2082,16 @@ }, { "name": "lara-zeus/core", - "version": "2.2.9", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/lara-zeus/core.git", - "reference": "4ff7392b35b932e3c8a33d60762ac9945456ee31" + "reference": "3fd995a86691ac2b5354a0bc587b8c7205a84bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lara-zeus/core/zipball/4ff7392b35b932e3c8a33d60762ac9945456ee31", - "reference": "4ff7392b35b932e3c8a33d60762ac9945456ee31", + "url": "https://api.github.com/repos/lara-zeus/core/zipball/3fd995a86691ac2b5354a0bc587b8c7205a84bbd", + "reference": "3fd995a86691ac2b5354a0bc587b8c7205a84bbd", "shasum": "" }, "require": { @@ -2104,9 +2104,17 @@ "php": "^8.0" }, "require-dev": { - "laravel/pint": "^1.2", + "laravel/pint": "^1.0", + "nunomaduro/larastan": "^2.0.1", "orchestra/testbench": "^6.0 || ^7.0", - "phpunit/phpunit": "^9.5.10" + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.1", + "pestphp/pest-plugin-livewire": "^1.0", + "pestphp/pest-plugin-parallel": "^0.3", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { @@ -2146,7 +2154,7 @@ ], "support": { "issues": "https://github.com/lara-zeus/core/issues", - "source": "https://github.com/lara-zeus/core/tree/2.2.9" + "source": "https://github.com/lara-zeus/core/tree/2.3.1" }, "funding": [ { @@ -2154,7 +2162,7 @@ "type": "github" } ], - "time": "2022-09-14T18:53:22+00:00" + "time": "2022-09-17T17:33:39+00:00" }, { "name": "laravel/framework", @@ -2593,16 +2601,16 @@ }, { "name": "league/flysystem", - "version": "3.3.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "d8295793b3e2f91aa39e1feb2d5bfce772891ae2" + "reference": "5972d2a966e236674286e3a2281139ce74e4415d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d8295793b3e2f91aa39e1feb2d5bfce772891ae2", - "reference": "d8295793b3e2f91aa39e1feb2d5bfce772891ae2", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5972d2a966e236674286e3a2281139ce74e4415d", + "reference": "5972d2a966e236674286e3a2281139ce74e4415d", "shasum": "" }, "require": { @@ -2664,7 +2672,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.3.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.4.0" }, "funding": [ { @@ -2680,7 +2688,7 @@ "type": "tidelift" } ], - "time": "2022-09-09T11:11:42+00:00" + "time": "2022-09-16T20:57:23+00:00" }, { "name": "league/glide", @@ -4229,16 +4237,16 @@ }, { "name": "ramsey/uuid", - "version": "4.5.0", + "version": "4.5.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "ef842484ba57f163c6d465ab744bfecb872a11d4" + "reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/ef842484ba57f163c6d465ab744bfecb872a11d4", - "reference": "ef842484ba57f163c6d465ab744bfecb872a11d4", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/a161a26d917604dc6d3aa25100fddf2556e9f35d", + "reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d", "shasum": "" }, "require": { @@ -4307,7 +4315,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.5.0" + "source": "https://github.com/ramsey/uuid/tree/4.5.1" }, "funding": [ { @@ -4319,7 +4327,7 @@ "type": "tidelift" } ], - "time": "2022-09-15T01:44:53+00:00" + "time": "2022-09-16T03:22:46+00:00" }, { "name": "ryangjchandler/blade-capture-directive", @@ -7517,6 +7525,242 @@ } ], "packages-dev": [ + { + "name": "brianium/paratest", + "version": "v6.6.4", + "source": { + "type": "git", + "url": "https://github.com/paratestphp/paratest.git", + "reference": "4ce800dc32fd0292a4f05c00f347142dce1ecdda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/4ce800dc32fd0292a4f05c00f347142dce1ecdda", + "reference": "4ce800dc32fd0292a4f05c00f347142dce1ecdda", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-simplexml": "*", + "jean85/pretty-package-versions": "^2.0.5", + "php": "^7.3 || ^8.0", + "phpunit/php-code-coverage": "^9.2.17", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-timer": "^5.0.3", + "phpunit/phpunit": "^9.5.24", + "sebastian/environment": "^5.1.4", + "symfony/console": "^5.4.12 || ^6.1.4", + "symfony/process": "^5.4.11 || ^6.1.3" + }, + "require-dev": { + "doctrine/coding-standard": "^10.0.0", + "ext-pcov": "*", + "ext-posix": "*", + "infection/infection": "^0.26.14", + "malukenho/mcbumpface": "^1.1.5", + "squizlabs/php_codesniffer": "^3.7.1", + "symfony/filesystem": "^5.4.12 || ^6.1.4", + "vimeo/psalm": "^4.27.0" + }, + "bin": [ + "bin/paratest", + "bin/paratest.bat", + "bin/paratest_for_phpstorm" + ], + "type": "library", + "autoload": { + "psr-4": { + "ParaTest\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Scaturro", + "email": "scaturrob@gmail.com", + "role": "Developer" + }, + { + "name": "Filippo Tessarotto", + "email": "zoeslam@gmail.com", + "role": "Developer" + } + ], + "description": "Parallel testing for PHP", + "homepage": "https://github.com/paratestphp/paratest", + "keywords": [ + "concurrent", + "parallel", + "phpunit", + "testing" + ], + "support": { + "issues": "https://github.com/paratestphp/paratest/issues", + "source": "https://github.com/paratestphp/paratest/tree/v6.6.4" + }, + "funding": [ + { + "url": "https://github.com/sponsors/Slamdunk", + "type": "github" + }, + { + "url": "https://paypal.me/filippotessarotto", + "type": "paypal" + } + ], + "time": "2022-09-13T10:47:01+00:00" + }, + { + "name": "composer/class-map-generator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/class-map-generator.git", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "shasum": "" + }, + "require": { + "composer/pcre": "^2 || ^3", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-06-19T11:31:27+00:00" + }, + { + "name": "composer/pcre", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T20:21:48+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.1", @@ -7654,6 +7898,77 @@ }, "time": "2022-07-20T13:12:54+00:00" }, + { + "name": "filp/whoops", + "version": "2.14.5", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.5" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2022-01-07T12:00:00+00:00" + }, { "name": "hamcrest/hamcrest-php", "version": "v2.0.1", @@ -7705,6 +8020,65 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "jean85/pretty-package-versions", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A library to get pretty versions strings of installed dependencies", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" + }, + "time": "2021-10-08T21:21:46+00:00" + }, { "name": "laravel/pint", "version": "v1.2.0", @@ -7959,29 +8333,216 @@ "time": "2022-09-04T07:30:47+00:00" }, { - "name": "orchestra/testbench", - "version": "v7.7.0", + "name": "nunomaduro/collision", + "version": "v6.3.0", "source": { "type": "git", - "url": "https://github.com/orchestral/testbench.git", - "reference": "82c95f911347b5e35a9209e47925ac8afb11ae6e" + "url": "https://github.com/nunomaduro/collision.git", + "reference": "17f600e2e8872856ff2846243efb74ad4b6da531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/82c95f911347b5e35a9209e47925ac8afb11ae6e", - "reference": "82c95f911347b5e35a9209e47925ac8afb11ae6e", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/17f600e2e8872856ff2846243efb74ad4b6da531", + "reference": "17f600e2e8872856ff2846243efb74ad4b6da531", "shasum": "" }, "require": { - "fakerphp/faker": "^1.9.2", - "laravel/framework": "^9.19", - "mockery/mockery": "^1.4.4", - "orchestra/testbench-core": "^7.7", - "php": "^8.0", - "phpunit/phpunit": "^9.5.10", - "spatie/laravel-ray": "^1.28", - "symfony/process": "^6.0", - "symfony/yaml": "^6.0", + "filp/whoops": "^2.14.5", + "php": "^8.0.0", + "symfony/console": "^6.0.2" + }, + "require-dev": { + "brianium/paratest": "^6.4.1", + "laravel/framework": "^9.26.1", + "laravel/pint": "^1.1.1", + "nunomaduro/larastan": "^1.0.3", + "nunomaduro/mock-final-classes": "^1.1.0", + "orchestra/testbench": "^7.7", + "phpunit/phpunit": "^9.5.23", + "spatie/ignition": "^1.4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "6.x-dev" + }, + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2022-08-29T09:11:20+00:00" + }, + { + "name": "nunomaduro/larastan", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/larastan.git", + "reference": "980199077a49d71ef7c03b65b9d6bcce1f6d7bad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/980199077a49d71ef7c03b65b9d6bcce1f6d7bad", + "reference": "980199077a49d71ef7c03b65b9d6bcce1f6d7bad", + "shasum": "" + }, + "require": { + "composer/class-map-generator": "^1.0", + "composer/pcre": "^3.0", + "ext-json": "*", + "illuminate/console": "^9", + "illuminate/container": "^9", + "illuminate/contracts": "^9", + "illuminate/database": "^9", + "illuminate/http": "^9", + "illuminate/pipeline": "^9", + "illuminate/support": "^9", + "mockery/mockery": "^1.4.4", + "php": "^8.0.2", + "phpmyadmin/sql-parser": "^5.5", + "phpstan/phpstan": "^1.8.1" + }, + "require-dev": { + "nikic/php-parser": "^4.13.2", + "orchestra/testbench": "^7.0.0", + "phpunit/phpunit": "^9.5.11" + }, + "suggest": { + "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Larastan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "larastan", + "laravel", + "package", + "php", + "static analysis" + ], + "support": { + "issues": "https://github.com/nunomaduro/larastan/issues", + "source": "https://github.com/nunomaduro/larastan/tree/v2.2.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/canvural", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2022-08-30T19:02:01+00:00" + }, + { + "name": "orchestra/testbench", + "version": "v7.7.0", + "source": { + "type": "git", + "url": "https://github.com/orchestral/testbench.git", + "reference": "82c95f911347b5e35a9209e47925ac8afb11ae6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/82c95f911347b5e35a9209e47925ac8afb11ae6e", + "reference": "82c95f911347b5e35a9209e47925ac8afb11ae6e", + "shasum": "" + }, + "require": { + "fakerphp/faker": "^1.9.2", + "laravel/framework": "^9.19", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^7.7", + "php": "^8.0", + "phpunit/phpunit": "^9.5.10", + "spatie/laravel-ray": "^1.28", + "symfony/process": "^6.0", + "symfony/yaml": "^6.0", "vlucas/phpdotenv": "^5.4.1" }, "type": "library", @@ -8123,100 +8684,529 @@ "time": "2022-08-24T01:29:09+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.3", + "name": "pestphp/pest", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "url": "https://github.com/pestphp/pest.git", + "reference": "af6240b4eed8b049ac43c91184141ee337305df7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/pestphp/pest/zipball/af6240b4eed8b049ac43c91184141ee337305df7", + "reference": "af6240b4eed8b049ac43c91184141ee337305df7", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" + "nunomaduro/collision": "^5.10.0|^6.0", + "pestphp/pest-plugin": "^1.0.0", + "php": "^7.3 || ^8.0", + "phpunit/phpunit": "^9.5.5" + }, + "require-dev": { + "illuminate/console": "^8.47.0", + "illuminate/support": "^8.47.0", + "laravel/dusk": "^6.15.0", + "pestphp/pest-dev-tools": "dev-master", + "pestphp/pest-plugin-parallel": "^1.0" }, + "bin": [ + "bin/pest" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-1.x": "1.x-dev" + }, + "pest": { + "plugins": [ + "Pest\\Plugins\\Coverage", + "Pest\\Plugins\\Init", + "Pest\\Plugins\\Version", + "Pest\\Plugins\\Environment" + ] + }, + "laravel": { + "providers": [ + "Pest\\Laravel\\PestServiceProvider" + ] } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/Functions.php", + "src/Pest.php" + ], + "psr-4": { + "Pest\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An elegant PHP Testing Framework.", + "keywords": [ + "framework", + "pest", + "php", + "test", + "testing", + "unit" + ], + "support": { + "issues": "https://github.com/pestphp/pest/issues", + "source": "https://github.com/pestphp/pest/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "url": "https://github.com/lukeraymonddowning", + "type": "github" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/octoper", + "type": "github" + }, + { + "url": "https://github.com/olivernybroe", + "type": "github" + }, + { + "url": "https://github.com/owenvoke", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" + "time": "2022-08-29T10:42:13+00:00" }, { - "name": "phar-io/version", - "version": "3.2.1", + "name": "pestphp/pest-plugin", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + "url": "https://github.com/pestphp/pest-plugin.git", + "reference": "fc8519de148699fe612d9c669be60554cd2db4fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/fc8519de148699fe612d9c669be60554cd2db4fa", + "reference": "fc8519de148699fe612d9c669be60554cd2db4fa", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "composer-plugin-api": "^1.1 || ^2.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "pestphp/pest": "<1.0" + }, + "require-dev": { + "composer/composer": "^1.10.19", + "pestphp/pest": "^1.0", + "pestphp/pest-dev-tools": "dev-master" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "class": "Pest\\Plugin\\Manager" }, - "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Pest\\Plugin\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "authors": [ + "description": "The Pest plugin manager", + "keywords": [ + "framework", + "manager", + "pest", + "php", + "plugin", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin/tree/v1.0.0" + }, + "funding": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" }, { - "name": "Sebastian Heuer", + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2021-01-03T15:53:42+00:00" + }, + { + "name": "pestphp/pest-plugin-laravel", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-laravel.git", + "reference": "64996218006570f6f58f3c7ebb6f0c7bfb3c60b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/64996218006570f6f58f3c7ebb6f0c7bfb3c60b9", + "reference": "64996218006570f6f58f3c7ebb6f0c7bfb3c60b9", + "shasum": "" + }, + "require": { + "laravel/framework": "^7.0 || ^8.0 || ^9.0", + "pestphp/pest": "^1.7", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "orchestra/testbench": "^5.12.1 || ^6.7.2", + "pestphp/pest-dev-tools": "dev-master" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Autoload.php" + ], + "psr-4": { + "Pest\\Laravel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Pest Laravel Plugin", + "keywords": [ + "framework", + "laravel", + "pest", + "php", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-laravel/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2022-01-13T17:09:04+00:00" + }, + { + "name": "pestphp/pest-plugin-livewire", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-livewire.git", + "reference": "30e259e57c18dd40402e7fd29d46344a6cb9ff03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-livewire/zipball/30e259e57c18dd40402e7fd29d46344a6cb9ff03", + "reference": "30e259e57c18dd40402e7fd29d46344a6cb9ff03", + "shasum": "" + }, + "require": { + "livewire/livewire": "^1.2|^2.0", + "pestphp/pest": "^1.0", + "php": "^7.3|^8.0" + }, + "require-dev": { + "orchestra/testbench": "^6.4", + "pestphp/pest-dev-tools": "dev-master" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Autoload.php" + ], + "psr-4": { + "Pest\\Livewire\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Pest Livewire Plugin", + "keywords": [ + "framework", + "livewire", + "pest", + "php", + "plugin", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-livewire/tree/v1.0.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2021-01-03T15:37:46+00:00" + }, + { + "name": "pestphp/pest-plugin-parallel", + "version": "v0.3.1", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-parallel.git", + "reference": "67c0a49754e26cbe5ecd6965631351c0ede956fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-parallel/zipball/67c0a49754e26cbe5ecd6965631351c0ede956fa", + "reference": "67c0a49754e26cbe5ecd6965631351c0ede956fa", + "shasum": "" + }, + "require": { + "brianium/paratest": "^6.3", + "pestphp/pest-plugin": "^1.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "laravel/framework": "<8.55", + "nunomaduro/collision": "<5.8", + "pestphp/pest": "<1.16" + }, + "require-dev": { + "pestphp/pest": "dev-master", + "pestphp/pest-dev-tools": "dev-master" + }, + "type": "library", + "extra": { + "pest": { + "plugins": [ + "Pest\\Parallel\\Plugin" + ] + }, + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Autoload.php", + "build/RunnerWorker.php", + "build/BaseRunner.php" + ], + "psr-4": { + "Pest\\Parallel\\": "src/" + }, + "exclude-from-classmap": [ + "ParaTest\\Runners\\PHPUnit\\Worker\\RunnerWorker", + "ParaTest\\Runners\\PHPUnit\\BaseRunner" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Pest Parallel Plugin", + "keywords": [ + "framework", + "parallel", + "pest", + "php", + "plugin", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-parallel/tree/v0.3.1" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/lukeraymonddowning", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/octoper", + "type": "github" + }, + { + "url": "https://github.com/olivernybroe", + "type": "github" + }, + { + "url": "https://github.com/owenvoke", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2021-09-06T20:21:59+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", "email": "sebastian@phpeople.de", "role": "Developer" }, @@ -8233,6 +9223,285 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpmyadmin/sql-parser", + "version": "5.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpmyadmin/sql-parser.git", + "reference": "8ab99cd0007d880f49f5aa1807033dbfa21b1cb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/8ab99cd0007d880f49f5aa1807033dbfa21b1cb5", + "reference": "8ab99cd0007d880f49f5aa1807033dbfa21b1cb5", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "symfony/polyfill-mbstring": "^1.3" + }, + "conflict": { + "phpmyadmin/motranslator": "<3.0" + }, + "require-dev": { + "phpmyadmin/coding-standard": "^3.0", + "phpmyadmin/motranslator": "^4.0 || ^5.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/php-code-coverage": "*", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.16.1", + "vimeo/psalm": "^4.11", + "zumba/json-serializer": "^3.0" + }, + "suggest": { + "ext-mbstring": "For best performance", + "phpmyadmin/motranslator": "Translate messages to your favorite locale" + }, + "bin": [ + "bin/highlight-query", + "bin/lint-query", + "bin/tokenize-query" + ], + "type": "library", + "autoload": { + "psr-4": { + "PhpMyAdmin\\SqlParser\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "The phpMyAdmin Team", + "email": "developers@phpmyadmin.net", + "homepage": "https://www.phpmyadmin.net/team/" + } + ], + "description": "A validating SQL lexer and parser with a focus on MySQL dialect.", + "homepage": "https://github.com/phpmyadmin/sql-parser", + "keywords": [ + "analysis", + "lexer", + "parser", + "sql" + ], + "support": { + "issues": "https://github.com/phpmyadmin/sql-parser/issues", + "source": "https://github.com/phpmyadmin/sql-parser" + }, + "time": "2021-12-09T04:31:52+00:00" + }, + { + "name": "phpstan/extension-installer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/66c7adc9dfa38b6b5838a9fb728b68a7d8348051", + "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1 || ^2.0", + "php": "^7.1 || ^8.0", + "phpstan/phpstan": ">=0.11.6" + }, + "require-dev": { + "composer/composer": "^1.8", + "phing/phing": "^2.16.3", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.1.0" + }, + "time": "2020-12-13T13:06:13+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.8.5", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f6598a5ff12ca4499a836815e08b4d77a2ddeb20", + "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.8.5" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2022-09-07T16:05:32+00:00" + }, + { + "name": "phpstan/phpstan-deprecation-rules", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", + "support": { + "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.0.0" + }, + "time": "2021-09-23T11:02:21+00:00" + }, + { + "name": "phpstan/phpstan-phpunit", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-phpunit.git", + "reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4a3c437c09075736285d1cabb5c75bf27ed0bc84", + "reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.5.0" + }, + "conflict": { + "phpunit/phpunit": "<7.0" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPUnit extensions and rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-phpunit/issues", + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.1.1" + }, + "time": "2022-04-20T15:24:25+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.17", diff --git a/config/zeus-sky.php b/config/zeus-sky.php index 4d1dbe4..9dd412e 100644 --- a/config/zeus-sky.php +++ b/config/zeus-sky.php @@ -40,12 +40,12 @@ /** * this will be setup the default seo site title. read more about it in 'laravel-seo'. */ - 'site_title' => config('app.name', 'Laravel').' | Blogs', + 'site_title' => config('app.name', 'Laravel') . ' | Blogs', /** * this will be setup the default seo site description. read more about it in 'laravel-seo'. */ - 'site_description' => 'All about '.config('app.name', 'Laravel').' Blogs', + 'site_description' => 'All about ' . config('app.name', 'Laravel') . ' Blogs', /** * Num of recent pages/posts displayed on frontend. diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..e69de29 diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..a91953b --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,14 @@ +includes: + - phpstan-baseline.neon + +parameters: + level: 4 + paths: + - src + - config + - database + tmpDir: build/phpstan + checkOctaneCompatibility: true + checkModelProperties: true + checkMissingIterableValueType: false + diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..5b2cb87 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,39 @@ + + + + + tests + + + + + ./src + + + + + + + + + + + diff --git a/pint.json b/pint.json new file mode 100644 index 0000000..304d8f3 --- /dev/null +++ b/pint.json @@ -0,0 +1,11 @@ +{ + "preset": "laravel", + "rules": { + "blank_line_before_statement": true, + "concat_space": { + "spacing": "one" + }, + "method_argument_space": true, + "single_trait_insert_per_statement": true + } +} diff --git a/resources/views/status-clasess.blade.php b/resources/views/status-clasess.blade.php deleted file mode 100644 index 4544a86..0000000 --- a/resources/views/status-clasess.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -
-
diff --git a/resources/views/themes/zeus/addons/faq.blade.php b/resources/views/themes/zeus/addons/faq.blade.php index 5050368..3b1c117 100644 --- a/resources/views/themes/zeus/addons/faq.blade.php +++ b/resources/views/themes/zeus/addons/faq.blade.php @@ -1,29 +1,28 @@
@if(!$faqs->isEmpty()) -
-
-
-

- {{ __('question and answer') }} -

-
- @foreach($faqs as $faq) -
-
- +
+
+
+ {!! $faq->answer !!}
- @endforeach -
+
+ @endforeach
diff --git a/resources/views/themes/zeus/home.blade.php b/resources/views/themes/zeus/home.blade.php index be330d4..6bb86f7 100644 --- a/resources/views/themes/zeus/home.blade.php +++ b/resources/views/themes/zeus/home.blade.php @@ -10,11 +10,11 @@
@unless ($posts->isEmpty()) -

{{ __('Posts') }}

+

{{ __('Posts') }}

@if(request()->filled('search')) {{ __('Showing Search result of') }}: {{ request('search') }} - + @endif @each($theme.'.partial.post', $posts, 'post') diff --git a/resources/views/themes/zeus/page.blade.php b/resources/views/themes/zeus/page.blade.php index 4755003..c6511f5 100644 --- a/resources/views/themes/zeus/page.blade.php +++ b/resources/views/themes/zeus/page.blade.php @@ -2,12 +2,12 @@ @if($post->parent !== null)
  • - {{ $post->parent->title }} + {{ $post->parent->title }}
  • @endif
  • - {{ $post->title }} + {{ $post->title }}
  • @@ -15,9 +15,9 @@ @endif -
    +
    - {{ optional($post->published_at)->diffForHumans() ?? '' }} + {{ optional($post->published_at)->diffForHumans() ?? '' }}
    @unless ($post->tags->isEmpty()) @each($theme.'.partial.tag', $post->tags->where('type','category'), 'tag') @@ -27,16 +27,16 @@ @@ -46,7 +46,7 @@ @if(!$children->isEmpty())
    -

    children pages

    +

    children pages

    @foreach($children as $post) diff --git a/resources/views/themes/zeus/partial/post.blade.php b/resources/views/themes/zeus/partial/post.blade.php index af2d072..f3d3d8f 100644 --- a/resources/views/themes/zeus/partial/post.blade.php +++ b/resources/views/themes/zeus/partial/post.blade.php @@ -1,7 +1,7 @@
    -
    +
    - {{ optional($post->published_at)->diffForHumans() ?? '' }} + {{ optional($post->published_at)->diffForHumans() ?? '' }}
    @unless ($post->tags->isEmpty()) @each($theme.'.partial.tag', $post->tags->where('type','category'), 'tag') @@ -9,21 +9,21 @@
    diff --git a/resources/views/themes/zeus/partial/sidebar/authors.blade.php b/resources/views/themes/zeus/partial/sidebar/authors.blade.php index c0449cb..758d57c 100644 --- a/resources/views/themes/zeus/partial/sidebar/authors.blade.php +++ b/resources/views/themes/zeus/partial/sidebar/authors.blade.php @@ -1,6 +1,6 @@
    -

    Authors

    -
    +

    Authors

    +
    • isEmpty())
      -

      Categories

      -
      +

      Categories

      +
        @foreach($tags as $tag)
      • diff --git a/resources/views/themes/zeus/partial/sidebar/pages.blade.php b/resources/views/themes/zeus/partial/sidebar/pages.blade.php index cd449ee..09f90e8 100644 --- a/resources/views/themes/zeus/partial/sidebar/pages.blade.php +++ b/resources/views/themes/zeus/partial/sidebar/pages.blade.php @@ -1,7 +1,7 @@ @unless($pages->isEmpty())
      • - {{ $post->title }} + {{ $post->title }}
      • @@ -13,9 +13,9 @@ @endif -
        +
        - {{ optional($post->published_at)->diffForHumans() ?? '' }} + {{ optional($post->published_at)->diffForHumans() ?? '' }}
        @unless ($post->tags->isEmpty()) @each($theme.'.partial.tag', $post->tags->where('type','category'), 'tag') @@ -25,16 +25,16 @@ @@ -44,7 +44,7 @@
        -

        {{ __('Related Posts') }}

        +

        {{ __('Related Posts') }}

        @foreach($related as $post) diff --git a/routes/web.php b/routes/web.php index a465e49..63a5a68 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,6 +1,7 @@ middleware(config('zeus-sky.middleware')) ->group(function () { Route::get('/', Posts::class)->name('blogs'); - Route::get(config('zeus-sky.post_uri_prefix').'/{slug}', Post::class)->name('post'); - Route::get(config('zeus-sky.page_uri_prefix').'/{slug}', Page::class)->name('page'); + Route::get(config('zeus-sky.post_uri_prefix') . '/{slug}', Post::class)->name('post'); + Route::get(config('zeus-sky.page_uri_prefix') . '/{slug}', Page::class)->name('page'); Route::get('{type}/{slug}', Tags::class)->name('tags'); Route::get('passConf', function () { - session()->put(request('postID').'-'.request('password'), request('password')); + session()->put(request('postID') . '-' . request('password'), request('password')); return redirect()->back()->with('status', 'sorry, password incorrect!'); }); }); if (in_array('LaraZeus\Sky\Filament\Resources\FaqResource', config('zeus-sky.enabled_resources'))) { - Route::get(config('zeus-sky.faq_uri_prefix').'', \LaraZeus\Sky\Http\Livewire\Faq::class)->name('faq'); + Route::get(config('zeus-sky.faq_uri_prefix') . '', Faq::class)->name('faq'); } diff --git a/src/Filament/Resources/FaqResource.php b/src/Filament/Resources/FaqResource.php index 4506176..94cdaf3 100644 --- a/src/Filament/Resources/FaqResource.php +++ b/src/Filament/Resources/FaqResource.php @@ -6,7 +6,7 @@ use Filament\Forms\Components\Textarea; use Filament\Resources\Form; use Filament\Resources\Table; -use Filament\Tables; +use Filament\Tables\Columns\TextColumn; use LaraZeus\Sky\Filament\Resources\FaqResource\Pages; use LaraZeus\Sky\Models\Faq; @@ -45,8 +45,17 @@ public static function form(Form $form): Form { return $form ->schema([ - Textarea::make('question')->label(__('Question'))->required()->maxLength(65535)->columnSpan(2), - RichEditor::make('answer')->label(__('Answer'))->required()->maxLength(65535)->columnSpan(2), + Textarea::make('question') + ->label(__('Question')) + ->required() + ->maxLength(65535) + ->columnSpan(2), + + RichEditor::make('answer') + ->label(__('Answer')) + ->required() + ->maxLength(65535) + ->columnSpan(2), ]); } @@ -54,7 +63,7 @@ public static function table(Table $table): Table { return $table ->columns([ - Tables\Columns\TextColumn::make('question'), + TextColumn::make('question'), ]); } diff --git a/src/Filament/Resources/PageResource.php b/src/Filament/Resources/PageResource.php index 7de3553..47413e9 100644 --- a/src/Filament/Resources/PageResource.php +++ b/src/Filament/Resources/PageResource.php @@ -51,23 +51,44 @@ public static function form(Form $form): Form ->afterStateUpdated(function (Closure $set, $state) { $set('slug', Str::slug($state)); }), - TinyEditor::make('content')->label(__('Post Content'))->showMenuBar()->required(), + + TinyEditor::make('content') + ->label(__('Post Content')) + ->showMenuBar() + ->required(), ]), - ])->columnSpan(3), + ]) + ->columnSpan(3), Grid::make()->schema([ Section::make(__('SEO')) - ->description(__('SEO Settings')) - ->schema([ - Hidden::make('user_id')->default(auth()->user()->id)->required(), - Hidden::make('post_type')->default('page')->required(), + ->description(__('SEO Settings'))->schema([ + Hidden::make('user_id') + ->required() + ->default(auth()->user()->id), + + Hidden::make('post_type') + ->default('page') + ->required(), + Textarea::make('description') ->maxLength(255) ->label(__('Description')) ->hint(__('Write an excerpt for your post')), - TextInput::make('slug')->required()->maxLength(255)->label(__('Post Slug')), - Select::make('parent_id')->options(Post::wherePostType('page')->pluck('title', 'id'))->label(__('Parent Page')), - TextInput::make('ordering')->integer()->label(__('Page Order'))->default(1), + + TextInput::make('slug') + ->required() + ->maxLength(255) + ->label(__('Post Slug')), + + Select::make('parent_id') + ->options(Post::wherePostType('page')->pluck('title', 'id')) + ->label(__('Parent Page')), + + TextInput::make('ordering') + ->integer() + ->label(__('Page Order')) + ->default(1), ]) ->collapsible(), @@ -80,15 +101,23 @@ public static function form(Form $form): Form ->required() ->reactive() ->options(PostStatus::pluck('label', 'name')), - TextInput::make('password')->label(__('Password'))->reactive() + + TextInput::make('password') + ->label(__('Password')) + ->reactive() ->visible(fn (Closure $get): bool => $get('status') === 'private'), - DateTimePicker::make('published_at')->label(__('published at'))->default(now()), + + DateTimePicker::make('published_at') + ->label(__('published at')) + ->default(now()), ]) ->collapsible(), Section::make(__('Featured Image')) ->schema([ - SpatieMediaLibraryFileUpload::make('featured_image')->collection('pages')->label(''), + SpatieMediaLibraryFileUpload::make('featured_image') + ->collection('pages') + ->label(''), ]) ->collapsible(), ])->columnSpan(1), @@ -114,9 +143,12 @@ public static function table(Table $table): Table ]) ->defaultSort('id', 'desc') ->filters([ - MultiSelectFilter::make('status')->options(PostStatus::pluck('label', 'name')), + MultiSelectFilter::make('status') + ->label(__('Status')) + ->options(PostStatus::pluck('label', 'name')), - Filter::make('password')->label(__('Password Protected')) + Filter::make('password') + ->label(__('Password Protected')) ->query(fn (Builder $query): Builder => $query->whereNotNull('password')), ]); } diff --git a/src/Filament/Resources/PostResource.php b/src/Filament/Resources/PostResource.php index c87aa34..7027724 100644 --- a/src/Filament/Resources/PostResource.php +++ b/src/Filament/Resources/PostResource.php @@ -51,7 +51,11 @@ public static function form(Form $form): Form ->afterStateUpdated(function (Closure $set, $state) { $set('slug', Str::slug($state)); }), - TinyEditor::make('content')->label(__('Post Content'))->showMenuBar()->required(), + + TinyEditor::make('content') + ->label(__('Post Content')) + ->showMenuBar() + ->required(), ]), ])->columnSpan(3), @@ -59,21 +63,36 @@ public static function form(Form $form): Form Section::make(__('SEO')) ->description(__('SEO Settings')) ->schema([ - Hidden::make('user_id')->default(auth()->user()->id)->required(), - Hidden::make('post_type')->default('post')->required(), + Hidden::make('user_id') + ->default(auth()->user()->id) + ->required(), + + Hidden::make('post_type') + ->default('post') + ->required(), + Textarea::make('description') ->maxLength(255) ->label(__('Description')) ->hint(__('Write an excerpt for your post')), - TextInput::make('slug')->required()->maxLength(255)->label(__('Post Slug')), + + TextInput::make('slug') + ->required() + ->maxLength(255) + ->label(__('Post Slug')), ]) ->collapsible(), Section::make(__('Tags and Categories')) ->description(__('Tags and Categories Options')) ->schema([ - SpatieTagsInput::make('tags')->type('tag')->label(__('Tags')), - SpatieTagsInput::make('category')->type('category')->label(__('Categories')), + SpatieTagsInput::make('tags') + ->type('tag') + ->label(__('Tags')), + + SpatieTagsInput::make('category') + ->type('category') + ->label(__('Categories')), ]) ->collapsible(), @@ -86,16 +105,26 @@ public static function form(Form $form): Form ->required() ->reactive() ->options(PostStatus::pluck('label', 'name')), - TextInput::make('password')->label(__('Password'))->reactive() + + TextInput::make('password') + ->label(__('Password')) + ->reactive() ->visible(fn (Closure $get): bool => $get('status') === 'private'), - DateTimePicker::make('published_at')->label(__('published at'))->default(now()), - DateTimePicker::make('sticky_until')->label(__('Sticky Until')), + + DateTimePicker::make('published_at') + ->label(__('published at')) + ->default(now()), + + DateTimePicker::make('sticky_until') + ->label(__('Sticky Until')), ]) ->collapsible(), Section::make(__('Featured Image')) ->schema([ - SpatieMediaLibraryFileUpload::make('featured_image')->collection('posts')->label(''), + SpatieMediaLibraryFileUpload::make('featured_image') + ->collection('posts') + ->label(''), ]) ->collapsible(), ])->columnSpan(1), @@ -119,32 +148,47 @@ public static function table(Table $table): Table ->view('zeus-sky::filament.columns.status-desc') ->tooltip(fn (Post $record): string => $record->published_at->format('Y/m/d | H:i A')), - SpatieTagsColumn::make('tags')->label(__('Post Tags'))->type('tag'), - SpatieTagsColumn::make('category')->label(__('Post Category'))->type('category'), + SpatieTagsColumn::make('tags') + ->label(__('Post Tags')) + ->type('tag'), + + SpatieTagsColumn::make('category') + ->label(__('Post Category')) + ->type('category'), ]) ->defaultSort('id', 'desc') ->filters([ - MultiSelectFilter::make('status')->options(PostStatus::pluck('label', 'name')), + MultiSelectFilter::make('status') + ->label(__('Status')) + ->options(PostStatus::pluck('label', 'name')), - Filter::make('password')->label(__('Password Protected')) + Filter::make('password') + ->label(__('Password Protected')) ->query(fn (Builder $query): Builder => $query->whereNotNull('password')), - Filter::make('sticky')->label(__('Still Sticky')) + Filter::make('sticky') + ->label(__('Still Sticky')) ->query(fn (Builder $query): Builder => $query->sticky()), - Filter::make('not_sticky')->label(__('Not Sticky')) - ->query(fn (Builder $query): Builder => $query - ->whereDate('sticky_until', '<=', now()) - ->orWhereNull('sticky_until') + Filter::make('not_sticky') + ->label(__('Not Sticky')) + ->query( + fn (Builder $query): Builder => $query + ->whereDate('sticky_until', '<=', now()) + ->orWhereNull('sticky_until') ), - Filter::make('sticky_only')->label(__('Sticky Only')) - ->query(fn (Builder $query): Builder => $query - ->wherePostType('post') - ->whereNotNull('sticky_until') + Filter::make('sticky_only') + ->label(__('Sticky Only')) + ->query( + fn (Builder $query): Builder => $query + ->wherePostType('post') + ->whereNotNull('sticky_until') ), - MultiSelectFilter::make('tags')->relationship('tags', 'name')->label(__('Tags')), + MultiSelectFilter::make('tags') + ->relationship('tags', 'name') + ->label(__('Tags')), ]); } diff --git a/src/Filament/Resources/TagResource.php b/src/Filament/Resources/TagResource.php index 451a74a..5dbfc02 100644 --- a/src/Filament/Resources/TagResource.php +++ b/src/Filament/Resources/TagResource.php @@ -34,11 +34,17 @@ public static function form(Form $form): Form { return $form ->schema([ - TextInput::make('name')->required()->maxLength(255)->label(__('Tag.Name'))->reactive() + TextInput::make('name') + ->required() + ->maxLength(255) + ->label(__('Tag.Name')) + ->reactive() ->afterStateUpdated(function (Closure $set, $state) { $set('slug', Str::slug($state)); }), - TextInput::make('slug')->required()->maxLength(255), + TextInput::make('slug') + ->required() + ->maxLength(255), Select::make('type') ->options([ 'tag' => 'Tag', diff --git a/src/Http/Livewire/Faq.php b/src/Http/Livewire/Faq.php index 8c33906..582771c 100644 --- a/src/Http/Livewire/Faq.php +++ b/src/Http/Livewire/Faq.php @@ -11,14 +11,14 @@ public function render() { seo() ->title(__('FAQ')) - ->description(__('FAQs').' '.config('zeus-sky.site_description', 'Laravel')) + ->description(__('FAQs') . ' ' . config('zeus-sky.site_description', 'Laravel')) ->site(config('zeus-sky.site_title', 'Laravel')) - ->rawTag('favicon', '') - ->rawTag('') + ->rawTag('favicon', '') + ->rawTag('') ->withUrl() ->twitter(); - return view(app('theme').'.addons.faq') + return view(app('theme') . '.addons.faq') ->with('faqs', Faqs::get()) ->layout(config('zeus-sky.layout')); } diff --git a/src/Http/Livewire/Page.php b/src/Http/Livewire/Page.php index 3cd1ea1..417e64d 100644 --- a/src/Http/Livewire/Page.php +++ b/src/Http/Livewire/Page.php @@ -22,16 +22,17 @@ public function render() seo() ->title($this->page->title) - ->description(($this->page->description ?? '').' '.config('zeus-sky.site_description', 'Laravel')) + ->description(($this->page->description ?? '') . ' ' . config('zeus-sky.site_description', 'Laravel')) ->site(config('zeus-sky.site_title', 'Laravel')) - ->rawTag('favicon', '') - ->rawTag('') + ->rawTag('favicon', '') + ->rawTag('') ->withUrl() ->twitter(); - return view(app('theme').'.page') + return view(app('theme') . '.page') ->with([ 'post' => $this->page, + /** @phpstan-ignore-next-line */ 'children' => Post::with('parent')->where('parent_id', $this->page->id)->get(), ]) ->layout(config('zeus-sky.layout')); diff --git a/src/Http/Livewire/Post.php b/src/Http/Livewire/Post.php index 8bfa6ea..aaab493 100644 --- a/src/Http/Livewire/Post.php +++ b/src/Http/Livewire/Post.php @@ -22,14 +22,14 @@ public function render() seo() ->title($this->post->title) - ->description(($this->post->description ?? '').' '.config('zeus-sky.site_description', 'Laravel')) + ->description(($this->post->description ?? '') . ' ' . config('zeus-sky.site_description', 'Laravel')) ->site(config('zeus-sky.site_title', 'Laravel')) - ->rawTag('favicon', '') - ->rawTag('') + ->rawTag('favicon', '') + ->rawTag('') ->withUrl() ->twitter(); - return view(app('theme').'.post') + return view(app('theme') . '.post') ->with('post', $this->post) ->with('related', postModel::related($this->post)->take(4)->get()) ->layout(config('zeus-sky.layout')); diff --git a/src/Http/Livewire/Posts.php b/src/Http/Livewire/Posts.php index 624629d..e6e4b2b 100644 --- a/src/Http/Livewire/Posts.php +++ b/src/Http/Livewire/Posts.php @@ -38,14 +38,14 @@ public function render() seo() ->title(__('Posts')) - ->description(__('Posts').' '.config('zeus-sky.site_description', 'Laravel')) + ->description(__('Posts') . ' ' . config('zeus-sky.site_description', 'Laravel')) ->site(config('zeus-sky.site_title', 'Laravel')) - ->rawTag('favicon', '') - ->rawTag('') + ->rawTag('favicon', '') + ->rawTag('') ->withUrl() ->twitter(); - return view(app('theme').'.home') + return view(app('theme') . '.home') ->with([ 'posts' => $posts, 'pages' => $pages, diff --git a/src/Http/Livewire/SearchHelpers.php b/src/Http/Livewire/SearchHelpers.php index 9eb84a3..8e36ec9 100644 --- a/src/Http/Livewire/SearchHelpers.php +++ b/src/Http/Livewire/SearchHelpers.php @@ -33,7 +33,7 @@ public function parsing(string $attribute, array $words): string $pattern = []; foreach ($replace as $k => $fword) { - $pattern[] = '/\b('.$fword.')(?!>)\b/i'; + $pattern[] = '/\b(' . $fword . ')(?!>)\b/i'; $replace[$k] = sprintf('$1', $class); } diff --git a/src/Http/Livewire/Tags.php b/src/Http/Livewire/Tags.php index 5580241..33056fb 100644 --- a/src/Http/Livewire/Tags.php +++ b/src/Http/Livewire/Tags.php @@ -27,13 +27,13 @@ public function render() seo() ->title($this->tag->name) ->site(config('app.name', 'Laravel')) - ->description(config('zeus-sky.site_description').' '.__('Show All posts in').' '.$this->tag->name) - ->rawTag('favicon', '') - ->rawTag('') + ->description(config('zeus-sky.site_description') . ' ' . __('Show All posts in') . ' ' . $this->tag->name) + ->rawTag('favicon', '') + ->rawTag('') ->withUrl() ->twitter(); - return view(app('theme').'.category') + return view(app('theme') . '.category') ->with([ 'posts' => $this->tag->postsPublished, ]) diff --git a/src/Models/Post.php b/src/Models/Post.php index c2c3db2..3baecda 100644 --- a/src/Models/Post.php +++ b/src/Models/Post.php @@ -13,7 +13,11 @@ class Post extends Model implements HasMedia { - use HasFactory, HasTags, InteractsWithMedia, PostScope, HasTranslations; + use HasFactory; + use HasTags; + use InteractsWithMedia; + use PostScope; + use HasTranslations; public $translatable = [ 'title', @@ -55,9 +59,9 @@ public function getRouteKeyName() public function statusDesc(): string { $PostStatus = PostStatus::where('name', $this->status)->first(); - $icon = Blade::render('@svg("'.$PostStatus->icon.'","w-4 h-4 inline-flex")'); + $icon = Blade::render('@svg("' . $PostStatus->icon . '","w-4 h-4 inline-flex")'); - return " ".$icon." {$PostStatus->label}"; + return " " . $icon . " {$PostStatus->label}"; } public function author() diff --git a/src/Models/PostStatus.php b/src/Models/PostStatus.php index 43faa6d..eb1aa5d 100644 --- a/src/Models/PostStatus.php +++ b/src/Models/PostStatus.php @@ -11,14 +11,14 @@ class PostStatus extends Model public function getRows() { return [ - ['name' => 'publish', 'label' => __('Publish'), 'class' => 'success', 'icon' => 'iconpark-filesuccessone'], - ['name' => 'future', 'label' => __('Future'), 'class' => 'warning', 'icon' => 'iconpark-filedateone'], - ['name' => 'draft', 'label' => __('Draft'), 'class' => 'secondary', 'icon' => 'iconpark-filehidingone'], - ['name' => 'auto-draft', 'label' => __('Auto draft'), 'class' => 'primary', 'icon' => 'iconpark-filesearchone'], - ['name' => 'pending', 'label' => __('Pending'), 'class' => 'info', 'icon' => 'iconpark-fileeditingone'], - ['name' => 'private', 'label' => __('Private'), 'class' => 'danger', 'icon' => 'iconpark-filelockone'], - ['name' => 'trash', 'label' => __('Trash'), 'class' => 'danger', 'icon' => 'iconpark-filetextone'], - ['name' => 'inherit', 'label' => __('Inherit'), 'class' => 'primary', 'icon' => 'iconpark-filetipsone'], + ['name' => 'publish', 'label' => __('Publish'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-success-700 bg-success-500/10', 'icon' => 'iconpark-filesuccessone'], + ['name' => 'future', 'label' => __('Future'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-warning-700 bg-warning-500/10', 'icon' => 'iconpark-filedateone'], + ['name' => 'draft', 'label' => __('Draft'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-secondary-700 bg-secondary-500/10', 'icon' => 'iconpark-filehidingone'], + ['name' => 'auto-draft', 'label' => __('Auto draft'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-primary-700 bg-primary-500/10', 'icon' => 'iconpark-filesearchone'], + ['name' => 'pending', 'label' => __('Pending'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-info-700 bg-info-500/10', 'icon' => 'iconpark-fileeditingone'], + ['name' => 'private', 'label' => __('Private'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-danger-700 bg-danger-500/10', 'icon' => 'iconpark-filelockone'], + ['name' => 'trash', 'label' => __('Trash'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-danger-700 bg-danger-500/10', 'icon' => 'iconpark-filetextone'], + ['name' => 'inherit', 'label' => __('Inherit'), 'class' => 'px-2 py-0.5 text-xs rounded-xl text-primary-700 bg-primary-500/10', 'icon' => 'iconpark-filetipsone'], ]; } diff --git a/src/Models/Tag.php b/src/Models/Tag.php index 3251d9c..0efbc01 100644 --- a/src/Models/Tag.php +++ b/src/Models/Tag.php @@ -2,6 +2,10 @@ namespace LaraZeus\Sky\Models; +/** + * @property string $slug + * @property string $type + */ class Tag extends \Spatie\Tags\Tag { public function posts() diff --git a/src/SkyServiceProvider.php b/src/SkyServiceProvider.php index 46ad603..28b8242 100644 --- a/src/SkyServiceProvider.php +++ b/src/SkyServiceProvider.php @@ -15,10 +15,10 @@ class SkyServiceProvider extends PluginServiceProvider public function boot() { - View::share('theme', 'zeus-sky::themes.'.config('zeus-sky.theme')); + View::share('theme', 'zeus-sky::themes.' . config('zeus-sky.theme', 'zeus')); App::singleton('theme', function () { - return 'zeus-sky::themes.'.config('zeus-sky.theme'); + return 'zeus-sky::themes.' . config('zeus-sky.theme', 'zeus'); }); return parent::boot(); diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php new file mode 100644 index 0000000..5d36321 --- /dev/null +++ b/tests/ExampleTest.php @@ -0,0 +1,5 @@ +toBeTrue(); +}); diff --git a/tests/Pest.php b/tests/Pest.php new file mode 100644 index 0000000..6e7808b --- /dev/null +++ b/tests/Pest.php @@ -0,0 +1,5 @@ +in(__DIR__); diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..de59bf6 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,40 @@ + 'LaraZeus\Sky\\Database\\Factories\\' . class_basename($modelName) . 'Factory' + ); + } + + protected function getPackageProviders($app) + { + return [ + LivewireServiceProvider::class, + FilamentServiceProvider::class, + SkyServiceProvider::class, + ]; + } + + public function getEnvironmentSetUp($app) + { + config()->set('database.default', 'testing'); + + /* + $migration = include __DIR__.'/../database/migrations/create_Sky_table.php.stub'; + $migration->up(); + */ + } +}