From a33e012249d72a87ae5e72f4427df2a0fe59bcf9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Apr 2024 01:35:49 +0000
Subject: [PATCH 1/9] Bump aglipanci/laravel-pint-action from 2.3.1 to 2.4

Bumps [aglipanci/laravel-pint-action](https://github.com/aglipanci/laravel-pint-action) from 2.3.1 to 2.4.
- [Release notes](https://github.com/aglipanci/laravel-pint-action/releases)
- [Commits](https://github.com/aglipanci/laravel-pint-action/compare/2.3.1...2.4)

---
updated-dependencies:
- dependency-name: aglipanci/laravel-pint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/fix-php-code-style-issues.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml
index 46308bc..274e1e3 100644
--- a/.github/workflows/fix-php-code-style-issues.yml
+++ b/.github/workflows/fix-php-code-style-issues.yml
@@ -13,7 +13,7 @@ jobs:
           ref: ${{ github.head_ref }}
 
       - name: Fix PHP code style issues
-        uses: aglipanci/laravel-pint-action@2.3.1
+        uses: aglipanci/laravel-pint-action@2.4
 
       - name: Commit changes
         uses: stefanzweifel/git-auto-commit-action@v5

From 28e6fc058b3293b2b67e48f19ba111647b303d9b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 29 Apr 2024 01:41:06 +0000
Subject: [PATCH 2/9] Bump dependabot/fetch-metadata from 2.0.0 to 2.1.0

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/dependabot-auto-merge.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
index 67e66c6..611344a 100644
--- a/.github/workflows/dependabot-auto-merge.yml
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -13,7 +13,7 @@ jobs:
     
       - name: Dependabot metadata
         id: metadata
-        uses: dependabot/fetch-metadata@v2.0.0
+        uses: dependabot/fetch-metadata@v2.1.0
         with:
           github-token: "${{ secrets.GITHUB_TOKEN }}"
           

From 7199351bcd483671b15c18e8974539423105ba4a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 8 Jul 2024 01:10:04 +0000
Subject: [PATCH 3/9] Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/dependabot-auto-merge.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
index 611344a..eb537d8 100644
--- a/.github/workflows/dependabot-auto-merge.yml
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -13,7 +13,7 @@ jobs:
     
       - name: Dependabot metadata
         id: metadata
-        uses: dependabot/fetch-metadata@v2.1.0
+        uses: dependabot/fetch-metadata@v2.2.0
         with:
           github-token: "${{ secrets.GITHUB_TOKEN }}"
           

From 1598ff727dfd31f361a22189b3c8557df752347e Mon Sep 17 00:00:00 2001
From: Giacomo Masseroni <giacomom@gmail.com>
Date: Fri, 6 Sep 2024 23:40:37 +0200
Subject: [PATCH 4/9] add models name in config file

---
 config/laravel_ticket.php | 10 +++++++++-
 src/Models/Category.php   |  2 +-
 src/Models/Label.php      |  2 +-
 src/Models/Message.php    |  2 +-
 src/Models/Ticket.php     |  8 ++++----
 5 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/config/laravel_ticket.php b/config/laravel_ticket.php
index 429083e..bb1c898 100644
--- a/config/laravel_ticket.php
+++ b/config/laravel_ticket.php
@@ -73,5 +73,13 @@
             ],
         ],
     ],
-
+    /**
+     * Models for Eloquent relationships
+     */
+    'models' => [
+        'ticket' => \Coderflex\LaravelTicket\Models\Ticket::class,
+        'message' => \Coderflex\LaravelTicket\Models\Message::class,
+        'category' => \Coderflex\LaravelTicket\Models\Category::class,
+        'label' => \Coderflex\LaravelTicket\Models\Label::class,
+    ]
 ];
diff --git a/src/Models/Category.php b/src/Models/Category.php
index 908f072..e3ed79f 100644
--- a/src/Models/Category.php
+++ b/src/Models/Category.php
@@ -24,7 +24,7 @@ class Category extends Model
      */
     public function tickets(): BelongsToMany
     {
-        return $this->belongsToMany(Ticket::class);
+        return $this->belongsToMany(config('laravel_ticket.models.ticket'));
     }
 
     /**
diff --git a/src/Models/Label.php b/src/Models/Label.php
index c8357c5..1446eb2 100644
--- a/src/Models/Label.php
+++ b/src/Models/Label.php
@@ -24,7 +24,7 @@ class Label extends Model
      */
     public function tickets(): BelongsToMany
     {
-        return $this->belongsToMany(Ticket::class);
+        return $this->belongsToMany(config('laravel_ticket.models.ticket'));
     }
 
     /**
diff --git a/src/Models/Message.php b/src/Models/Message.php
index 7b62db1..61e65f6 100644
--- a/src/Models/Message.php
+++ b/src/Models/Message.php
@@ -31,7 +31,7 @@ public function ticket(): BelongsTo
         $tableName = config('laravel_ticket.table_names.messages', 'messages');
 
         return $this->belongsTo(
-            Ticket::class,
+            config('laravel_ticket.models.ticket'),
             $tableName['columns']['ticket_foreign_id']
         );
     }
diff --git a/src/Models/Ticket.php b/src/Models/Ticket.php
index 316c76f..06a9aea 100644
--- a/src/Models/Ticket.php
+++ b/src/Models/Ticket.php
@@ -61,7 +61,7 @@ public function messages(): HasMany
         $tableName = config('laravel_ticket.table_names.messages', 'messages');
 
         return $this->hasMany(
-            Message::class,
+            config('laravel_ticket.models.message'),
             (string) $tableName['columns']['ticket_foreign_id'],
         );
     }
@@ -74,7 +74,7 @@ public function categories(): BelongsToMany
         $table = config('laravel_ticket.table_names.category_ticket', 'category_ticket');
 
         return $this->belongsToMany(
-            Category::class,
+            config('laravel_ticket.models.category'),
             $table['table'],
             $table['columns']['ticket_foreign_id'],
             $table['columns']['category_foreign_id'],
@@ -89,7 +89,7 @@ public function labels(): BelongsToMany
         $table = config('laravel_ticket.table_names.label_ticket', 'label_ticket');
 
         return $this->belongsToMany(
-            Label::class,
+            config('laravel_ticket.models.label'),
             $table['table'],
             $table['columns']['ticket_foreign_id'],
             $table['columns']['label_foreign_id'],
@@ -104,7 +104,7 @@ public function labels(): BelongsToMany
     public function getTable()
     {
         return config(
-            'laravel_ticket.table_names.tickets',
+            'laravel_ticket.models.tickets',
             parent::getTable()
         );
     }

From 44e422f29edad53c7b5cfddf9b9ceb04c3df6045 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 27 Jan 2025 01:19:22 +0000
Subject: [PATCH 5/9] Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/dependabot-auto-merge.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
index eb537d8..2cb1d5e 100644
--- a/.github/workflows/dependabot-auto-merge.yml
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -13,7 +13,7 @@ jobs:
     
       - name: Dependabot metadata
         id: metadata
-        uses: dependabot/fetch-metadata@v2.2.0
+        uses: dependabot/fetch-metadata@v2.3.0
         with:
           github-token: "${{ secrets.GITHUB_TOKEN }}"
           

From d6a069511a593e241991fb9daa20d06488b77952 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 3 Feb 2025 01:07:54 +0000
Subject: [PATCH 6/9] Bump aglipanci/laravel-pint-action from 2.4 to 2.5

Bumps [aglipanci/laravel-pint-action](https://github.com/aglipanci/laravel-pint-action) from 2.4 to 2.5.
- [Release notes](https://github.com/aglipanci/laravel-pint-action/releases)
- [Commits](https://github.com/aglipanci/laravel-pint-action/compare/2.4...2.5)

---
updated-dependencies:
- dependency-name: aglipanci/laravel-pint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/fix-php-code-style-issues.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml
index 274e1e3..7eb9e9e 100644
--- a/.github/workflows/fix-php-code-style-issues.yml
+++ b/.github/workflows/fix-php-code-style-issues.yml
@@ -13,7 +13,7 @@ jobs:
           ref: ${{ github.head_ref }}
 
       - name: Fix PHP code style issues
-        uses: aglipanci/laravel-pint-action@2.4
+        uses: aglipanci/laravel-pint-action@2.5
 
       - name: Commit changes
         uses: stefanzweifel/git-auto-commit-action@v5

From f664fb26e6df44e36dc9da6593335825b38399ba Mon Sep 17 00:00:00 2001
From: ousid <oussama@coderflex.com>
Date: Sun, 2 Mar 2025 17:20:37 +0400
Subject: [PATCH 7/9] add laravel 12 support

---
 .github/workflows/run-tests.yml                  | 10 ++++++++--
 composer.json                                    | 16 ++++++++--------
 config/laravel_ticket.php                        |  2 +-
 tests/Database/Migrations/create_users_table.php |  2 +-
 4 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 07c5f55..9cf5a8d 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -19,8 +19,8 @@ jobs:
       fail-fast: true
       matrix:
         os: [ubuntu-latest, windows-latest]
-        php: [8.1, 8.2]
-        laravel: [9.*, 10.*, 11.*]
+        php: [8.1, 8.2, 8.3]
+        laravel: [9.*, 10.*, 11.*, 12.*]
         stability: [prefer-lowest, prefer-stable]
         include:
           - laravel: 9.*
@@ -29,11 +29,17 @@ jobs:
             testbench: 8.*
           - laravel: 11.*
             testbench: 9.*
+          - laravel: 12.*
+            testbench: 10.*
         exclude:
           - laravel: 9.*
             php: 8.2
+          - laravel: 9.*
+            php: 8.3
           - larvel: 11.*
             php: 8.1
+          - laravel: 12.*
+            php: 8.1
 
     name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
 
diff --git a/composer.json b/composer.json
index 0e52df4..79a0117 100644
--- a/composer.json
+++ b/composer.json
@@ -18,19 +18,19 @@
     "require": {
         "php": "^8.1",
         "spatie/laravel-package-tools": "^1.13.0",
-        "illuminate/contracts": "^9.0|^10.0|^11.0"
+        "illuminate/contracts": "^9.0|^10.0|^11.0|^12.0"
     },
     "require-dev": {
         "laravel/pint": "^1.0",
         "nunomaduro/collision": "^6.0|^7.0|^8.0",
-        "nunomaduro/larastan": "^2.0.1",
-        "orchestra/testbench": "^7.0|^8.0|^9.0",
-        "pestphp/pest": "^1.21",
-        "pestphp/pest-plugin-laravel": "^1.1",
+        "nunomaduro/larastan": "^2.0.1|^3.0",
+        "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0",
+        "phpunit/phpunit": "^9.5|^10.0|^11.0",
+        "pestphp/pest": "^1.21|^2.0|^3.7",
+        "pestphp/pest-plugin-arch": "^2.0|^3.0",
         "phpstan/extension-installer": "^1.1",
-        "phpstan/phpstan-deprecation-rules": "^1.0",
-        "phpstan/phpstan-phpunit": "^1.0",
-        "phpunit/phpunit": "^9.5|^10.0|^11.0"
+        "phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
+        "phpstan/phpstan-phpunit": "^1.0|^2.0"
     },
     "autoload": {
         "psr-4": {
diff --git a/config/laravel_ticket.php b/config/laravel_ticket.php
index bb1c898..2c2dfc8 100644
--- a/config/laravel_ticket.php
+++ b/config/laravel_ticket.php
@@ -81,5 +81,5 @@
         'message' => \Coderflex\LaravelTicket\Models\Message::class,
         'category' => \Coderflex\LaravelTicket\Models\Category::class,
         'label' => \Coderflex\LaravelTicket\Models\Label::class,
-    ]
+    ],
 ];
diff --git a/tests/Database/Migrations/create_users_table.php b/tests/Database/Migrations/create_users_table.php
index 57f0097..d52f72d 100644
--- a/tests/Database/Migrations/create_users_table.php
+++ b/tests/Database/Migrations/create_users_table.php
@@ -4,7 +4,7 @@
 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Support\Facades\Schema;
 
-return new class() extends Migration
+return new class extends Migration
 {
     public function up()
     {

From e3bfd494dd2a49374f84988fd7ba950f187a2e93 Mon Sep 17 00:00:00 2001
From: ousid <oussama@coderflex.com>
Date: Sun, 2 Mar 2025 17:22:31 +0400
Subject: [PATCH 8/9] fix typo

---
 .github/workflows/run-tests.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 9cf5a8d..960badf 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -36,7 +36,7 @@ jobs:
             php: 8.2
           - laravel: 9.*
             php: 8.3
-          - larvel: 11.*
+          - laravel: 11.*
             php: 8.1
           - laravel: 12.*
             php: 8.1

From b8cb29936af24644c09e83fa656d714a787af0ab Mon Sep 17 00:00:00 2001
From: ousid <oussama@coderflex.com>
Date: Sun, 2 Mar 2025 17:33:58 +0400
Subject: [PATCH 9/9] update `run-tests.yml`

---
 .github/workflows/run-tests.yml | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 960badf..74e772c 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -20,11 +20,9 @@ jobs:
       matrix:
         os: [ubuntu-latest, windows-latest]
         php: [8.1, 8.2, 8.3]
-        laravel: [9.*, 10.*, 11.*, 12.*]
+        laravel: [10.*, 11.*, 12.*]
         stability: [prefer-lowest, prefer-stable]
         include:
-          - laravel: 9.*
-            testbench: 7.*
           - laravel: 10.*
             testbench: 8.*
           - laravel: 11.*
@@ -32,10 +30,6 @@ jobs:
           - laravel: 12.*
             testbench: 10.*
         exclude:
-          - laravel: 9.*
-            php: 8.2
-          - laravel: 9.*
-            php: 8.3
           - laravel: 11.*
             php: 8.1
           - laravel: 12.*