Skip to content

Commit 9775264

Browse files
authored
Merge branch 'develop' into fix/psr-12
2 parents 1729c6d + 6f40075 commit 9775264

File tree

124 files changed

+1571
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+1571
-391
lines changed

.github/ISSUE_TEMPLATE/1_BUG_REPORT.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ body:
2727
label: PHP Version
2828
description: Please provide us the branch of PHP version. For example, for PHP version 7.4.9, select `7.4`, or for PHP version 8.0.1, select `8.0`.
2929
options:
30+
- 8.4
31+
- 8.3
32+
- 8.2
3033
- 8.1
3134
- 8.0
3235
- 7.4

.github/workflows/code-quality.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install PHP and PHP Code Sniffer
2828
uses: shivammathur/setup-php@v2
2929
with:
30-
php-version: 8.0
30+
php-version: 8.2
3131
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
3232

3333
- name: Install Composer dependencies

.github/workflows/manifest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Update manifest
1212
runs-on: ubuntu-latest
1313
env:
14-
phpVersion: '8.1'
14+
phpVersion: '8.2'
1515
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
1616
key: winter-cms-cache-develop
1717
steps:

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
name: ${{ matrix.operatingSystem }} / JavaScript
2323
env:
2424
nodeVersion: 16
25-
phpVersion: '8.0'
25+
phpVersion: '8.2'
2626
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
2727
key: winter-cms-cache-develop
2828
steps:
@@ -74,7 +74,7 @@ jobs:
7474
max-parallel: 8
7575
matrix:
7676
operatingSystem: [ubuntu-latest, windows-latest]
77-
phpVersion: ['8.0', '8.1', '8.2', '8.3']
77+
phpVersion: ['8.1', '8.2', '8.3', '8.4']
7878
fail-fast: false
7979
runs-on: ${{ matrix.operatingSystem }}
8080
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"source": "https://github.com/wintercms/winter"
3030
},
3131
"require": {
32-
"php": "^8.0.2",
32+
"php": ">=8.1",
3333
"winter/storm": "dev-develop as 1.2",
3434
"winter/wn-system-module": "dev-develop",
3535
"winter/wn-backend-module": "dev-develop",

modules/backend/assets/css/winter.css

+70-71
Large diffs are not rendered by default.

modules/backend/assets/images/dashboard-icon.svg

+5-5
Loading

modules/backend/assets/images/media-icon.svg

+7-7
Loading

modules/backend/assets/images/tab-shape.svg

+4-4
Loading

modules/backend/assets/less/core/variables.less

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@color-border: #cccccc;
1818
@color-border-light: #e1e1e1;
1919

20-
@color-mainmenu: #000000;
20+
@color-mainmenu: #151515;
2121
@color-mainmenu-inactive: rgba(255,255,255,.6);
2222
@color-mainmenu-active: #ffffff;
2323
@color-mainmenu-active-bg: #262626;
@@ -93,10 +93,10 @@
9393
@color-filelist-hero-active-bg: @highlight-active-bg;
9494
@color-filelist-hero-active-text: @highlight-active-text;
9595

96-
@color-fancy-master-tabs-bg: #d35400;
96+
@color-fancy-master-tabs-bg: @brand-secondary-darker;
9797
@color-fancy-master-tabs-active-text: #ffffff;
9898
@color-fancy-master-tabs-inactive-text: rgba(255, 255, 255, .35);
99-
@color-fancy-master-panel-bg: #d35400;
99+
@color-fancy-master-panel-bg: @brand-secondary-darker;
100100

101101
@color-fancy-secondary-tabs-bg: #475354;
102102
@color-fancy-secondary-tabs-active-text: #ffffff;
@@ -111,9 +111,9 @@
111111
@color-fancy-form-tabless-fields-bg: @brand-secondary;
112112
@color-fancy-form-label: rgba(255, 255, 255, .5);
113113
@color-fancy-form-text: #ffffff;
114-
@color-fancy-form-text-selection: #d35400;
114+
@color-fancy-form-text-selection: @brand-secondary-darker;
115115
@color-fancy-form-placeholder: rgba(255, 255, 255, .5);
116-
@color-fancy-form-inactive-tab: #b9530f;
116+
@color-fancy-form-inactive-tab: #2c9cb9;
117117

118118
@color-sortable-caret: #999999;
119119
@color-sortable-active: @brand-secondary;
@@ -150,4 +150,4 @@
150150
// --------------------------------------------------
151151

152152
@menu-breakpoint-min: 770px;
153-
@menu-breakpoint-max: (@menu-breakpoint-min - 1);
153+
@menu-breakpoint-max: (@menu-breakpoint-min - 1);

modules/backend/assets/less/layout/fancylayout.less

-4
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ body.fancy-layout .master-tabs.control-tabs,
437437
}
438438
}
439439

440-
.tab-collapse-icon.primary {
441-
color: #808c8d;
442-
}
443-
444440
&.primary-collapsed {
445441
.tab-collapse-icon.primary {
446442
color: white;

modules/backend/assets/less/layout/sidepanel.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@
4141
}
4242

4343
.sidepanel-content-header {
44-
background: #d35400;
44+
background: @brand-secondary-darker;
4545
color: white;
4646
font-size: 15px;
4747
padding: 12px 20px 13px;
4848
position: relative;
4949

5050
&:after {
51-
.triangle(down, 15px, 8px, #d35400);
51+
.triangle(down, 15px, 8px, @brand-secondary-darker);
5252
position: absolute;
5353
left: 14px;
5454
bottom: -8px;
@@ -94,4 +94,4 @@ body.display-side-panel {
9494
#layout-side-panel .fix-button {
9595
display: none;
9696
}
97-
}
97+
}

modules/backend/behaviors/UserPreferencesModel.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Backend\Models\UserPreference;
66
use System\Behaviors\SettingsModel;
7+
use Winter\Storm\Database\Model;
78

89
/**
910
* User Preferences model extension, identical to System\Behaviors\SettingsModel
@@ -60,9 +61,8 @@ public function isConfigured(): bool
6061

6162
/**
6263
* Returns the raw Model record that stores the settings.
63-
* @return Model
6464
*/
65-
public function getSettingsRecord()
65+
public function getSettingsRecord(): ?Model
6666
{
6767
$item = UserPreference::forUser();
6868
$record = $item

modules/backend/behaviors/importexportcontroller/assets/less/import.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383
&.is-required {
8484
.column-icon {
85-
color: #ab2a1c;
85+
color: @brand-danger;
8686
}
8787
}
8888
}
@@ -141,7 +141,7 @@
141141
top: -1px;
142142
left: -3px;
143143
&:hover {
144-
background: #ab2a1c;
144+
background: @brand-danger;
145145
}
146146
}
147147
}
@@ -198,4 +198,4 @@
198198
}
199199
}
200200

201-
}
201+
}

modules/backend/classes/FormTabs.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class FormTabs implements IteratorAggregate, ArrayAccess
8282
public function __construct($section, $config = [])
8383
{
8484
$this->section = strtolower($section) ?: $this->section;
85-
$this->config = $this->evalConfig($config);
85+
$this->evalConfig($config);
8686

8787
if ($this->section == self::SECTION_OUTSIDE) {
8888
$this->suppressTabs = true;
@@ -91,10 +91,8 @@ public function __construct($section, $config = [])
9191

9292
/**
9393
* Process options and apply them to this object.
94-
* @param array $config
95-
* @return array
9694
*/
97-
protected function evalConfig($config)
95+
protected function evalConfig(array $config): void
9896
{
9997
if (array_key_exists('defaultTab', $config)) {
10098
$this->defaultTab = $config['defaultTab'];

modules/backend/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^8.0.2",
26+
"php": ">=8.1",
2727
"composer/installers": "~1.11.0",
2828
"laravel/framework": "^9.1"
2929
},

modules/backend/formwidgets/ColorPicker.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ColorPicker extends FormWidgetBase
6666
*/
6767
protected array $validationPatterns = [
6868
'cmyk' => '/^cmyk\((\d{1,2}\.?\d{0,2}%,? ?){4}\)$/',
69-
'hex' => '/^#[\w\d]{6}$/',
69+
'hex' => '/^#[\w\d]{6,8}$/',
7070
'hsl' => '/^hsla\((\d{1,3}\.?\d{0,2}%?, ?){3}\d\.?\d{0,2}?\)$/',
7171
'rgb' => '/^rgba\((\d{1,3}\.?\d{0,2}, ?){3}\d\.?\d{0,2}?\)$/',
7272
];
@@ -157,52 +157,52 @@ protected function getAvailableColors()
157157
'color' => '#16a085',
158158
],
159159
[
160-
'color' => '#2ecc71',
160+
'color' => '#6cc551',
161161
],
162162
[
163-
'color' => '#27ae60',
163+
'color' => '#52a838',
164164
],
165165
[
166-
'color' => '#3498db',
166+
'color' => '#b1dbef',
167167
],
168168
[
169-
'color' => '#2980b9',
169+
'color' => '#88c9e7',
170170
],
171171
[
172-
'color' => '#9b59b6',
172+
'color' => '#2da7c7',
173173
],
174174
[
175-
'color' => '#8e44ad',
175+
'color' => '#227f96',
176176
],
177177
[
178-
'color' => '#34495e',
178+
'color' => '#b281c5',
179179
],
180180
[
181-
'color' => '#2b3e50',
181+
'color' => '#7b4e8e',
182182
],
183183
[
184-
'color' => '#f1c40f',
184+
'color' => '#103141',
185185
],
186186
[
187-
'color' => '#f39c12',
187+
'color' => '#081821',
188188
],
189189
[
190-
'color' => '#e67e22',
190+
'color' => '#f8e095',
191191
],
192192
[
193-
'color' => '#d35400',
193+
'color' => '#dcb22d',
194194
],
195195
[
196-
'color' => '#e74c3c',
196+
'color' => '#de8754',
197197
],
198198
[
199-
'color' => '#c0392b',
199+
'color' => '#d66829',
200200
],
201201
[
202-
'color' => '#ecf0f1',
202+
'color' => '#b33f32',
203203
],
204204
[
205-
'color' => '#bdc3c7',
205+
'color' => '#ab2a1c',
206206
],
207207
[
208208
'color' => '#95a5a6',

modules/backend/formwidgets/Repeater.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,18 @@ protected function loadAssets()
217217
*/
218218
public function getSaveValue($value)
219219
{
220-
return (array) $this->processSaveValue($value);
220+
return $this->processSaveValue($value);
221221
}
222222

223223
/**
224224
* Splices in some meta data (group and index values) to the dataset.
225225
* @param array $value
226-
* @return array
226+
* @return array|null
227227
*/
228228
protected function processSaveValue($value)
229229
{
230230
if (!is_array($value) || !$value) {
231-
return $value;
231+
return null;
232232
}
233233

234234
if ($this->minItems && count($value) < $this->minItems) {

modules/backend/formwidgets/TagList.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function getSaveValue($value)
114114
$value = [$value];
115115
}
116116

117-
$value = array_filter($value);
117+
$value = array_values(array_filter($value));
118118

119119
if ($this->mode === static::MODE_RELATION) {
120120
return $this->hydrateRelationSaveValue($value);

0 commit comments

Comments
 (0)