Skip to content

Commit

Permalink
fix: update donor proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Waldstein committed Jan 14, 2025
1 parent 185f688 commit 73cc27b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Donors/Repositories/DonorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
class DonorRepository
{

/**
* @var DonorMetaRepository
*/
Expand Down
10 changes: 9 additions & 1 deletion src/Donors/Repositories/DonorRepositoryProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
* This proxy determines which donors repository to call donors->method() from.
* In the case of naming conflicts, we will manually check SHARED_METHOD against their arguments.
*
* @unreleased added $meta property
* @since 2.19.6
*
* @mixin DonorRepository
* @mixin Give_DB_Donors
* @mixin DonorMetaRepository
*
* @throws InvalidArgumentException
*/
Expand All @@ -30,17 +32,23 @@ class DonorRepositoryProxy
* @var DonorRepository
*/
private $donorRepository;
/**
* @var DonorMetaRepository
*/
public $meta;

/**
* The Give_DB_Donors class extends Give_DB which has & assigns public properties that we need to
* dynamically assign to this proxy class or else they won't be accessible.
*
* @unreleased added $meta property
* @since 2.19.6
*/
public function __construct(Give_DB_Donors $legacyDonorRepository, DonorRepository $donorRepository)
public function __construct(Give_DB_Donors $legacyDonorRepository, DonorRepository $donorRepository, DonorMetaRepository $meta)
{
$this->legacyDonorRepository = $legacyDonorRepository;
$this->donorRepository = $donorRepository;
$this->meta = $meta;

$properties = get_object_vars($legacyDonorRepository);

Expand Down

0 comments on commit 73cc27b

Please sign in to comment.