Skip to content

Feature Laravel 12 #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
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
id: package-version
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
id: php-version
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
id: laravel-version
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
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
3 changes: 1 addition & 2 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:

- name: Dependabot metadata
id: metadata

uses: dependabot/[email protected]
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
run: ./vendor/bin/phpstan --error-format=github
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 9 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<img src="https://banners.beyondco.de/Laravel%20Zammad.png?theme=light&packageManager=composer+require&packageName=codebar-ag%2Flaravel-zammad&pattern=circuitBoard&style=style_2&description=An+opinionated+way+to+integrate+Zammad+with+Laravel&md=1&showWatermark=0&fontSize=150px&images=ticket&widths=500&heights=500">

[![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.
Expand All @@ -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

Expand Down
36 changes: 17 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down