[REF][PHP8.2] Further resolve some deprecation issues around dynamic class properties
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 19 Dec 2022 20:54:20 +0000 (20:54 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 19 Dec 2022 21:35:55 +0000 (21:35 +0000)
25 files changed:
CRM/Activity/Form/Activity.php
CRM/Activity/Import/Parser/Activity.php
CRM/Case/XMLProcessor/Report.php
CRM/Contact/Form/Task/EmailTrait.php
CRM/Contact/Page/View.php
CRM/Core/CodeGen/Schema.php
CRM/Core/CodeGen/Specification.php
CRM/Core/Form/Search.php
CRM/Core/Page.php
CRM/Core/Selector/Controller.php
CRM/Extension/Browser.php
CRM/Extension/Info.php
Civi/Test/CiviTestListenerPHPUnit7.php
Civi/WorkflowMessage/FieldSpec.php
ext/oauth-client/tests/phpunit/Civi/OAuth/AuthCodeFlowTest.php
ext/oauth-client/tests/phpunit/api/v4/OAuthContactTokenTest.php
tests/phpunit/CRM/ACL/ListTest.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php
tests/phpunit/CRM/Activity/Form/ActivityTest.php
tests/phpunit/CRM/Activity/Form/SearchTest.php
tests/phpunit/Civi/Core/CiviFacadeTest.php
tests/phpunit/Civi/Core/SettingsBagTest.php
tests/phpunit/CiviTest/CiviCaseTestCase.php
tests/phpunit/CiviTest/CiviMailUtils.php
tests/phpunit/CiviTest/CiviTestSMSProvider.php

index ce069e8be431050ad2ce26f50521c9e7ee9b3a9f..c2e24fdcdb5280d799aa737a9862487070aedc33 100644 (file)
@@ -127,6 +127,13 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
 
   public $submitOnce = TRUE;
 
+  /**
+   * @var array
+   */
+  public $_groupTree;
+
+  public $_entityTagValues;
+
   /**
    * Explicitly declare the entity api name.
    *
index 13f18fca5ab4c72d1bdf44ca9ea4726685425e04..3f155132f3b281499bc5e34a8f24a778829b0a11 100644 (file)
@@ -21,6 +21,8 @@
  */
 class CRM_Activity_Import_Parser_Activity extends CRM_Import_Parser {
 
+  protected $_newActivity;
+
   /**
    * Get information about the provided job.
    *  - name
index 3eed9850112eb2b907b11e6acaeacbba153ce05d..745a299dd72b9845ff36bfc60502c99b02267d4c 100644 (file)
@@ -23,6 +23,13 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor {
    */
   protected $_isRedact;
 
+  /**
+   * Redaction Rules.
+   *
+   * @var array
+   */
+  protected $_redactionStringRules = [];
+
   /**
    */
   public function __construct() {
index 268595325fb11473dc41e7c0c0b7f269b25c7896..06764a1c09e0d971046572c222cf21ada97e0410 100644 (file)
@@ -80,6 +80,14 @@ trait CRM_Contact_Form_Task_EmailTrait {
    */
   protected $suppressedEmails = [];
 
+  public $_contactDetails = [];
+
+  public $_entityTagValues;
+
+  public $_caseId;
+
+  public $_context;
+
   /**
    * Getter for isSearchContext.
    *
index 36cd8e0c981e91ad77fd05e4bfcd2a080473929f..76eec147371cf3cd2003445b17eb92c9785533ab 100644 (file)
@@ -46,7 +46,7 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
    *
    * @var string
    */
-  protected $_permission;
+  public $_permission;
 
   /**
    * Heart of the viewing process.
index 7793dc5ae47bffda07fa5f0f3494720b10d228de..bc3e804626a3a1cc04c0cd7766c6433eede078e3 100644 (file)
@@ -5,6 +5,8 @@
  */
 class CRM_Core_CodeGen_Schema extends CRM_Core_CodeGen_BaseTask {
 
+  public $locales;
+
   /**
    * CRM_Core_CodeGen_Schema constructor.
    *
index c336ef9ecb4cbd5de6565f1354a8a593878ab6e0..9f3aaea73769fb602c8bd2b6cfdcde240613bd3c 100644 (file)
@@ -9,6 +9,8 @@ class CRM_Core_CodeGen_Specification {
 
   protected $classNames;
 
+  public $buildVersion;
+
   /**
    * Read and parse.
    *
index 001bd72dcdd18cf10e55453873d473a897cd7736..aa2e13b5b1954914c250cd09aacc8ce753e55fa3 100644 (file)
@@ -94,6 +94,8 @@ class CRM_Core_Form_Search extends CRM_Core_Form {
    */
   protected $searchFieldMetadata = ['Contact' => []];
 
+  protected $_reset;
+
   /**
    * @return array
    */
index 806393ceadd45a7507bf8e661a9f17d2118fe242..0507bd2dc153408d921706b4b4fff39356262751 100644 (file)
@@ -134,6 +134,13 @@ class CRM_Core_Page {
     'beginHookFormElements',
   ];
 
+  /**
+   * The permission we have on this contact
+   *
+   * @var string
+   */
+  public $_permission;
+
   /**
    * Class constructor.
    *
index 05e1e09a906d2273450bd6d4430b2947cd05fe23..a3723979b13ed11a013c9d7a24041bbfbb9cd9d0 100644 (file)
@@ -158,6 +158,8 @@ class CRM_Core_Selector_Controller {
    */
   protected $_dynamicAction = FALSE;
 
+  protected $_case;
+
   /**
    * Class constructor.
    *
index af1a0e84de649d6fa15cf1145f58d9fedafc5f34..f61caf3152950b5ef601cf0d6b754ca81b18756e 100644 (file)
@@ -44,6 +44,21 @@ class CRM_Extension_Browser {
    */
   protected $guzzleClient;
 
+  /**
+   * @var string
+   */
+  public $repoUrl;
+
+  /**
+   * @var string
+   */
+  public $indexPath;
+
+  /**
+   * @var array
+   */
+  protected $_remotesDiscovered;
+
   /**
    * @return \GuzzleHttp\Client
    */
index 3feb6af276b273bb09d8f07fe9de36afc201c3d7..2546da5c5c679abb77e3388538264ececa2101ea 100644 (file)
@@ -160,6 +160,16 @@ class CRM_Extension_Info {
    */
   public $typeInfo;
 
+  /**
+   * @var string
+   */
+  public $url;
+
+  /**
+   * @var string
+   */
+  public $category;
+
   /**
    * Load extension info an XML file.
    *
index 97c122081a8310dcb994613c03fbde7bf1917e53..8b4b9af92ed3150a2e6ac20372db367347f0fdc4 100644 (file)
@@ -25,6 +25,8 @@ class CiviTestListenerPHPUnit7 implements \PHPUnit\Framework\TestListener {
    */
   private $cache = [];
 
+  public $errorScope;
+
   /**
    * @var \CRM_Core_Transaction|null
    */
index 7672ed880263438f0df597c14c32c119fe8c00bf..2e3850f80d9a1cfef2bb3dbd1c3d4d288ba8b6d6 100644 (file)
@@ -43,6 +43,8 @@ class FieldSpec {
    */
   public $scope;
 
+  public $comment;
+
   /**
    * @return bool
    */
index 8f30036b6c64da658d9031a79feb0b753b43e2c2..bf0d37e50f16e15ae4e07fb40f6d2df7e325de90 100644 (file)
@@ -19,6 +19,8 @@ class AuthCodeFlowTest extends \PHPUnit\Framework\TestCase implements
 
   private $providers = [];
 
+  protected $ids = [];
+
   public function setUpHeadless() {
     // Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile().
     // See: https://docs.civicrm.org/dev/en/latest/testing/phpunit/#civitest
index 360df66235c1f16554547555f2703d5dbdce2fb3..389edd8220a98f97feb89df10aa9c85732c008d2 100644 (file)
@@ -31,6 +31,8 @@ class api_v4_OAuthContactTokenTest extends \PHPUnit\Framework\TestCase implement
 
   private $hookEvents;
 
+  protected $ids = [];
+
   public function setUpHeadless(): \Civi\Test\CiviEnvBuilder {
     // Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile().
     // See: https://docs.civicrm.org/dev/en/latest/testing/phpunit/#civitest
index f80aba5f4951ad99431d42c15f14d0e7fe5b67e1..c959bd46aa215b49078604a8e8589f520fc7d466 100644 (file)
  */
 class CRM_ACL_ListTest extends CiviUnitTestCase {
 
+  /**
+   * @var array
+   */
+  protected $allowedContactsACL = [];
+
   /**
    * Set up function.
    */
index 11973f735b234d74fd3f012b3380a1f37e1b3f59..14e6d8d8e59286631ea8d05db8dfe7bdc0a6794e 100644 (file)
@@ -15,6 +15,8 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
 
   private $someContacts = [];
 
+  protected $allowedContacts = [];
+
   /**
    * Set up for test.
    *
index 12190a9e1867794c1741dd4732cd5bd09adb7860..9a2b84ca7545bb9be9ae78821f3993be1ae9ad19 100644 (file)
@@ -8,6 +8,11 @@ use Civi\Test\Invasive;
  */
 class CRM_Activity_Form_ActivityTest extends CiviUnitTestCase {
 
+  protected $assignee1;
+  protected $assignee2;
+  protected $target;
+  protected $source;
+
   public function setUp():void {
     parent::setUp();
     $this->assignee1 = $this->individualCreate([
index 812ca7badf311668d59a1c831859e0dc33debf89..a50099c5bfc5a719989ec1f8d32c56ba49aab30f 100644 (file)
@@ -6,6 +6,11 @@
  */
 class CRM_Activity_Form_SearchTest extends CiviUnitTestCase {
 
+  /**
+   * @var int
+   */
+  protected $individualID;
+
   public function setUp(): void {
     parent::setUp();
     $this->individualID = $this->individualCreate();
index ef68482906b5ef66b52614eda5b9aae14abcd381..645937a087b2d47d4ee23912f68f83f7de1ceee0 100644 (file)
@@ -5,6 +5,8 @@ class CiviFacadeTest extends \CiviUnitTestCase {
 
   protected $origSetting;
 
+  protected $mandates;
+
   protected function setUp(): void {
     $this->origSetting = $GLOBALS['civicrm_setting'];
 
index 85ca76ffe82053d08e7fffcf289dc17083283910..69f58dfcb59fb1f161c6ebd618d45da35bf3d77f 100644 (file)
@@ -5,6 +5,8 @@ class SettingsBagTest extends \CiviUnitTestCase {
 
   protected $origSetting;
 
+  public $mandates;
+
   protected function setUp(): void {
     $this->origSetting = $GLOBALS['civicrm_setting'];
 
index 95088ae6587d38be1d66479ff21f608e9e04454a..b23cca88c8aed3bd93b34852dc139a1bee12c782 100644 (file)
@@ -28,6 +28,12 @@ class CiviCaseTestCase extends CiviUnitTestCase {
 
   protected $_loggedInUser;
 
+  /**
+   * Tables to truncate as part of cleanup
+   * @var array
+   */
+  protected $tablesToTruncate;
+
   public function setUp(): void {
     parent::setUp();
 
index 9fe84fbc770f635013117aa3839e3df97d4f51e3..0c4c23eee9a4486d0bf479466a6d6a25986f676c 100644 (file)
@@ -36,6 +36,11 @@ class CiviMailUtils extends PHPUnit\Framework\TestCase {
    */
   protected $_outBound_option = NULL;
 
+  /**
+   * @var CiviUnitTestCase
+   */
+  protected $_ut;
+
   /**
    * Constructor.
    *
index d0e23e79f267097bae8e418c4883034985e3636b..9d7d80ee9f7762b128d44f5a6ee601374337f4f7 100644 (file)
@@ -16,6 +16,7 @@ class CiviTestSMSProvider extends CRM_SMS_Provider {
   protected $sentMessage;
   protected $_id = 0;
   static private $_singleton = [];
+  protected $provider;
 
   public function __construct($provider, $skipAuth = TRUE) {
     $this->provider = $provider;