Skip to content

Commit 15a291c

Browse files
authored
Merge pull request #17 from codebar-ag/feature-l11
Laravel 11
2 parents d791ae0 + 1f6fb9a commit 15a291c

24 files changed

+151
-131
lines changed

.github/workflows/dependabot-auto-merge.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: ${{ github.actor == 'dependabot[bot]' }}
1212
steps:
13-
13+
1414
- name: Dependabot metadata
1515
id: metadata
16-
uses: dependabot/fetch-metadata@v1.3.3
16+
uses: dependabot/fetch-metadata@v1.6
1717
with:
18-
github-token: "${{ secrets.GITHUB_TOKEN }}"
19-
18+
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
19+
2020
- name: Auto-merge Dependabot PRs for semver-minor updates
2121
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
2222
run: gh pr merge --auto --merge "$PR_URL"
2323
env:
2424
PR_URL: ${{github.event.pull_request.html_url}}
2525
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26-
26+
2727
- name: Auto-merge Dependabot PRs for semver-patch updates
2828
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
2929
run: gh pr merge --auto --merge "$PR_URL"

.github/workflows/php-cs-fixer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
1616
ref: ${{ github.head_ref }}
1717

.github/workflows/phpstan.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ jobs:
1010
phpstan:
1111
name: phpstan
1212
runs-on: ubuntu-latest
13+
14+
env:
15+
PHP_VERSION: '8.3'
16+
1317
steps:
14-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1519

1620
- name: Setup PHP
1721
uses: shivammathur/setup-php@v2
1822
with:
19-
php-version: '8.2'
23+
php-version: ${{ env.PHP_VERSION }}
2024
coverage: none
2125

2226
- name: Install composer dependencies
23-
uses: ramsey/composer-install@v2
27+
uses: ramsey/composer-install@v3
2428

2529
- name: Run PHPStan
26-
run: ./vendor/bin/phpstan analyse src --error-format=github
30+
run: ./vendor/bin/phpstan analyse src --error-format=github

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
jobs:
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
INITIAL_VERSION: 11.0.0
16+
RELEASE_BRANCHES: main
17+
DEFAULT_BUMP: patch
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: '0'
23+
- name: Bump version and push tag
24+
uses: anothrNick/github-tag-action@v1
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
27+
WITH_V: true
28+
INITIAL_VERSION: ${{ env.INITIAL_VERSION }}
29+
RELEASE_BRANCHES: ${{ env.RELEASE_BRANCHES }}
30+
DEFAULT_BUMP: ${{ env.DEFAULT_BUMP }}

.github/workflows/run-tests.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@ jobs:
1515
matrix:
1616
os: [ ubuntu-latest, windows-latest ]
1717
php: [ 8.2, 8.3 ]
18-
laravel: [ 10.* ]
18+
laravel: [ 11.* ]
1919
stability: [ prefer-lowest, prefer-stable ]
20-
include:
21-
- laravel: 10.*
22-
testbench: 8.*
2320

2421
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2522

2623
steps:
2724
- name: Checkout code
28-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2926

3027
- name: Setup PHP
3128
uses: shivammathur/setup-php@v2
@@ -41,7 +38,7 @@ jobs:
4138
4239
- name: Install dependencies
4340
run: |
44-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
41+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
4542
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4643
4744
- name: Set phpunit.xml
@@ -51,7 +48,7 @@ jobs:
5148
run: vendor/bin/pest
5249

5350
- name: Store test reports
54-
uses: actions/upload-artifact@v2
51+
uses: actions/upload-artifact@v4
5552
with:
5653
name: Store report
5754
retention-days: 1

.phpunit.cache/test-results

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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}}

composer.json

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,85 @@
11
{
2-
"name": "codebar-ag/laravel-zendesk",
3-
"description": "Zendesk integration with Laravel",
4-
"keywords": [
5-
"zendesk",
6-
"laravel",
7-
"codebar-ag",
8-
"laravel-zendesk"
9-
],
10-
"homepage": "https://github.com/codebar-ag/laravel-zendesk",
11-
"license": "MIT",
12-
"authors": [
13-
{
14-
"name": "Sebastian Fix",
15-
"email": "[email protected]",
16-
"homepage": "https://www.codebar.ch",
17-
"role": "Developer"
18-
},
19-
{
20-
"name": "Rhys Lees",
21-
"role": "Software-Developer"
22-
}
23-
],
24-
"require": {
25-
"php": "^8.2",
26-
"guzzlehttp/guzzle": "^7.8",
27-
"illuminate/contracts": "^10.0",
28-
"laravel/framework": "^10.28",
29-
"orchestra/testbench": "^8.13",
30-
"saloonphp/cache-plugin": "^3.0",
31-
"saloonphp/laravel-plugin": "^3.0",
32-
"saloonphp/saloon": "^3.0",
33-
"spatie/laravel-data": "^3.9",
34-
"spatie/laravel-package-tools": "^1.16"
2+
"name": "codebar-ag/laravel-zendesk",
3+
"description": "Zendesk integration with Laravel",
4+
"keywords": [
5+
"zendesk",
6+
"laravel",
7+
"codebar-ag",
8+
"laravel-zendesk"
9+
],
10+
"homepage": "https://github.com/codebar-ag/laravel-zendesk",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Sebastian Bürgi ",
15+
"email": "[email protected]",
16+
"homepage": "https://www.codebar.ch",
17+
"role": "Developer"
3518
},
36-
"require-dev": {
37-
"laravel/pint": "^1.13",
38-
"nunomaduro/collision": "^7.10",
39-
"nunomaduro/larastan": "^2.6",
40-
"orchestra/testbench": "^8.13",
41-
"pestphp/pest": "^2.23",
42-
"pestphp/pest-plugin-laravel": "^2.2",
43-
"phpstan/extension-installer": "^1.3",
44-
"phpstan/phpstan-deprecation-rules": "^1.1",
45-
"phpstan/phpstan-phpunit": "^1.3",
46-
"spatie/laravel-ray": "^1.33"
47-
},
48-
"autoload": {
49-
"psr-4": {
50-
"CodebarAg\\Zendesk\\": "src"
51-
}
52-
},
53-
"autoload-dev": {
54-
"psr-4": {
55-
"CodebarAg\\Zendesk\\Tests\\": "tests"
56-
}
57-
},
58-
"scripts": {
59-
"analyse": "vendor/bin/phpstan analyse",
60-
"test": "vendor/bin/pest",
61-
"test-coverage": "vendor/bin/pest --coverage",
62-
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
63-
},
64-
"config": {
65-
"sort-packages": true,
66-
"allow-plugins": {
67-
"composer/package-versions-deprecated": false,
68-
"pestphp/pest-plugin": true,
69-
"phpstan/extension-installer": true,
70-
"dealerdirect/phpcodesniffer-composer-installer": true
71-
}
72-
},
73-
"extra": {
74-
"laravel": {
75-
"providers": [
76-
"CodebarAg\\Zendesk\\ZendeskServiceProvider"
77-
],
78-
"aliases": {
79-
"Flatfox": "CodebarAg\\Zendesk\\Facades\\Zendesk"
80-
}
81-
}
82-
},
83-
"minimum-stability": "dev",
84-
"prefer-stable": true
19+
{
20+
"name": "Rhys Lees",
21+
"role": "Software-Developer"
22+
}
23+
],
24+
"require": {
25+
"php": ">=8.2",
26+
"guzzlehttp/guzzle": "^7.8",
27+
"illuminate/contracts": "^11.0",
28+
"laravel/framework": "^11.0",
29+
"saloonphp/cache-plugin": "^3.0",
30+
"saloonphp/laravel-plugin": "^3.2",
31+
"saloonphp/saloon": "^3.4",
32+
"spatie/laravel-data": "^4.13.1",
33+
"spatie/laravel-package-tools": "^1.16"
34+
},
35+
"require-dev": {
36+
"laravel/pint": "^1.14",
37+
"nunomaduro/collision": "^8.1",
38+
"larastan/larastan": "^2.8",
39+
"orchestra/testbench": "^9.0",
40+
"pestphp/pest": "^2.34",
41+
"pestphp/pest-plugin-laravel": "^2.3",
42+
"phpstan/extension-installer": "^1.3",
43+
"phpstan/phpstan-deprecation-rules": "^1.1",
44+
"phpstan/phpstan-phpunit": "^1.3",
45+
"pestphp/pest-plugin-arch": "^2.7",
46+
"spatie/laravel-ray": "^1.35"
47+
},
48+
"autoload": {
49+
"psr-4": {
50+
"CodebarAg\\Zendesk\\": "src"
51+
}
52+
},
53+
"autoload-dev": {
54+
"psr-4": {
55+
"CodebarAg\\Zendesk\\Tests\\": "tests"
56+
}
57+
},
58+
"scripts": {
59+
"analyse": "vendor/bin/phpstan analyse",
60+
"test": "vendor/bin/pest",
61+
"test-coverage": "vendor/bin/pest --coverage",
62+
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
63+
},
64+
"config": {
65+
"sort-packages": true,
66+
"allow-plugins": {
67+
"composer/package-versions-deprecated": false,
68+
"pestphp/pest-plugin": true,
69+
"phpstan/extension-installer": true,
70+
"dealerdirect/phpcodesniffer-composer-installer": true
71+
}
72+
},
73+
"extra": {
74+
"laravel": {
75+
"providers": [
76+
"CodebarAg\\Zendesk\\ZendeskServiceProvider"
77+
],
78+
"aliases": {
79+
"Flatfox": "CodebarAg\\Zendesk\\Facades\\Zendesk"
80+
}
81+
}
82+
},
83+
"minimum-stability": "dev",
84+
"prefer-stable": true
8585
}

phpstan.neon.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ parameters:
99
tmpDir: build/phpstan
1010
checkOctaneCompatibility: true
1111
checkModelProperties: true
12-
checkMissingIterableValueType: false
1312

src/Dto/Tickets/AllTicketsDTO.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ public function __construct(
1414
public int $count,
1515
public ?string $next_page_url,
1616
public ?string $previous_page_url,
17-
) {
18-
}
17+
) {}
1918

2019
public static function fromResponse(Response $response): self
2120
{

src/Dto/Tickets/Attachments/AttachmentDTO.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ public function __construct(
2323
public ?array $thumbnails,
2424
public ?string $url,
2525
public ?string $width,
26-
) {
27-
}
26+
) {}
2827

2928
public static function fromArray(array $data): self
3029
{

0 commit comments

Comments
 (0)