Skip to content

Commit

Permalink
Merge pull request #17 from codebar-ag/feature-l11
Browse files Browse the repository at this point in the history
Laravel 11
  • Loading branch information
StanBarrows authored Mar 3, 2025
2 parents d791ae0 + 1f6fb9a commit 15a291c
Show file tree
Hide file tree
Showing 24 changed files with 151 additions and 131 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.3
uses: dependabot/fetch-metadata@v1.6
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: ${{ secrets.MY_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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest

env:
PHP_VERSION: '8.3'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: ${{ env.PHP_VERSION }}
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 analyse src --error-format=github
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release

on:
pull_request:
types:
- closed
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest

env:
INITIAL_VERSION: 11.0.0
RELEASE_BRANCHES: main
DEFAULT_BUMP: patch

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
WITH_V: true
INITIAL_VERSION: ${{ env.INITIAL_VERSION }}
RELEASE_BRANCHES: ${{ env.RELEASE_BRANCHES }}
DEFAULT_BUMP: ${{ env.DEFAULT_BUMP }}
11 changes: 4 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ jobs:
matrix:
os: [ ubuntu-latest, windows-latest ]
php: [ 8.2, 8.3 ]
laravel: [ 10.* ]
laravel: [ 11.* ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: 10.*
testbench: 8.*

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 +38,7 @@ 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 }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Set phpunit.xml
Expand All @@ -51,7 +48,7 @@ jobs:
run: vendor/bin/pest

- name: Store test reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Store report
retention-days: 1
Expand Down
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"pest_2.36.0","defects":[],"times":{"P\\Tests\\Requests\\SingleTicketRequestTest::__pest_evaluable_it_can_get_a_single_ticket":0.001,"P\\Tests\\Requests\\CreateSingleTicketRequestTest::__pest_evaluable_it_can_get_create_a_single_ticket":0.046,"P\\Tests\\Core\\ArchTest::__pest_evaluable_it_will_not_use_any_debug_function":0.059,"P\\Tests\\Requests\\CountTicketsRequestTest::__pest_evaluable_it_can_count_all_tickets":0.001,"P\\Tests\\Requests\\AllTicketsRequestTest::__pest_evaluable_it_can_get_all_tickets":0.006,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_compile_the_correct_authentication_string_for_token_method":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_compile_the_correct_authentication_string_for_basic_method":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_not_throw_an_exception_if_a_subdomain_is_set":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_not_throw_an_exception_if_an_auth_method_valid":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_return_the_base_path":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_throw_an_exception_if_an_auth_method_is_not_set":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_throw_and_authentication_error_when_details_are_incorrect":0.001,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_throw_an_exception_if_a_token_is_not_provided_when_using_the_token_method":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_throw_an_exception_if_a_subdomain_is_not_set":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_not_throw_an_exception_if_a_password_is_provided_when_using_the_password_method":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_not_throw_an_exception_if_a_token_is_provided_when_using_the_token_method":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_throw_an_exception_if_an_auth_method_invalid":0,"P\\Tests\\Connectors\\ZendeskConnectorTest::__pest_evaluable_it_will_throw_an_exception_if_a_password_is_not_provided_when_using_the_basic_method":0,"P\\Tests\\Requests\\CreateAttachmentRequestTest::__pest_evaluable_it_can_create_an_attachment":0.001}}
164 changes: 82 additions & 82 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
{
"name": "codebar-ag/laravel-zendesk",
"description": "Zendesk integration with Laravel",
"keywords": [
"zendesk",
"laravel",
"codebar-ag",
"laravel-zendesk"
],
"homepage": "https://github.com/codebar-ag/laravel-zendesk",
"license": "MIT",
"authors": [
{
"name": "Sebastian Fix",
"email": "[email protected]",
"homepage": "https://www.codebar.ch",
"role": "Developer"
},
{
"name": "Rhys Lees",
"role": "Software-Developer"
}
],
"require": {
"php": "^8.2",
"guzzlehttp/guzzle": "^7.8",
"illuminate/contracts": "^10.0",
"laravel/framework": "^10.28",
"orchestra/testbench": "^8.13",
"saloonphp/cache-plugin": "^3.0",
"saloonphp/laravel-plugin": "^3.0",
"saloonphp/saloon": "^3.0",
"spatie/laravel-data": "^3.9",
"spatie/laravel-package-tools": "^1.16"
"name": "codebar-ag/laravel-zendesk",
"description": "Zendesk integration with Laravel",
"keywords": [
"zendesk",
"laravel",
"codebar-ag",
"laravel-zendesk"
],
"homepage": "https://github.com/codebar-ag/laravel-zendesk",
"license": "MIT",
"authors": [
{
"name": "Sebastian Bürgi ",
"email": "[email protected]",
"homepage": "https://www.codebar.ch",
"role": "Developer"
},
"require-dev": {
"laravel/pint": "^1.13",
"nunomaduro/collision": "^7.10",
"nunomaduro/larastan": "^2.6",
"orchestra/testbench": "^8.13",
"pestphp/pest": "^2.23",
"pestphp/pest-plugin-laravel": "^2.2",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"spatie/laravel-ray": "^1.33"
},
"autoload": {
"psr-4": {
"CodebarAg\\Zendesk\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"CodebarAg\\Zendesk\\Tests\\": "tests"
}
},
"scripts": {
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": false,
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"laravel": {
"providers": [
"CodebarAg\\Zendesk\\ZendeskServiceProvider"
],
"aliases": {
"Flatfox": "CodebarAg\\Zendesk\\Facades\\Zendesk"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
{
"name": "Rhys Lees",
"role": "Software-Developer"
}
],
"require": {
"php": ">=8.2",
"guzzlehttp/guzzle": "^7.8",
"illuminate/contracts": "^11.0",
"laravel/framework": "^11.0",
"saloonphp/cache-plugin": "^3.0",
"saloonphp/laravel-plugin": "^3.2",
"saloonphp/saloon": "^3.4",
"spatie/laravel-data": "^4.13.1",
"spatie/laravel-package-tools": "^1.16"
},
"require-dev": {
"laravel/pint": "^1.14",
"nunomaduro/collision": "^8.1",
"larastan/larastan": "^2.8",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-laravel": "^2.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"pestphp/pest-plugin-arch": "^2.7",
"spatie/laravel-ray": "^1.35"
},
"autoload": {
"psr-4": {
"CodebarAg\\Zendesk\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"CodebarAg\\Zendesk\\Tests\\": "tests"
}
},
"scripts": {
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": false,
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"laravel": {
"providers": [
"CodebarAg\\Zendesk\\ZendeskServiceProvider"
],
"aliases": {
"Flatfox": "CodebarAg\\Zendesk\\Facades\\Zendesk"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ parameters:
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false

3 changes: 1 addition & 2 deletions src/Dto/Tickets/AllTicketsDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public function __construct(
public int $count,
public ?string $next_page_url,
public ?string $previous_page_url,
) {
}
) {}

public static function fromResponse(Response $response): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Dto/Tickets/Attachments/AttachmentDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public function __construct(
public ?array $thumbnails,
public ?string $url,
public ?string $width,
) {
}
) {}

public static function fromArray(array $data): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Dto/Tickets/Attachments/ThumbnailDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public function __construct(
public ?int $size,
public ?string $url,
public ?string $width,
) {
}
) {}

public static function fromArray(array $data): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Dto/Tickets/Attachments/UploadDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public function __construct(
public Carbon $expires_at,
public array $attachments,
public AttachmentDTO $attachment,
) {
}
) {}

public static function fromResponse(Response $response): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Dto/Tickets/Comments/CommentDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public function __construct(
public ?string $type,
public ?array $uploads,
public ?array $via,
) {
}
) {}

public static function fromArray(array $data): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Dto/Tickets/CountTicketsDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class CountTicketsDTO extends Data
public function __construct(
public ?int $value,
public ?Carbon $refreshed_at,
) {
}
) {}

public static function fromResponse(Response $response): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Dto/Tickets/SingleTicketDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ public function __construct(
public ?int $via_followup_source_id,
public ?int $via_id,
public ?array $voice_comment,
) {
}
) {}

public static function fromResponse(Response $response): self
{
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/AllTicketsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use CodebarAg\Zendesk\Dto\Tickets\AllTicketsDTO;
use Exception;
use Saloon\Http\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;

class AllTicketsRequest extends Request
{
Expand Down
Loading

0 comments on commit 15a291c

Please sign in to comment.