Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/daniele/fix deprecation warning with php8.2 #763

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion includes/entities/class-fs-plugin-plan.php
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
/**
* Class FS_Plugin_Plan
*
* @property FS_Pricing[] $pricing
*/
class FS_Plugin_Plan extends FS_Entity {

8 changes: 4 additions & 4 deletions includes/entities/class-fs-site.php
Original file line number Diff line number Diff line change
@@ -10,15 +10,15 @@
exit;
}

/**
* @property int $blog_id
*/
#[AllowDynamicProperties]
class FS_Site extends FS_Scope_Entity {
/**
* @var number
*/
public $site_id;
/**
* @var int
*/
public $blog_id;
/**
* @var number
*/
13 changes: 13 additions & 0 deletions includes/entities/class-fs-user.php
Original file line number Diff line number Diff line change
@@ -48,6 +48,19 @@ function __construct( $user = false ) {
parent::__construct( $user );
}

/**
* This method removes the deprecated 'is_beta' property from the serialized data.
* Should clean up the serialized data to avoid PHP 8.2 warning on next execution.
*
* @return void
*/
function __wakeup() {
if ( property_exists( $this, 'is_beta' ) ) {
// If we enter here, and we are running PHP 8.2, we already had the warning. But we sanitize data for next execution.
unset( $this->is_beta );
}
}

function get_name() {
return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
}
2 changes: 1 addition & 1 deletion start.php
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
*
* @var string
*/
$this_sdk_version = '2.10.0.1';
$this_sdk_version = '2.10.0.2';

#region SDK Selection Logic --------------------------------------------------------------------

Loading