Skip to content

Commit

Permalink
Merge pull request #5885 from wp-cli/fix/remove-unneeded-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed Dec 8, 2023
2 parents 9c1f144 + 0558d66 commit 8d05c78
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 62 deletions.
23 changes: 0 additions & 23 deletions php/WP_CLI/Compat/FeedbackMethodTrait.php

This file was deleted.

16 changes: 0 additions & 16 deletions php/WP_CLI/Compat/Min_PHP_5_4/FeedbackMethodTrait.php

This file was deleted.

19 changes: 0 additions & 19 deletions php/WP_CLI/Compat/Min_PHP_5_6/FeedbackMethodTrait.php

This file was deleted.

15 changes: 13 additions & 2 deletions php/WP_CLI/UpgraderSkin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
*/
class UpgraderSkin extends WP_Upgrader_Skin {

use WP_CLI\Compat\FeedbackMethodTrait;

public $api;

public function header() {}
Expand Down Expand Up @@ -41,6 +39,19 @@ public function error( $error ) {
WP_CLI::warning( $error );
}

/**
* @param string $string
* @param mixed ...$args Optional text replacements.
*/
public function feedback( $string, ...$args ) {
$args_array = [];
foreach ( $args as $arg ) {
$args_array[] = $args;
}

$this->process_feedback( $string, $args );
}

/**
* Process the feedback collected through the compat indirection.
*
Expand Down
2 changes: 0 additions & 2 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@
<!-- Exclude existing classes from the protected parameter names rule as it would break BC to change these now. -->
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames">
<exclude-pattern>*/php/WP_CLI/Iterators/Transform\.php</exclude-pattern>
<exclude-pattern>*/php/WP_CLI/Compat/Min_PHP_5_4/FeedbackMethodTrait\.php</exclude-pattern>
<exclude-pattern>*/php/WP_CLI/Compat/Min_PHP_5_6/FeedbackMethodTrait\.php</exclude-pattern>
<exclude-pattern>*/php/WP_CLI/Inflector\.php</exclude-pattern>
<exclude-pattern>*/php/WP_CLI/Autoloader\.php</exclude-pattern>
<exclude-pattern>*/php/WP_CLI/Dispatcher/CommandFactory\.php</exclude-pattern>
Expand Down

0 comments on commit 8d05c78

Please sign in to comment.