Skip to content

Commit 7ec8a3a

Browse files
authored
Add Laravel 12 support (#3)
* Add Laravel 12 support * Fix styling
1 parent 0987d35 commit 7ec8a3a

File tree

7 files changed

+15
-17
lines changed

7 files changed

+15
-17
lines changed

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.1'
19+
php-version: '8.2'
2020
coverage: none
2121

2222
- name: Install composer dependencies

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Easier way to add Google Tag Manager to your Laravel application. Including supp
2424

2525
| Version | Release |
2626
|---------|---------|
27-
| 11.x | ^1.4 |
28-
| 10.x | ^1.4 |
27+
| 12.x | ^1.5 |
28+
| 11.x | ^1.5 |
2929

3030
## Installation
3131

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
}
1111
],
1212
"require": {
13-
"illuminate/support": "^10.0|^11.0"
13+
"illuminate/support": "^11.0|^12.0"
1414
},
1515
"require-dev": {
16-
"orchestra/testbench": "^8.0|^9.0",
17-
"larastan/larastan": "^2.0",
18-
"laravel/pint": "^1.14"
16+
"orchestra/testbench": "^9.0|^10.0",
17+
"larastan/larastan": "^2.0|^3.1",
18+
"laravel/pint": "^1.21"
1919
},
2020
"extra": {
2121
"laravel": {

phpstan.neon.dist

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ parameters:
99
level: 8
1010

1111
ignoreErrors:
12-
13-
excludes_analyse:
14-
15-
checkMissingIterableValueType: false
16-
checkGenericClassInNonGenericObjectType: false
12+
- identifier: missingType.iterableValue
13+
- identifier: missingType.generics
14+
- identifier: argument.type

src/TagManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TagManager
1010

1111
public function __construct()
1212
{
13-
$this->data = new Collection();
13+
$this->data = new Collection;
1414
}
1515

1616
public function push(array $variables): self
@@ -32,7 +32,7 @@ public function set(Collection $data): void
3232

3333
public function clear(): void
3434
{
35-
$this->data = new Collection();
35+
$this->data = new Collection;
3636
}
3737

3838
public function event(string $name, array $variables = []): self

src/TagManagerServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public function register(): void
1414
$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'tagmanager');
1515

1616
$this->app->singleton(TagManager::class, function ($app) {
17-
return new TagManager();
17+
return new TagManager;
1818
});
1919

2020
$this->app->singleton(MeasurementProtocol::class, function ($app) {
21-
return new MeasurementProtocol();
21+
return new MeasurementProtocol;
2222
});
2323

2424
$this->app->alias(TagManager::class, 'tagmanager');

src/View/Components/Head.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(TagManager $tagManager, Session $session)
2929

3030
public function render(): View
3131
{
32-
$sessionData = $this->session->get(config('tagmanager.session_name')) ?? new Collection();
32+
$sessionData = $this->session->get(config('tagmanager.session_name')) ?? new Collection;
3333

3434
$data = $sessionData->merge($this->tagManager->get());
3535

0 commit comments

Comments
 (0)