Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit fe77ae1

Browse files
authored
Statamic 6 (#14)
* Use `GlobalVariablesSaved` event * Update composer.json * Remove dump * Update CHANGELOG
1 parent e30bb44 commit fe77ae1

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

CHANGELOG.md

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

3+
## v4.0.0 (2026-01-25)
4+
5+
### What's new
6+
- Statamic v6 support. 6d975f8a by @robdekort
7+
- Use `GlobalVariablesSaved` event. 3d74bbe5 by @robdekort
8+
39
## v3.6.1 (2025-02-11)
410

511
### What's improved

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
}
1818
},
1919
"require": {
20-
"statamic/cms": "^5.0"
20+
"statamic/cms": "^6.0"
2121
}
2222
}

src/Listeners/GenerateFavicons.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
namespace Studio1902\PeakBrowserAppearance\Listeners;
44

5-
use Statamic\Events\GlobalSetSaved;
6-
use Statamic\Globals\GlobalSet;
5+
use Statamic\Events\GlobalVariablesSaved;
6+
use Statamic\Globals\Variables;
77
use Studio1902\PeakBrowserAppearance\Generators\Favicons;
88

99
class GenerateFavicons
1010
{
11-
private function shouldHandle(GlobalSet $globals): bool
11+
private function shouldHandle(Variables $variables): bool
1212
{
13-
return $globals->handle() === 'browser_appearance';
13+
return $variables->globalSet()->handle() === 'browser_appearance';
1414
}
1515

16-
public function handle(GlobalSetSaved $event): void
16+
public function handle(GlobalVariablesSaved $event): void
1717
{
18-
/** @var GlobalSet $globals */
19-
$globals = $event->globals;
18+
/** @var Variables $globals */
19+
$variables = $event->variables;
2020

21-
if (!$this->shouldHandle($globals)) {
21+
if (!$this->shouldHandle($variables)) {
2222
return;
2323
}
2424

src/ServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Studio1902\PeakBrowserAppearance;
44

5-
use Statamic\Events\GlobalSetSaved;
5+
use Statamic\Events\GlobalVariablesSaved;
66
use Statamic\Providers\AddonServiceProvider;
77
use Studio1902\PeakBrowserAppearance\Listeners\GenerateFavicons;
88
use Studio1902\PeakBrowserAppearance\Updates\UpdateBrowserAppearanceGlobals;
@@ -11,7 +11,7 @@
1111
class ServiceProvider extends AddonServiceProvider
1212
{
1313
protected $listen = [
14-
GlobalSetSaved::class => [
14+
GlobalVariablesSaved::class => [
1515
GenerateFavicons::class,
1616
],
1717
];

0 commit comments

Comments
 (0)