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

PHP 8.2 compatibility #7147

Merged
merged 4 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions give.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ final class Give
*/
public $stripe;

/**
* @var Give_DB_Customers
* @deprecated use give()->donors instead
*/
public $customers;

/**
* @var Give_DB_Customer_Meta
* @deprecated use give()->donor_meta instead
*/
public $customer_meta;

/**
* @since 2.8.0
*
Expand Down
1 change: 1 addition & 0 deletions includes/admin/abstract-admin-settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
* @sine 1.8
*/
#[\AllowDynamicProperties]
class Give_Settings_Page {

/**
Expand Down
1 change: 1 addition & 0 deletions includes/class-give-donate-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* @property $earnings
* @property $post_type
*/
#[\AllowDynamicProperties]
class Give_Donate_Form {

/**
Expand Down
1 change: 1 addition & 0 deletions includes/class-give-donor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*
* @since 1.0
*/
#[\AllowDynamicProperties]
class Give_Donor {

/**
Expand Down
1 change: 1 addition & 0 deletions src/Donors/Repositories/DonorRepositoryProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* @throws InvalidArgumentException
*/
#[\AllowDynamicProperties]
class DonorRepositoryProxy
{
const SHARED_METHODS = ['insert', 'update', 'delete'];
Expand Down
1 change: 1 addition & 0 deletions src/Framework/FieldsAPI/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function getValue()
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
9 changes: 6 additions & 3 deletions src/Framework/QueryBuilder/Clauses/From.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ class From
public $alias;

/**
* @param string|RawSQL $table
* @param string|null $alias
* @param string|RawSQL $table
* @param string|null $alias
*/
public function __construct($table, $alias = null)
{
$this->table = QueryBuilder::prefixTable($table);
$this->alias = trim($alias);

if ( ! is_null($alias)) {
$this->alias = trim($alias);
}
}
}
5 changes: 4 additions & 1 deletion src/Framework/QueryBuilder/Clauses/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public function __construct($joinType, $table, $alias = null)
{
$this->table = QueryBuilder::prefixTable($table);
$this->joinType = $this->getJoinType($joinType);
$this->alias = trim($alias);

if ( ! is_null($alias)) {
$this->alias = trim($alias);
}
}

/**
Expand Down
5 changes: 4 additions & 1 deletion src/Framework/QueryBuilder/Clauses/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class Select
public function __construct($column, $alias = null)
{
$this->column = trim($column);
$this->alias = trim($alias);

if ( ! is_null($alias)) {
$this->alias = trim($alias);
}
}
}
Loading