Skip to content

Commit bda040a

Browse files
authored
PIEN-8157: PHP 8.1 (#150)
* CL + linting * CL * PHP 8.1 related fixes * PHP 8.1 updates * Linter fixes * Fallback empty string for trim * composer.json php version ^8.1 like in other themes
1 parent d67f065 commit bda040a

20 files changed

+3572
-1794
lines changed

.github/workflows/phpcs-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
2626
with:
27-
php-version: 7.4
27+
php-version: 8.1
2828
extensions: simplexml
2929
coverage: xdebug
3030
env:

CHANGELOG.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
- PIEN-8157: PHP 8.1
11+
1012
### Added
1113

1214
- PIEN-8439: Add pageID meta tag #151

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646
},
4747
"require": {
48-
"php": ">=7.4|^8.0",
48+
"php": "^8.1",
4949
"devgeniem/dustpress": ">=1.33.0",
5050
"composer/installers": "^1.0.12"
5151
},

lib/ACF/Fields/DialTreduAccordionFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct( $label = '', $key = null, $name = null ) {
4242
*/
4343
protected function sub_fields() : array {
4444
$strings = [
45-
'title' => [
45+
'title' => [
4646
'label' => 'Otsikko',
4747
'instructions' => '',
4848
],

lib/ACF/Fields/PlaceOfBusinessFields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ public function __construct( $label = '', $key = null, $name = null ) {
4747
*/
4848
protected function sub_fields() : array {
4949
$strings = [
50-
'title' => [
50+
'title' => [
5151
'label' => 'Otsikko',
5252
'instructions' => '',
5353
],
5454
'description' => [
5555
'label' => 'Kuvaus',
5656
'instructions' => '',
5757
],
58-
'contacts' => [
58+
'contacts' => [
5959
'label' => 'Yhteystiedot',
6060
'instructions' => '',
6161
],

lib/ACF/Fields/Settings/ChatTab.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ class ChatTab extends Tab {
3131
* @var array
3232
*/
3333
protected $strings = [
34-
'tab' => 'Chat',
35-
'chat_script' => [
34+
'tab' => 'Chat',
35+
'chat_script' => [
3636
'title' => 'Chatin scripti',
3737
'instructions' => 'Sisällytä avaava <script> ja sulkeva </script> tagi',
3838
],
39-
'chat_pages' => [
39+
'chat_pages' => [
4040
'title' => 'Valitse sivut, joilla chat näytetään',
4141
'instructions' => '',
4242
],
43-
'chat_page' => [
43+
'chat_page' => [
4444
'title' => 'Sivu',
4545
'instructions' => '',
4646
],
47-
'show_on_child' => [
47+
'show_on_child' => [
4848
'title' => 'Näytä tämän alasivuilla',
4949
'instructions' => '',
5050
],

lib/ACF/Fields/Settings/DialTreduSettingsTab.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DialTreduSettingsTab extends Tab {
3131
* @var array
3232
*/
3333
protected $strings = [
34-
'tab' => 'Dial Tredu',
34+
'tab' => 'Dial Tredu',
3535
'dial_tredu_page' => [
3636
'title' => 'Listaussivu',
3737
'instructions' => 'Esitetään murupolussa.',

lib/ACF/Fields/Settings/TreduEventsSettingsTab.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TreduEventsSettingsTab extends Tab {
3131
* @var array
3232
*/
3333
protected $strings = [
34-
'tab' => 'Tredun tapahtumat',
34+
'tab' => 'Tredun tapahtumat',
3535
'tredu_events_page' => [
3636
'title' => 'Tredun tapahtumasivu',
3737
'instructions' => 'Esitetään Tredun tapahtumien murupolussa.',

lib/ACF/PageHeroGroup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public function __construct() {
3131
);
3232
}
3333

34-
/**ttred
35-
* Register fields
34+
/**
35+
* Register fields.
3636
*
3737
* @return void
3838
*/

lib/Blocks/DialTreduAccordion.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@ class DialTreduAccordion extends BaseBlock {
3030
const KEY = 'dial-tredu-accordion';
3131

3232
/**
33-
* The block icon
33+
* The block icon.
3434
*
3535
* @var string
3636
*/
3737
protected $icon = 'format-status';
3838

3939
/**
40-
* Create the layout
41-
*
42-
* @param string $key Key from the flexible content.
40+
* Create the layout.
4341
*/
4442
public function __construct() {
4543
$this->title = 'Dial Tredu Haitari';

0 commit comments

Comments
 (0)