Skip to content

Commit

Permalink
Deprecate WP_Auth0_Api_Operations methods
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Apr 1, 2019
1 parent a79f767 commit 1b34da8
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/WP_Auth0_Api_Operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ public function __construct( WP_Auth0_Options_Generic $a0_options ) {
}

/**
* TODO: Deprecate
* @deprecated - 3.10.0, not used and no replacement provided.
*
* @codeCoverageIgnore - To be deprecated
*/
public function update_wordpress_connection( $app_token, $connection_id, $password_policy, $migration_token ) {
// phpcs:ignore
@trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED );

$domain = $this->a0_options->get( 'domain' );

Expand Down Expand Up @@ -93,11 +97,13 @@ public function create_wordpress_connection( $app_token, $migration_enabled, $pa
}

/**
* TODO: Deprecate
* @deprecated - 3.10.0, Rules are no longer managed in the plugin, use the Auth0 dashboard.
*
* @codeCoverageIgnore - To be deprecated
*/
public function toggle_rule( $app_token, $rule_id, $rule_name, $rule_script ) {
// phpcs:ignore
@trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED );

$domain = $this->a0_options->get( 'domain' );

Expand Down
2 changes: 2 additions & 0 deletions lib/WP_Auth0_Configure_JWTAUTH.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Class WP_Auth0_Configure_JWTAUTH
*
* @deprecated - 3.10.0, plugin is deprecated and removed from the WP plugin repo.
*
* @codeCoverageIgnore - Deprecated.
*/
class WP_Auth0_Configure_JWTAUTH {

Expand Down
9 changes: 9 additions & 0 deletions lib/WP_Auth0_DBManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public function __construct( WP_Auth0_Options $a0_options ) {
$this->a0_options = $a0_options;
}

/**
* TODO: Deprecate init()
*/
public function init() {
$this->current_db_version = (int) get_option( 'auth0_db_version', 0 );
if ( $this->current_db_version === 0 ) {
Expand Down Expand Up @@ -207,6 +210,8 @@ public function install_db( $version_to_install = null ) {
* Display a banner if we are not able to get a Management API token.
*
* @deprecated - 3.10.0, not used.
*
* @codeCoverageIgnore - Deprecated.
*/
public function notice_failed_client_grant() {

Expand Down Expand Up @@ -266,6 +271,8 @@ public function notice_failed_client_grant() {
* Display a banner once after 3.5.0 upgrade.
*
* @deprecated - 3.10.0, not used.
*
* @codeCoverageIgnore - Deprecated.
*/
public function notice_successful_client_grant() {

Expand Down Expand Up @@ -293,6 +300,8 @@ public function notice_successful_client_grant() {
* Display a banner once after 3.5.1 upgrade.
*
* @deprecated - 3.10.0, not used.
*
* @codeCoverageIgnore - Deprecated.
*/
public function notice_successful_grant_types() {

Expand Down
1 change: 1 addition & 0 deletions lib/WP_Auth0_EditProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function __construct(

/**
* Add actions and filters for the profile page.
* TODO: Deprecate init()
*/
public function init() {
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
Expand Down
1 change: 1 addition & 0 deletions lib/WP_Auth0_Email_Verification.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function __construct( WP_Auth0_Api_Jobs_Verification $api_jobs_resend ) {

/**
* Set up hooks tied to functions that can be dequeued.
* TODO: Deprecate init()
*
* @codeCoverageIgnore - Called at startup, tested in TestEmailVerification::testHooks()
*/
Expand Down
1 change: 1 addition & 0 deletions lib/WP_Auth0_ErrorLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class WP_Auth0_ErrorLog {

/**
* Add actions and filters for the error log settings section.
* TODO: Deprecate init()
*
* @link https://developer.wordpress.org/reference/hooks/admin_action__requestaction/
*/
Expand Down
3 changes: 3 additions & 0 deletions lib/WP_Auth0_Export_Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public function __construct( WP_Auth0_DBManager $db_manager ) {
$this->db_manager = $db_manager;
}

/**
* TODO: Deprecate init()
*/
public function init() {
add_action( 'admin_footer', array( $this, 'a0_add_users_export' ) );
add_action( 'load-users.php', array( $this, 'a0_export_selected_users' ) );
Expand Down
3 changes: 3 additions & 0 deletions lib/WP_Auth0_Import_Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public function __construct( WP_Auth0_Options $a0_options ) {
$this->a0_options = $a0_options;
}

/**
* TODO: Deprecate init()
*/
public function init() {
add_action( 'admin_action_wpauth0_export_settings', array( $this, 'export_settings' ) );
add_action( 'admin_action_wpauth0_import_settings', array( $this, 'import_settings' ) );
Expand Down

0 comments on commit 1b34da8

Please sign in to comment.