Skip to content

Commit 3cc6502

Browse files
committed
L12 support
1 parent 34bb7b8 commit 3cc6502

File tree

6 files changed

+26
-23
lines changed

6 files changed

+26
-23
lines changed

.semver

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
:major: 11
2+
:major: 12
33
:minor: 0
4-
:patch: 2
4+
:patch: 0
55
:special: ''
66
:metadata: ''

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 12.0.0 - 26-Feb-2025
4+
5+
- Added Laravel 12 support
6+
7+
38
## 11.0.2 - 20-Dec-2024
49

510
- Support PHP 8.4 (#148, thanks @tectiv3)

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ version should match the Laravel version.
4848

4949
| Laravel Version | Package Version |
5050
|:---------------:|:---------------:|
51-
| ^11.0 | ^11.0 |
52-
| ^10.0 | ^10.0 |
51+
| ^12.0 | ^12.0 |
52+
| ^11.0 | ^11.0 |
53+
| ^10.0 | ^10.0 |
5354
| 9.0 | ^9.0 |
5455
| 8.0 | ^8.0 |
5556
| 7.0 | ^7.0 |

composer.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cviebrock/eloquent-taggable",
3-
"description": "Easy ability to tag your Eloquent models in Laravel 5.",
3+
"description": "Easy ability to tag your Eloquent models in Laravel.",
44
"keywords": [
55
"laravel",
66
"eloquent",
@@ -22,15 +22,15 @@
2222
],
2323
"require": {
2424
"php": "^8.2",
25-
"illuminate/config": "^11.0",
26-
"illuminate/database": "^11.0",
27-
"illuminate/support": "^11.0"
25+
"illuminate/config": "^12.0",
26+
"illuminate/database": "^12.0",
27+
"illuminate/support": "^12.0"
2828
},
2929
"require-dev": {
3030
"friendsofphp/php-cs-fixer": "^3.65",
3131
"larastan/larastan": "^3.0",
32-
"orchestra/testbench": "^9.6",
33-
"pestphp/pest": "^2.28",
32+
"orchestra/testbench": "^10.0",
33+
"pestphp/pest": "^3.7",
3434
"phpstan/phpstan": "^2.0"
3535
},
3636
"autoload": {
@@ -67,9 +67,6 @@
6767
"providers": [
6868
"Cviebrock\\EloquentTaggable\\ServiceProvider"
6969
]
70-
},
71-
"branch-alias": {
72-
"dev-master": "11.0.x-dev"
7370
}
7471
},
7572
"minimum-stability": "dev",

src/Services/TagService.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public function buildTagArray($tags): array
8585
);
8686
} else {
8787
throw new \ErrorException(
88-
__CLASS__ . '::' . __METHOD__ . ' expects parameter 1 to be string, array, Tag or Collection; ' .
89-
gettype($tags) . ' given'
88+
__CLASS__ . '::' . __METHOD__ . ' expects parameter 1 to be string, array, Tag or Collection; '
89+
. gettype($tags) . ' given'
9090
);
9191
}
9292

@@ -320,8 +320,8 @@ private function getQualifiedTagTableName(): string
320320
/** @var Tag $tag */
321321
$tag = new $this->tagModel();
322322

323-
return $tag->getConnection()->getTablePrefix() .
324-
$tag->getTable();
323+
return $tag->getConnection()->getTablePrefix()
324+
. $tag->getTable();
325325
}
326326

327327
/**
@@ -341,8 +341,8 @@ public function getMorphClass()
341341
}
342342
};
343343

344-
return $instance->tags()->getConnection()->getTablePrefix() .
345-
$instance->tags()->getTable();
344+
return $instance->tags()->getConnection()->getTablePrefix()
345+
. $instance->tags()->getTable();
346346
}
347347

348348
private function getClassTaggableType($class): string

src/Taggable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ private function getQualifiedRelatedPivotKeyNameWithAlias(string $alias): string
463463
{
464464
$morph = $this->tags();
465465

466-
return $morph->getTable() . '_' . $alias .
467-
'.' . $morph->getRelatedPivotKeyName();
466+
return $morph->getTable() . '_' . $alias
467+
. '.' . $morph->getRelatedPivotKeyName();
468468
}
469469

470470
/**
@@ -474,8 +474,8 @@ private function getQualifiedForeignPivotKeyNameWithAlias(string $alias): string
474474
{
475475
$morph = $this->tags();
476476

477-
return $morph->getTable() . '_' . $alias .
478-
'.' . $morph->getForeignPivotKeyName();
477+
return $morph->getTable() . '_' . $alias
478+
. '.' . $morph->getForeignPivotKeyName();
479479
}
480480

481481
/**

0 commit comments

Comments
 (0)