Skip to content

Commit

Permalink
[BUFIX] Fix php 8.2 deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryd committed Nov 28, 2023
1 parent c691cba commit fff58cf
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 16 deletions.
13 changes: 12 additions & 1 deletion lib/php-openid/Auth/OpenID/Association.php
Expand Up @@ -69,6 +69,16 @@ class Auth_OpenID_Association {
'HMAC-SHA256' => 'Auth_OpenID_HMACSHA256',
];

public $handle;

public $secret;

public $issued;

public $lifetime;

public $assoc_type;

/**
* This is an alternate constructor (factory method) used by the
* OpenID consumer library to create associations. OpenID store
Expand Down Expand Up @@ -539,9 +549,10 @@ function Auth_OpenID_getEncryptedNegotiator()
* @package OpenID
*/
class Auth_OpenID_SessionNegotiator {
public array $allowed_types = [];

function __construct($allowed_types)
{
$this->allowed_types = [];
$this->setAllowedTypes($allowed_types);
}

Expand Down
2 changes: 2 additions & 0 deletions lib/php-openid/Auth/OpenID/DiffieHellman.php
Expand Up @@ -48,6 +48,8 @@ class Auth_OpenID_DiffieHellman {
/** @var Auth_OpenID_BcMathWrapper */
public $lib = null;

public $public;

function __construct($mod = null, $gen = null,
$private = null, $lib = null)
{
Expand Down
32 changes: 25 additions & 7 deletions lib/php-openid/Auth/OpenID/Discover.php
Expand Up @@ -65,15 +65,33 @@ function Auth_OpenID_getOpenIDTypeName($type_uri) {
* Object representing an OpenID service endpoint.
*/
class Auth_OpenID_ServiceEndpoint {
/** @var ?string */
public $claimed_id = null;

/** @var ?string */
public $server_url = null;

/** @var array */
public $type_uris = [];

/** @var ?string */
public $local_id = null;

/** @var ?string */
public $canonicalID = null;

/**
* whether this came from an XRDS
*
* @var bool
*/
public $used_yadis = false;

/** @var ?string */
public $display_identifier = null;

function __construct()
{
$this->claimed_id = null;
$this->server_url = null;
$this->type_uris = [];
$this->local_id = null;
$this->canonicalID = null;
$this->used_yadis = false; // whether this came from an XRDS
$this->display_identifier = null;
}

function getDisplayIdentifier()
Expand Down
33 changes: 25 additions & 8 deletions lib/php-openid/Auth/Yadis/Manager.php
Expand Up @@ -303,8 +303,19 @@ class Auth_Yadis_Manager {
/** @var string */
public $session_key;

/** @var Auth_OpenID_ServiceEndpoint */
public $_current;
/**
* Reference to the current service object
*
* @var ?Auth_OpenID_ServiceEndpoint
*/
public $_current = null;

/**
* Stale flag for cleanup if PHP lib has trouble.
*
* @var bool
*/
public $stale = false;

/**
* Intialize a new yadis service manager.
Expand All @@ -328,12 +339,6 @@ function __construct($starting_url, $yadis_url,
$this->services = $services;

$this->session_key = $session_key;

// Reference to the current service object
$this->_current = null;

// Stale flag for cleanup if PHP lib has trouble.
$this->stale = false;
}

/**
Expand Down Expand Up @@ -415,6 +420,18 @@ class Auth_Yadis_Discovery {
*/
public $PREFIX = '_yadis_services_';

/** @var \Auth_Yadis_PHPSession */
public $session;

/** @var string */
public $url;

/** @var string */
public $session_key_suffix;

/** @var string */
public $session_key;

/**
* Initialize a discovery object.
*
Expand Down

0 comments on commit fff58cf

Please sign in to comment.