Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/quality-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ concurrency:

jobs:
checks:
name: Codesniffer
name: Codesniffer (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.0', '8.4']

steps:
- name: Checkout project
Expand All @@ -25,14 +29,14 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl

- name: Validate composer file
run: composer validate

- name: Install composer dependencies
run: composer install
run: composer install ${{ matrix.php-version == '8.0' && '--ignore-platform-reqs' || '' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP 8.4 CI install fails

High Severity

The workflow adds a PHP 8.4 matrix job but only passes --ignore-platform-reqs for PHP 8.0. The locked dev dependency vimeo/psalm (5.26.1) declares support only through PHP 8.3, so a normal composer install on 8.4 should fail platform checks and the Codesniffer job for 8.4 never reaches composer cs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 60d0b94. Configure here.


- name: Run codesniffer
run: composer cs
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
name: "Build project PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: 8.4
- run: composer install --prefer-dist --no-dev -o --ignore-platform-reqs

- id: commit-and-push
Expand Down
6 changes: 4 additions & 2 deletions classes/Facet.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected function parse_side( $side ): object {
public function get_p2p_connexion(): array {
static $load_connexions;

if ( isset( $load_connexions) ) {
if ( isset( $load_connexions ) ) {
return $load_connexions;
}

Expand Down Expand Up @@ -411,10 +411,11 @@ public function p2p_delete_connections( $p2p_ids ): void {
continue;
}

$facet_name_in = "'";
$facet_name_in = "'"; //phpcs:ignore Generic.Formatting.MultipleStatementAlignment.NotSameWarning
$facet_name_in .= implode( "', '", $names );
$facet_name_in .= "'";

//phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$wpdb->query(
$wpdb->prepare(
"
Expand All @@ -429,6 +430,7 @@ public function p2p_delete_connections( $p2p_ids ): void {
$connexion->p2p_to,
)
);
//phpcs:enable
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true,
"phpro/grumphp-shim": true
},
"platform": {
"php": "8.3"
}
},
"require": {
"php": "8.3.*",
"php": "^8.0",
"ext-json": "*",
"composer/installers": "^1.0 || ^2.0"
},
Expand Down
Loading
Loading