diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 83b7546..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -# These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [StanBarrows] diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7546b77..bc5e177 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,18 +1,18 @@ name: Bug Report description: Report an Issue or Bug with the Package title: "[Bug]: " -labels: ["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. + 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. + placeholder: "I cannot currently do X thing because when I do, it breaks X thing." validations: required: true - type: input @@ -20,7 +20,8 @@ body: attributes: label: Package Version description: What version of our Package are you running? Please be as specific as possible - placeholder: 1.0.0 + placeholder: "12.0" + value: "12.0" validations: required: true - type: input @@ -28,7 +29,8 @@ body: attributes: label: PHP Version description: What version of PHP are you running? Please be as specific as possible - placeholder: 8.3.0 + placeholder: "8.4.0" + value: "8.4.0" validations: required: true - type: input @@ -36,7 +38,8 @@ body: attributes: label: Laravel Version description: What version of Laravel are you running? Please be as specific as possible - placeholder: 11.0.0 + placeholder: "12.0.0" + value: "12.0.0" validations: required: true - type: dropdown diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0bc378d --- /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" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 3c2cfe9..2df1631 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -13,8 +13,7 @@ jobs: - name: Dependabot metadata id: metadata - - uses: dependabot/fetch-metadata@v1.4.0 + uses: dependabot/fetch-metadata@v2.3.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 76d32de..0d4a013 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,6 +15,6 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index cc0c956..ef2fadf 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -8,14 +8,14 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - name: Fix PHP code style issues - uses: aglipanci/laravel-pint-action@2.2.0 + uses: aglipanci/laravel-pint-action@2.5 - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 8148c24..b0cde6a 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -2,25 +2,25 @@ name: PHPStan on: push: - branches: [ main ] - pull_request: - branches: [ main ] + paths: + - '**.php' + - 'phpstan.neon.dist' jobs: phpstan: name: phpstan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.4' coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 - name: Run PHPStan - run: ./vendor/bin/phpstan analyse src --error-format=github \ No newline at end of file + run: ./vendor/bin/phpstan --error-format=github diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..afa28ff --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: release + +on: + pull_request: + types: + - closed + branches: + - main +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Bump version and push tag + uses: anothrNick/github-tag-action@master + env: + GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} + WITH_V: true + RELEASE_BRANCHES: main + DEFAULT_BUMP: minor diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c6a1732..097f540 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,16 +13,16 @@ jobs: fail-fast: true max-parallel: 1 matrix: - os: [ ubuntu-latest, windows-latest ] - php: [ 8.2, 8.3 ] - laravel: [ 11.* ] + os: [ ubuntu-latest ] + php: [ 8.2, 8.3, 8.4 ] + laravel: [ 12.* ] stability: [ prefer-lowest, prefer-stable ] 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 @@ -41,7 +41,7 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Set phpunit.xml + - name: Execute tests run: cp phpunit.xml.dist phpunit.xml - name: Execute tests @@ -51,10 +51,9 @@ jobs: ZAMMAD_TOKEN: ${{ secrets.ZAMMAD_TOKEN }} ZAMMAD_OBJECT_REFERENCE_ERROR_IGNORE: true - - name: Store test reports + - name: Store Log Artifacts + if: failure() uses: actions/upload-artifact@v4 with: - name: Store report - retention-days: 1 - path: | - ./reports + name: Store report artifacts + path: ./vendor/orchestra/testbench-core/laravel/storage/logs diff --git a/README.md b/README.md index c3815d2..33d5778 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ [![Latest Version on Packagist](https://img.shields.io/packagist/v/codebar-ag/laravel-zammad.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-zammad) +[![GitHub-Tests](https://github.com/codebar-ag/laravel-zammad/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-zammad/actions/workflows/run-tests.yml) +[![GitHub Code Style](https://github.com/codebar-ag/laravel-zammad/actions/workflows/fix-php-code-style-issues.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-zammad/actions/workflows/fix-php-code-style-issues.yml) [![Total Downloads](https://img.shields.io/packagist/dt/codebar-ag/laravel-zammad.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-zammad) -[![run-tests](https://github.com/codebar-ag/laravel-zammad/actions/workflows/run-tests.yml/badge.svg)](https://github.com/codebar-ag/laravel-zammad/actions/workflows/run-tests.yml) -[![PHPStan](https://github.com/codebar-ag/laravel-zammad/actions/workflows/phpstan.yml/badge.svg)](https://github.com/codebar-ag/laravel-zammad/actions/workflows/phpstan.yml) This package was developed to give you a quick start to communicate with the Zammad REST API. It is used to query the most common endpoints. @@ -19,11 +19,13 @@ features to manage customer communication. ## πŸ›  Requirements -| Package | PHP | Laravel | Zammad | -|-----------|--------|------------------|----------| -| >v3.0 | >8.2 | > Laravel 10.0 | βœ… | -| >v2.0 | >8.1 | > Laravel 9.0 | βœ… | -| >v1.0 | >8.0 | > Laravel 8.12 | βœ… | +| Package | PHP | Laravel | Zammad | +|-----------|-------------|----------------|----------| +| v12.0 | ^8.2 - ^8.4 | Laravel 12.0 | βœ… | +| v11.0 | ^8.2 - ^8.3 | Laravel 11.0 | βœ… | +| v3.0 | 8.2 | Laravel 10.0 | βœ… | +| v2.0 | 8.1 | Laravel 9.0 | βœ… | +| v1.0 | 8.0 | Laravel 8.12 | βœ… | ## βš™οΈ Installation diff --git a/composer.json b/composer.json index b1a5670..3a09f78 100644 --- a/composer.json +++ b/composer.json @@ -11,36 +11,34 @@ "license": "MIT", "authors": [ { - "name": "Sebastian Steiger", - "email": "sebastian.fix@codebar.ch", + "name": "Sebastian BΓΌrgin-Fix", + "email": "sebastian.buergin@buergin.ch", "homepage": "https://www.codebar.ch", - "role": "Developer" + "role": "Sofware-Engineer" }, { "name": "Rhys Lees", - "role": "Software-Developer" + "role": "Software-Engineer" } ], "require": { - "php": ">=8.2", + "php": "8.2.*|8.3.*|8.4.*", "guzzlehttp/guzzle": "^7.8", - "illuminate/contracts": "^11.0", - "spatie/laravel-package-tools": "^1.16", + "illuminate/contracts": "^12.0", + "spatie/laravel-package-tools": "^1.19", + "saloonphp/cache-plugin": "^3.0", "saloonphp/laravel-plugin": "^3.5", - "saloonphp/saloon": "^3.7" + "saloonphp/saloon": "^3.10.1" }, "require-dev": { - "laravel/pint": "^1.13", - "nunomaduro/collision": "^8.1", - "larastan/larastan": "^2.9", - "pestphp/pest": "^2.3", - "orchestra/testbench": "^9.0", - "pestphp/pest-plugin-laravel": "^2.2", - "pestphp/pest-plugin-arch": "^2.7", - "phpstan/extension-installer": "^1.3", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "spatie/laravel-ray": "^1.33" + "laravel/pint": "^1.21", + "larastan/larastan": "^v3.1", + "orchestra/testbench": "^10.0", + "pestphp/pest": "^3.7", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "spatie/laravel-ray": "^1.39" }, "autoload": { "psr-4": {