Skip to content

Laravel v10 support #21

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 23, 2023
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
3 changes: 3 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
with:
php-version: '8.1'
coverage: none
with:
php-version: '8.2'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v2
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1]
laravel: [9.*]
php: [8.1, 8.2]
laravel: [9.*, 10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
exclude:
- laravel: 9.*
php: 8.2

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

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
"require": {
"php": "^8.1",
"spatie/laravel-package-tools": "^1.13.0",
"illuminate/contracts": "^9.0"
"illuminate/contracts": "^9.0|^10.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^6.0",
"nunomaduro/collision": "^6.0|^7.0",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^7.0",
"orchestra/testbench": "^7.0|^8.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5|^10.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 0 additions & 4 deletions src/Concerns/HasTickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ trait HasTickets
{
/**
* Get User tickets relationship
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function tickets(): HasMany
{
Expand All @@ -20,8 +18,6 @@ public function tickets(): HasMany

/**
* Get User tickets relationship
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function messages(): HasMany
{
Expand Down
9 changes: 0 additions & 9 deletions src/Concerns/InteractsWithTicketRelations.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ trait InteractsWithTicketRelations
* Associate Labels into an existing ticket
*
* @param mixed $id
* @param array $attributes
* @param bool $touch
* @return void
*/
Expand All @@ -35,7 +34,6 @@ public function syncLabels($ids, $detaching = true)
* Associate Categories into an existing ticket
*
* @param mixed $id
* @param array $attributes
* @param bool $touch
* @return void
*/
Expand All @@ -58,9 +56,6 @@ public function syncCategories($ids, $detaching = true)

/**
* Add new message on an existing ticket
*
* @param string $message
* @return \Illuminate\Database\Eloquent\Model
*/
public function message(string $message): Model
{
Expand All @@ -69,10 +64,6 @@ public function message(string $message): Model

/**
* Add new message on an existing ticket as a custom user
*
* @param \Illuminate\Database\Eloquent\Model|null $user
* @param string $message
* @return \Illuminate\Database\Eloquent\Model
*/
public function messageAsUser(?Model $user, string $message): Model
{
Expand Down
37 changes: 0 additions & 37 deletions src/Concerns/InteractsWithTickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ trait InteractsWithTickets
{
/**
* Archive the ticket
*
* @return self
*/
public function archive(): self
{
Expand All @@ -23,8 +21,6 @@ public function archive(): self

/**
* Close the ticket
*
* @return self
*/
public function close(): self
{
Expand All @@ -37,8 +33,6 @@ public function close(): self

/**
* Reopen the ticket
*
* @return self
*/
public function reopen(): self
{
Expand All @@ -51,8 +45,6 @@ public function reopen(): self

/**
* Determine if the ticket is archived
*
* @return bool
*/
public function isArchived(): bool
{
Expand All @@ -61,8 +53,6 @@ public function isArchived(): bool

/**
* Determine if the ticket is open
*
* @return bool
*/
public function isOpen(): bool
{
Expand All @@ -71,8 +61,6 @@ public function isOpen(): bool

/**
* Determine if the ticket is closed
*
* @return bool
*/
public function isClosed(): bool
{
Expand All @@ -81,8 +69,6 @@ public function isClosed(): bool

/**
* Determine if the ticket is resolved
*
* @return bool
*/
public function isResolved(): bool
{
Expand All @@ -91,8 +77,6 @@ public function isResolved(): bool

/**
* Determine if the ticket is unresolved
*
* @return bool
*/
public function isUnresolved(): bool
{
Expand All @@ -101,8 +85,6 @@ public function isUnresolved(): bool

/**
* Determine if the ticket is locked
*
* @return bool
*/
public function isLocked(): bool
{
Expand All @@ -111,8 +93,6 @@ public function isLocked(): bool

/**
* Determine if the ticket is unresolved
*
* @return bool
*/
public function isUnlocked(): bool
{
Expand All @@ -121,8 +101,6 @@ public function isUnlocked(): bool

/**
* Mark the ticket as resolved
*
* @return self
*/
public function markAsResolved(): self
{
Expand All @@ -135,8 +113,6 @@ public function markAsResolved(): self

/**
* Mark the ticket as locked
*
* @return self
*/
public function markAsLocked(): self
{
Expand All @@ -149,8 +125,6 @@ public function markAsLocked(): self

/**
* Mark the ticket as locked
*
* @return self
*/
public function markAsUnlocked(): self
{
Expand All @@ -163,8 +137,6 @@ public function markAsUnlocked(): self

/**
* Mark the ticket as archived
*
* @return self
*/
public function markAsArchived(): self
{
Expand All @@ -175,8 +147,6 @@ public function markAsArchived(): self

/**
* Close the ticket and mark it as resolved
*
* @return self
*/
public function closeAsResolved(): self
{
Expand All @@ -190,8 +160,6 @@ public function closeAsResolved(): self

/**
* Close the ticket and mark it as unresolved
*
* @return self
*/
public function closeAsUnresolved(): self
{
Expand All @@ -205,8 +173,6 @@ public function closeAsUnresolved(): self

/**
* Reopen the ticket and mark it as resolved
*
* @return self
*/
public function reopenAsUnresolved(): self
{
Expand All @@ -220,9 +186,6 @@ public function reopenAsUnresolved(): self

/**
* Add new message on an existing ticket as a custom user
*
* @param \Illuminate\Database\Eloquent\Model|int $user
* @return self
*/
public function assignTo(Model|int $user): self
{
Expand Down
2 changes: 0 additions & 2 deletions src/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class Category extends Model

/**
* Get Tickets RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function tickets(): BelongsToMany
{
Expand Down
2 changes: 0 additions & 2 deletions src/Models/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class Label extends Model

/**
* Get Tickets RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function tickets(): BelongsToMany
{
Expand Down
4 changes: 0 additions & 4 deletions src/Models/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class Message extends Model

/**
* Get Ticket RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function ticket(): BelongsTo
{
Expand All @@ -40,8 +38,6 @@ public function ticket(): BelongsTo

/**
* Get Message Relationship
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user(): BelongsTo
{
Expand Down
10 changes: 0 additions & 10 deletions src/Models/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class Ticket extends Model

/**
* Get User RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user(): BelongsTo
{
Expand All @@ -49,8 +47,6 @@ public function user(): BelongsTo

/**
* Get Assigned To User RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function assignedToUser(): BelongsTo
{
Expand All @@ -59,8 +55,6 @@ public function assignedToUser(): BelongsTo

/**
* Get Messages RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function messages(): HasMany
{
Expand All @@ -74,8 +68,6 @@ public function messages(): HasMany

/**
* Get Categories RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function categories(): BelongsToMany
{
Expand All @@ -91,8 +83,6 @@ public function categories(): BelongsToMany

/**
* Get Labels RelationShip
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function labels(): BelongsToMany
{
Expand Down
Loading