diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..8245b47 --- /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 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 5d4e75a..c36843c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -8,7 +8,4 @@ contact_links: about: Share ideas for new features - name: Report a security issue url: https://github.com/MichaelNabil230/laravel-block-ip/security/policy - about: Learn how to notify us for sensitive bugs - - name: Report a bug - url: https://github.com/MichaelNabil230/laravel-block-ip/issues/new - about: Report a reproducible bug + about: Learn how to notify us for sensitive bugs \ No newline at end of file diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 4af8e6b..0796189 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -10,20 +10,19 @@ jobs: runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' }} steps: - - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v1.5.1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - + - name: Auto-merge Dependabot PRs for semver-minor updates if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - + - name: Auto-merge Dependabot PRs for semver-patch updates if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} run: gh pr merge --auto --merge "$PR_URL" diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index bdef9a9..1edf1dc 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -1,6 +1,12 @@ name: Fix PHP code style issues -on: [push] +on: + push: + paths: + - "**.php" + +permissions: + contents: write jobs: php-code-styling: @@ -13,7 +19,7 @@ jobs: ref: ${{ github.head_ref }} - name: Fix PHP code style issues - uses: aglipanci/laravel-pint-action@2.3.0 + uses: aglipanci/laravel-pint-action@2.2.0 - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 9d41c0c..0a3fd47 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -3,8 +3,8 @@ name: PHPStan on: push: paths: - - '**.php' - - 'phpstan.neon.dist' + - "**.php" + - "phpstan.neon.dist" jobs: phpstan: @@ -16,7 +16,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: "8.1" coverage: none - name: Install composer dependencies diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index eeb3eae..b5d6720 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,11 +14,12 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [8.2, 8.1] - laravel: [9.*] + laravel: [10.*] stability: [prefer-lowest, prefer-stable] include: - - laravel: 9.* - testbench: 7.* + - laravel: 10.* + testbench: 8.* + carbon: ^2.63 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} @@ -40,11 +41,11 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: List Installed Dependencies run: composer show -D - name: Execute tests - run: vendor/bin/pest + run: vendor/bin/pest --ci diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index b20f3b6..8c12ba9 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -4,6 +4,9 @@ on: release: types: [released] +permissions: + contents: write + jobs: update: runs-on: ubuntu-latest diff --git a/composer.json b/composer.json index 4d09f87..42bd18e 100644 --- a/composer.json +++ b/composer.json @@ -17,31 +17,32 @@ ], "require": { "php": "^8.1", - "illuminate/contracts": "^9.0", - "spatie/laravel-package-tools": "^1.13.0" + "spatie/laravel-package-tools": "^1.15.0", + "illuminate/contracts": "^10.0" }, "require-dev": { - "laravel/pint": "^1.0", - "laravel/slack-notification-channel": "^2.4", - "nunomaduro/collision": "^6.0", - "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^7.0", - "pestphp/pest": "^1.21", - "pestphp/pest-plugin-laravel": "^1.1", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "laravel/pint": "^1.10", + "laravel/slack-notification-channel": "^2.5", + "nunomaduro/collision": "^7", + "nunomaduro/larastan": "^2.6.0", + "orchestra/testbench": "^8.5.5", + "pestphp/pest": "^2.6.2", + "pestphp/pest-plugin-arch": "^2.2", + "pestphp/pest-plugin-laravel": "^2.0.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.13", + "phpunit/phpunit": "^10.2" }, "autoload": { "psr-4": { - "MichaelNabil230\\BlockIp\\": "src", - "MichaelNabil230\\BlockIp\\Database\\Factories\\": "database/factories" + "MichaelNabil230\\BlockIp\\": "src/", + "MichaelNabil230\\BlockIp\\Database\\Factories\\": "database/factories/" } }, "autoload-dev": { "psr-4": { - "MichaelNabil230\\BlockIp\\Tests\\": "tests" + "MichaelNabil230\\BlockIp\\Tests\\": "tests/" } }, "scripts": { @@ -67,4 +68,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +}