Skip to content

Commit

Permalink
PIEN-8157: PHP 8.1 (#92)
Browse files Browse the repository at this point in the history
* CL + linting

* PHP version for github + composer update

* fix scss error dividing with / by using math.div instead

* npm update

* Update composer.json

Co-authored-by: Timi-Artturi Mäkelä <[email protected]>

---------

Co-authored-by: Timi-Artturi Mäkelä <[email protected]>
  • Loading branch information
tim0haapala and Liblastic authored Apr 11, 2023
1 parent 60ebc7f commit 32554bc
Show file tree
Hide file tree
Showing 7 changed files with 4,603 additions and 2,388 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpcs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.1
extensions: simplexml
coverage: xdebug
env:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- PIEN-8157: PHP 8.1

## [1.11.8] – 2023-03-13

### Changed
Expand Down
5 changes: 3 additions & 2 deletions assets/styles/settings/brand/_functions.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@use "sass:math";

@function stripUnit($value) {
@return $value / ($value * 0 + 1);
@return math.div($value, $value * 0 + 1);
}

@function rem($pxValue, $body-font-size: 17px) {
@return #{stripUnit($pxValue) / stripUnit($body-font-size)}rem;
@return #{math.div(stripUnit($pxValue), stripUnit($body-font-size))}rem;
}

@function get_calculated_sizes($base_size: 17px, $scale_value: 1.165, $as_list: false) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
},
"require": {
"php": ">=7.4|^8.0",
"php": "^8.1",
"devgeniem/dustpress": ">=1.33.0",
"composer/installers": "^1.0.12"
},
Expand Down
16 changes: 8 additions & 8 deletions lib/ACF/Layouts/HeroLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ public function add_layout_fields() : array {
$key = $this->get_key();

$strings = [
'image' => [
'image' => [
'label' => 'Kuva',
'instructions' => '',
],
'overlay' => [
'overlay' => [
'label' => 'Tummennus',
'instructions' => '',
],
'title' => [
'title' => [
'label' => 'Otsikko',
'instructions' => '',
],
'description' => [
'description' => [
'label' => 'Kuvaus',
'instructions' => '',
],
'description_link' => [
'label' => 'Kuvauksen linkki',
'instructions' => '',
],
'link' => [
'link' => [
'label' => 'Painike',
'instructions' => '',
],
'text_align' => [
'text_align' => [
'label' => 'Tekstin tasaus',
'instructions' => '',
],
Expand All @@ -90,7 +90,7 @@ public function add_layout_fields() : array {
'instructions' => '',
],
],
'tickets' => [
'tickets' => [
'label' => 'Liput',
'title' => [
'label' => 'Otsikko',
Expand All @@ -109,7 +109,7 @@ public function add_layout_fields() : array {
'instructions' => '',
],
],
'find_us' => [
'find_us' => [
'label' => 'Löydä meille',
'title' => [
'label' => 'Otsikko',
Expand Down
Loading

0 comments on commit 32554bc

Please sign in to comment.