diff --git a/lib/helpers/wp-cli-db/class-wp-cli-db.php b/lib/helpers/wp-cli-db/class-wp-cli-db.php index c66dba8e3a..8be564c820 100644 --- a/lib/helpers/wp-cli-db/class-wp-cli-db.php +++ b/lib/helpers/wp-cli-db/class-wp-cli-db.php @@ -54,7 +54,7 @@ public function validate_subcommand( array $command ) { ]; if ( ! in_array( $subcommand, $allowed_subcommands, true ) ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new Exception( "The `wp db $subcommand` subcommand is not permitted for this site." ); } diff --git a/tests/cache/test-vary-cache.php b/tests/cache/test-vary-cache.php index 8d06caf6ee..b7f0c2e889 100644 --- a/tests/cache/test-vary-cache.php +++ b/tests/cache/test-vary-cache.php @@ -34,7 +34,7 @@ public function setUp(): void { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( static function ( int $errno, string $errstr ) { if ( $errno & error_reporting() ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new ErrorException( $errstr, $errno ); } diff --git a/tests/files/acl/test-acl.php b/tests/files/acl/test-acl.php index 39f1149cc1..156479154d 100644 --- a/tests/files/acl/test-acl.php +++ b/tests/files/acl/test-acl.php @@ -30,7 +30,7 @@ public function setUp(): void { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( static function ( int $errno, string $errstr ) { if ( error_reporting() & $errno ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new ErrorException( $errstr, $errno ); } diff --git a/tests/files/acl/test-pre-wp-utils.php b/tests/files/acl/test-pre-wp-utils.php index 2d50b33eaa..5c8a881933 100644 --- a/tests/files/acl/test-pre-wp-utils.php +++ b/tests/files/acl/test-pre-wp-utils.php @@ -21,7 +21,7 @@ public function setUp(): void { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( static function ( int $errno, string $errstr ) { if ( error_reporting() & $errno ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new ErrorException( $errstr, $errno ); } diff --git a/tests/files/test-vip-filesystem.php b/tests/files/test-vip-filesystem.php index bddbb5d39c..6c630dca26 100644 --- a/tests/files/test-vip-filesystem.php +++ b/tests/files/test-vip-filesystem.php @@ -49,7 +49,7 @@ public function setUp(): void { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( static function ( int $errno, string $errstr ) { if ( $errno & error_reporting() ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new ErrorException( $errstr, $errno ); } diff --git a/tests/files/test-wp-filesystem-vip.php b/tests/files/test-wp-filesystem-vip.php index 4167d63056..62acbb4952 100644 --- a/tests/files/test-wp-filesystem-vip.php +++ b/tests/files/test-wp-filesystem-vip.php @@ -37,7 +37,7 @@ public function setUp(): void { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( static function ( int $errno, string $errstr ) { if ( error_reporting() & $errno ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new ErrorException( $errstr, $errno ); } diff --git a/tests/mock-constants.php b/tests/mock-constants.php index ecb3de127a..835f70083a 100644 --- a/tests/mock-constants.php +++ b/tests/mock-constants.php @@ -21,7 +21,7 @@ public static function clear(): void { public static function define( string $constant, $value ): void { if ( isset( self::$constants[ $constant ] ) ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new InvalidArgumentException( sprintf( "Constant \"%s\" is already defined. Stacktrace:\n%s", $constant, self::$constants[ $constant ][1] ) ); } @@ -36,7 +36,7 @@ public static function defined( string $constant ): bool { public static function constant( string $constant ) { if ( ! isset( self::$constants[ $constant ] ) ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new InvalidArgumentException( sprintf( 'Constant "%s" is not defined', $constant ) ); } diff --git a/tests/prometheus/test-prometheus.php b/tests/prometheus/test-prometheus.php index ae73dd96a5..6cedc141ee 100644 --- a/tests/prometheus/test-prometheus.php +++ b/tests/prometheus/test-prometheus.php @@ -24,7 +24,7 @@ public function setUp(): void { // As of PHPUnit 10.x, expectWarning() is removed. We'll use a custom error handler to test for warnings. // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( static function ( int $errno, string $errstr ): never { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new \Exception( $errstr, $errno ); }, E_USER_WARNING ); } diff --git a/tests/search/includes/classes/test-class-search.php b/tests/search/includes/classes/test-class-search.php index 55a913c5b8..4dc1e7f8f8 100644 --- a/tests/search/includes/classes/test-class-search.php +++ b/tests/search/includes/classes/test-class-search.php @@ -40,7 +40,7 @@ public function setUp(): void { // As of PHPUnit 10.x, expectWarning() is removed. We'll use a custom error handler to test for warnings. // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( static function ( int $errno, string $errstr ): never { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new \Exception( $errstr, $errno ); }, E_USER_WARNING ); } diff --git a/tests/test-vip-cache-manager.php b/tests/test-vip-cache-manager.php index 17f7291159..387c56b298 100644 --- a/tests/test-vip-cache-manager.php +++ b/tests/test-vip-cache-manager.php @@ -19,7 +19,7 @@ public function setUp(): void { $this->original_error_reporting = error_reporting(); set_error_handler( static function ( int $errno, string $errstr ) { if ( error_reporting() & $errno ) { - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CLI + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- CLI throw new ErrorException( $errstr, $errno ); }