Skip to content

Commit

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

* linter fixes

* linter fixes

* linter fixes

* PHP versions

* composer update and php version in phpcs.xml.dist

* npm ci

* npm lint-fix

* js linter ignore

* composer update

* Updated deps

* Update composer.json

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

* Update phpcs.xml.dist

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

* composer update

* Update phpcs.xml.dist

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 bbf4670 commit 7914cb0
Show file tree
Hide file tree
Showing 10 changed files with 540 additions and 10,070 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][semver].

## [Unreleased]

- PIEN-8157: PHP 8.1

## [0.2.2] - 2022-11-03

- PIEN-7780: Remove link manipulation when importing from Drupal, handle problem with styles.
Expand Down
7 changes: 4 additions & 3 deletions assets/scripts/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ class News {

this.exoveContent.find( 'use' ).each( function() {
const xlinkHref = $( this ).attr( 'xlink:href' );
const iconName = xlinkHref.substr( xlinkHref.indexOf( '#' ) );
$( this ).attr( 'xlink:href', `${exoveData.iconsPath}${iconName}` );
const iconName = xlinkHref.substr( xlinkHref.indexOf( '#' ) );
// exoveData defined in NewsImporterPlugin.php localize script
$( this ).attr( 'xlink:href', `${ exoveData.iconsPath }${ iconName }` ); // eslint-disable-line no-undef
} );
}

Expand All @@ -51,7 +52,7 @@ class News {
*
* @return {void}
*/
toggle( event ) {
toggle( event ) {
const toggleTrigger = $( event.currentTarget );
const ariaExpandedState = toggleTrigger.attr( 'aria-expanded' ) === 'false';
const duration = typeof toggleTrigger.data( 'duration' ) !== undefined ? toggleTrigger.data( 'duration' ) : 400;
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"wordpress", "wp", "plugin"
],
"require": {
"php": ">=7.4|^8",
"php": "^8.1",
"composer/installers": "^v1.10.0",
"symfony/dom-crawler": "^5.4",
"symfony/css-selector": "^5.4"
Expand All @@ -29,9 +29,9 @@
"devgeniem/geniem-rules-codesniffer": "^1"
},
"scripts": {
"lint": "vendor/bin/phpcs --standard=phpcs.xml.dist src/ -s --warning-severity=0",
"lint-all": "vendor/bin/phpcs --standard=phpcs.xml.dist src/",
"lint-fix": "vendor/bin/phpcbf --standard=phpcs.xml.dist --basepath=. .src/"
"lint": "vendor/bin/phpcs --standard=phpcs.xml.dist src/ -s --warning-severity=0 --ignore=node_modules/ --runtime-set minimum_supported_wp_version 6.0",
"lint-all": "vendor/bin/phpcs --standard=phpcs.xml.dist src/ --ignore=node_modules/ --runtime-set minimum_supported_wp_version 6.0",
"lint-fix": "vendor/bin/phpcbf --standard=phpcs.xml.dist --basepath=. .src/ --ignore=node_modules/ --runtime-set minimum_supported_wp_version 6.0"
},
"config": {
"allow-plugins": {
Expand Down
Loading

0 comments on commit 7914cb0

Please sign in to comment.