Skip to content

Commit 90d86cc

Browse files
authored
Laravel v10 support (#21)
Add Laravel V10 support
1 parent 6540e2d commit 90d86cc

11 files changed

+14
-94
lines changed

Diff for: .github/workflows/phpstan.yml

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
with:
1919
php-version: '8.1'
2020
coverage: none
21+
with:
22+
php-version: '8.2'
23+
coverage: none
2124

2225
- name: Install composer dependencies
2326
uses: ramsey/composer-install@v2

Diff for: .github/workflows/run-tests.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
php: [8.1]
17-
laravel: [9.*]
16+
php: [8.1, 8.2]
17+
laravel: [9.*, 10.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
2020
- laravel: 9.*
2121
testbench: 7.*
22+
- laravel: 10.*
23+
testbench: 8.*
24+
exclude:
25+
- laravel: 9.*
26+
php: 8.2
2227

2328
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2429

Diff for: composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
"require": {
1919
"php": "^8.1",
2020
"spatie/laravel-package-tools": "^1.13.0",
21-
"illuminate/contracts": "^9.0"
21+
"illuminate/contracts": "^9.0|^10.0"
2222
},
2323
"require-dev": {
2424
"laravel/pint": "^1.0",
25-
"nunomaduro/collision": "^6.0",
25+
"nunomaduro/collision": "^6.0|^7.0",
2626
"nunomaduro/larastan": "^2.0.1",
27-
"orchestra/testbench": "^7.0",
27+
"orchestra/testbench": "^7.0|^8.0",
2828
"pestphp/pest": "^1.21",
2929
"pestphp/pest-plugin-laravel": "^1.1",
3030
"phpstan/extension-installer": "^1.1",
3131
"phpstan/phpstan-deprecation-rules": "^1.0",
3232
"phpstan/phpstan-phpunit": "^1.0",
33-
"phpunit/phpunit": "^9.5"
33+
"phpunit/phpunit": "^9.5|^10.0"
3434
},
3535
"autoload": {
3636
"psr-4": {

Diff for: src/Concerns/HasTickets.php

-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ trait HasTickets
1010
{
1111
/**
1212
* Get User tickets relationship
13-
*
14-
* @return \Illuminate\Database\Eloquent\Relations\HasMany
1513
*/
1614
public function tickets(): HasMany
1715
{
@@ -20,8 +18,6 @@ public function tickets(): HasMany
2018

2119
/**
2220
* Get User tickets relationship
23-
*
24-
* @return \Illuminate\Database\Eloquent\Relations\HasMany
2521
*/
2622
public function messages(): HasMany
2723
{

Diff for: src/Concerns/InteractsWithTicketRelations.php

-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ trait InteractsWithTicketRelations
1010
* Associate Labels into an existing ticket
1111
*
1212
* @param mixed $id
13-
* @param array $attributes
1413
* @param bool $touch
1514
* @return void
1615
*/
@@ -35,7 +34,6 @@ public function syncLabels($ids, $detaching = true)
3534
* Associate Categories into an existing ticket
3635
*
3736
* @param mixed $id
38-
* @param array $attributes
3937
* @param bool $touch
4038
* @return void
4139
*/
@@ -58,9 +56,6 @@ public function syncCategories($ids, $detaching = true)
5856

5957
/**
6058
* Add new message on an existing ticket
61-
*
62-
* @param string $message
63-
* @return \Illuminate\Database\Eloquent\Model
6459
*/
6560
public function message(string $message): Model
6661
{
@@ -69,10 +64,6 @@ public function message(string $message): Model
6964

7065
/**
7166
* Add new message on an existing ticket as a custom user
72-
*
73-
* @param \Illuminate\Database\Eloquent\Model|null $user
74-
* @param string $message
75-
* @return \Illuminate\Database\Eloquent\Model
7667
*/
7768
public function messageAsUser(?Model $user, string $message): Model
7869
{

Diff for: src/Concerns/InteractsWithTickets.php

-37
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ trait InteractsWithTickets
99
{
1010
/**
1111
* Archive the ticket
12-
*
13-
* @return self
1412
*/
1513
public function archive(): self
1614
{
@@ -23,8 +21,6 @@ public function archive(): self
2321

2422
/**
2523
* Close the ticket
26-
*
27-
* @return self
2824
*/
2925
public function close(): self
3026
{
@@ -37,8 +33,6 @@ public function close(): self
3733

3834
/**
3935
* Reopen the ticket
40-
*
41-
* @return self
4236
*/
4337
public function reopen(): self
4438
{
@@ -51,8 +45,6 @@ public function reopen(): self
5145

5246
/**
5347
* Determine if the ticket is archived
54-
*
55-
* @return bool
5648
*/
5749
public function isArchived(): bool
5850
{
@@ -61,8 +53,6 @@ public function isArchived(): bool
6153

6254
/**
6355
* Determine if the ticket is open
64-
*
65-
* @return bool
6656
*/
6757
public function isOpen(): bool
6858
{
@@ -71,8 +61,6 @@ public function isOpen(): bool
7161

7262
/**
7363
* Determine if the ticket is closed
74-
*
75-
* @return bool
7664
*/
7765
public function isClosed(): bool
7866
{
@@ -81,8 +69,6 @@ public function isClosed(): bool
8169

8270
/**
8371
* Determine if the ticket is resolved
84-
*
85-
* @return bool
8672
*/
8773
public function isResolved(): bool
8874
{
@@ -91,8 +77,6 @@ public function isResolved(): bool
9177

9278
/**
9379
* Determine if the ticket is unresolved
94-
*
95-
* @return bool
9680
*/
9781
public function isUnresolved(): bool
9882
{
@@ -101,8 +85,6 @@ public function isUnresolved(): bool
10185

10286
/**
10387
* Determine if the ticket is locked
104-
*
105-
* @return bool
10688
*/
10789
public function isLocked(): bool
10890
{
@@ -111,8 +93,6 @@ public function isLocked(): bool
11193

11294
/**
11395
* Determine if the ticket is unresolved
114-
*
115-
* @return bool
11696
*/
11797
public function isUnlocked(): bool
11898
{
@@ -121,8 +101,6 @@ public function isUnlocked(): bool
121101

122102
/**
123103
* Mark the ticket as resolved
124-
*
125-
* @return self
126104
*/
127105
public function markAsResolved(): self
128106
{
@@ -135,8 +113,6 @@ public function markAsResolved(): self
135113

136114
/**
137115
* Mark the ticket as locked
138-
*
139-
* @return self
140116
*/
141117
public function markAsLocked(): self
142118
{
@@ -149,8 +125,6 @@ public function markAsLocked(): self
149125

150126
/**
151127
* Mark the ticket as locked
152-
*
153-
* @return self
154128
*/
155129
public function markAsUnlocked(): self
156130
{
@@ -163,8 +137,6 @@ public function markAsUnlocked(): self
163137

164138
/**
165139
* Mark the ticket as archived
166-
*
167-
* @return self
168140
*/
169141
public function markAsArchived(): self
170142
{
@@ -175,8 +147,6 @@ public function markAsArchived(): self
175147

176148
/**
177149
* Close the ticket and mark it as resolved
178-
*
179-
* @return self
180150
*/
181151
public function closeAsResolved(): self
182152
{
@@ -190,8 +160,6 @@ public function closeAsResolved(): self
190160

191161
/**
192162
* Close the ticket and mark it as unresolved
193-
*
194-
* @return self
195163
*/
196164
public function closeAsUnresolved(): self
197165
{
@@ -205,8 +173,6 @@ public function closeAsUnresolved(): self
205173

206174
/**
207175
* Reopen the ticket and mark it as resolved
208-
*
209-
* @return self
210176
*/
211177
public function reopenAsUnresolved(): self
212178
{
@@ -220,9 +186,6 @@ public function reopenAsUnresolved(): self
220186

221187
/**
222188
* Add new message on an existing ticket as a custom user
223-
*
224-
* @param \Illuminate\Database\Eloquent\Model|int $user
225-
* @return self
226189
*/
227190
public function assignTo(Model|int $user): self
228191
{

Diff for: src/Models/Category.php

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class Category extends Model
2121

2222
/**
2323
* Get Tickets RelationShip
24-
*
25-
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
2624
*/
2725
public function tickets(): BelongsToMany
2826
{

Diff for: src/Models/Label.php

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class Label extends Model
2121

2222
/**
2323
* Get Tickets RelationShip
24-
*
25-
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
2624
*/
2725
public function tickets(): BelongsToMany
2826
{

Diff for: src/Models/Message.php

-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class Message extends Model
2525

2626
/**
2727
* Get Ticket RelationShip
28-
*
29-
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
3028
*/
3129
public function ticket(): BelongsTo
3230
{
@@ -40,8 +38,6 @@ public function ticket(): BelongsTo
4038

4139
/**
4240
* Get Message Relationship
43-
*
44-
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
4541
*/
4642
public function user(): BelongsTo
4743
{

Diff for: src/Models/Ticket.php

-10
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ class Ticket extends Model
3939

4040
/**
4141
* Get User RelationShip
42-
*
43-
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
4442
*/
4543
public function user(): BelongsTo
4644
{
@@ -49,8 +47,6 @@ public function user(): BelongsTo
4947

5048
/**
5149
* Get Assigned To User RelationShip
52-
*
53-
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
5450
*/
5551
public function assignedToUser(): BelongsTo
5652
{
@@ -59,8 +55,6 @@ public function assignedToUser(): BelongsTo
5955

6056
/**
6157
* Get Messages RelationShip
62-
*
63-
* @return \Illuminate\Database\Eloquent\Relations\HasMany
6458
*/
6559
public function messages(): HasMany
6660
{
@@ -74,8 +68,6 @@ public function messages(): HasMany
7468

7569
/**
7670
* Get Categories RelationShip
77-
*
78-
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
7971
*/
8072
public function categories(): BelongsToMany
8173
{
@@ -91,8 +83,6 @@ public function categories(): BelongsToMany
9183

9284
/**
9385
* Get Labels RelationShip
94-
*
95-
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
9686
*/
9787
public function labels(): BelongsToMany
9888
{

0 commit comments

Comments
 (0)