Skip to content

Commit e58eaa1

Browse files
authored
Updates
1 parent 093821e commit e58eaa1

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/wp-compatibility-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,11 @@ jobs:
131131
composer global require --dev wp-coding-standards/wpcs:"^3.0"
132132
composer global require --dev phpcompatibility/php-compatibility:"^9.3"
133133
composer global require --dev phpcompatibility/phpcompatibility-wp:"^2.1"
134-
135134
composer global require --dev dealerdirect/phpcodesniffer-composer-installer:"^1.0"
136135
136+
# Install VIP standards (required for our phpcs.xml)
137+
composer global require --dev automattic/vipwpcs:"^3.0"
138+
137139
# Add composer bin to PATH
138140
echo "$HOME/.composer/vendor/bin" >> $GITHUB_PATH
139141

phpcs.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,8 @@
145145
</rule>
146146

147147
<!-- WordPress.PHP.YodaConditions -->
148-
<rule ref="WordPress.PHP.YodaConditions">
149-
<!-- Allow non-Yoda conditions for better readability in some contexts -->
150-
<properties>
151-
<property name="allow" value="comparison,assignment"/>
152-
</properties>
153-
</rule>
148+
<!-- Note: Yoda conditions are required by WordPress standards -->
149+
<rule ref="WordPress.PHP.YodaConditions"/>
154150

155151
<!-- Generic.Commenting.Fixme -->
156152
<rule ref="Generic.Commenting.Fixme">

simple-wp-site-exporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ function sse_create_site_archive( $export_paths, $database_file ) {
447447
return new WP_Error( 'zip_create_failed', sprintf(
448448
/* translators: %s: filename */
449449
__( 'Could not create zip file at %s', 'Simple-WP-Site-Exporter' ),
450-
basename($zip_filepath)
450+
basename($zip_filepath) // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.system_calls_basename -- Safe usage: $zip_filepath is constructed from controlled inputs (WordPress upload dir + sanitized filename), not user input
451451
) );
452452
}
453453

0 commit comments

Comments
 (0)