Skip to content

Commit

Permalink
Merge pull request #22626 from colemanw/readOnlyRename
Browse files Browse the repository at this point in the history
APIv4 - Rename 'ReadOnly' trait to 'ReadOnlyEntity' to avoid PHP error
  • Loading branch information
eileenmcnaughton authored Jan 27, 2022
2 parents e463176 + 405d086 commit 01964ce
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Civi/Api4/EntityFinancialTrxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
class EntityFinancialTrxn extends Generic\DAOEntity {
use Generic\Traits\EntityBridge;
use Generic\Traits\ReadOnly;
use Generic\Traits\ReadOnlyEntity;

/**
* @return array
Expand Down
2 changes: 1 addition & 1 deletion Civi/Api4/FinancialItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
* @package Civi\Api4
*/
class FinancialItem extends Generic\DAOEntity {
use Generic\Traits\ReadOnly;
use Generic\Traits\ReadOnlyEntity;

}
2 changes: 1 addition & 1 deletion Civi/Api4/FinancialTrxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
* @package Civi\Api4
*/
class FinancialTrxn extends Generic\DAOEntity {
use Generic\Traits\ReadOnly;
use Generic\Traits\ReadOnlyEntity;

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Trait for Entities not intended to be publicly writable.
*/
trait ReadOnly {
trait ReadOnlyEntity {

/**
* Not intended to be used outside CiviCRM core code.
Expand Down
2 changes: 1 addition & 1 deletion Civi/Api4/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
* @package Civi\Api4
*/
class LineItem extends Generic\DAOEntity {
use Generic\Traits\ReadOnly;
use Generic\Traits\ReadOnlyEntity;

}
2 changes: 1 addition & 1 deletion tests/phpunit/api/v4/Entity/ConformanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ protected function toDataProviderArray($names) {
* @return bool
*/
protected function isReadOnly($entityClass) {
return in_array('ReadOnly', $entityClass::getInfo()['type'], TRUE);
return in_array('ReadOnlyEntity', $entityClass::getInfo()['type'], TRUE);
}

/**
Expand Down

0 comments on commit 01964ce

Please sign in to comment.