Skip to content

Commit

Permalink
Allow dynamic properties due to PHP 8.2 dynamic prop deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Sep 10, 2024
1 parent d515e33 commit 9230859
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/classes/class-wp-oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ class WPOAuthException extends Exception {
/**
* Create Consumer key
*/
#[AllowDynamicProperties]
class WPOAuthConsumer {
/**
* Contains the user's Consumer key.
*
* @var consumer key
* @var string $key
*/
public $key;
/**
* Contains the user's consumer secret.
*
* @var secret
* @var string $secret
*/
public $secret;

Expand Down Expand Up @@ -72,13 +73,13 @@ class WPOAuthToken {
/**
* Access token
*
* @var token
* @var string $key
*/
public $key;
/**
* Access secret.
*
* @var secret
* @var string $secret
*/
public $secret;

Expand All @@ -104,7 +105,7 @@ public function to_string() {
}

/**
* Return string.
* @return string.
*/
public function __toString() {
return $this->to_string();
Expand Down Expand Up @@ -327,42 +328,42 @@ class WP_Oauth_Request {
/**
* Query parameters
*
* @var parameters
* @var array $parameters
*/
private $parameters;

/**
* HTTP query method.
*
* @var http_method
* @var string $http_method
*/
private $http_method;

/**
* Target URL
*
* @var http_url
* @var string $http_url
*/
private $http_url;

/**
* Base string - base for signature string.
*
* @var base_string
* @var string $base_string
*/
public $base_string;

/**
* Version.
*
* @var version
* @var string $version
*/
public static $version = '1.0';

/**
* POST input - source of input.
*
* @var post_input
* @var string $post_input
*/
public static $post_input = 'php://input';

Expand Down Expand Up @@ -720,7 +721,7 @@ class WPOAuthServer {
/**
* Storage variable.
*
* @var $data_store
* @var object $data_store
*/
protected $data_store;

Expand Down
1 change: 1 addition & 0 deletions src/classes/class-wpt-twitteroauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/**
* X.com WPOAuth class
*/
#[AllowDynamicProperties]
class Wpt_TwitterOAuth {
/**
* Contains the last HTTP status code returned
Expand Down

0 comments on commit 9230859

Please sign in to comment.