Skip to content

Commit edfcba5

Browse files
authored
Statamic v6 (#6)
1 parent 3a8484d commit edfcba5

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu-latest]
12-
php: [8.2, 8.3]
13-
laravel: [10.*, 11.*]
14-
statamic: [^5.0]
12+
php: [8.3]
13+
laravel: [12.*]
14+
statamic: [^6.0]
1515
name: PHP ${{ matrix.php }} - Statamic ${{ matrix.statamic }} - Laravel ${{ matrix.laravel }}
1616
steps:
1717
- name: Checkout code

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
}
1212
},
1313
"require": {
14-
"statamic/cms": "^5.18.0"
14+
"statamic/cms": "^5.18.0|^6.0"
1515
},
1616
"require-dev": {
17-
"orchestra/testbench": "^8.0 || ^9.0",
18-
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0",
19-
"laravel/pint": "^1.17"
17+
"orchestra/testbench": "^10.0",
18+
"phpunit/phpunit": "^12.0",
19+
"laravel/pint": "^1.27"
2020
},
2121
"config": {
2222
"allow-plugins": {
@@ -39,6 +39,6 @@
3939
]
4040
}
4141
},
42-
"minimum-stability": "dev",
42+
"minimum-stability": "stable",
4343
"prefer-stable": true
4444
}

src/Dictionaries/PaymentIcons.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ class PaymentIcons extends BasicDictionary
1212
{
1313
protected function getItemLabel(array $item): string
1414
{
15-
$style = 'display: flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; margin-bottom: 0.4rem;';
16-
$spanStyle = 'border: 2px solid #00000017; display: flex; border-radius: 7px; overflow: hidden; min-width: 38px;';
15+
// Statamic V6 now escapes the labels. Can only return the text label for now.
1716

18-
return "<span style=\"{$style}\"><span style=\"{$spanStyle}\">{$item['icon']}</span> {$item['label']}</span>";
17+
// $style = 'display: flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; margin-bottom: 0.4rem;';
18+
// $spanStyle = 'border: 2px solid #00000017; display: flex; border-radius: 7px; overflow: hidden; min-width: 38px;';
19+
20+
// return "<span style=\"{$style}\"><span style=\"{$spanStyle}\">{$item['icon']}</span> {$item['label']}</span>";
21+
return $item['label'];
1922
}
2023

2124
protected function getItems(): array

0 commit comments

Comments
 (0)