Imcrease the deprecation on some unused functions
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 1 Sep 2022 23:32:14 +0000 (11:32 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 3 Sep 2022 02:19:39 +0000 (14:19 +1200)
CRM/Import/Parser.php

index 14e3661a1d1d51e1098c846f25f1bc3b2fc818c4..8730a789feb007943e17364f930d48fd7119f70b 100644 (file)
@@ -231,13 +231,6 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    */
   protected $_invalidRowCount;
 
-  /**
-   * Maximum number of non-empty/comment lines to process
-   *
-   * @var int
-   */
-  protected $_maxLinesToProcess;
-
   /**
    * Array of error lines, bounded by MAX_ERROR
    * @var array
@@ -428,20 +421,6 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    */
   protected $_rows;
 
-  /**
-   * Filename of error data
-   *
-   * @var string
-   */
-  protected $_errorFileName;
-
-  /**
-   * Filename of duplicate data
-   *
-   * @var string
-   */
-  protected $_duplicateFileName;
-
   /**
    * Contact type
    *
@@ -476,13 +455,6 @@ abstract class CRM_Import_Parser implements UserJobInterface {
     return $this;
   }
 
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->_maxLinesToProcess = 0;
-  }
-
   /**
    * Add progress bar to the import process. Calculates time remaining, status etc.
    *
@@ -497,9 +469,12 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    * @param $totalRowCount
    *   Total number of rows in the import file.
    *
+   * @deprecated
+   *
    * @return NULL|$currTimestamp
    */
   public function progressImport($statusID, $startImport = TRUE, $startTimestamp = NULL, $prevTimestamp = NULL, $totalRowCount = NULL) {
+    CRM_Core_Error::deprecatedFunctionWarning('no replacement');
     $statusFile = CRM_Core_Config::singleton()->uploadDir . "status_{$statusID}.txt";
 
     if ($startImport) {
@@ -576,6 +551,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    * @return void
    */
   public static function encloseScrub(&$values, $enclosure = "'") {
+    CRM_Core_Error::deprecatedFunctionWarning('no replacement');
     if (empty($values)) {
       return;
     }
@@ -595,6 +571,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    * @return void
    */
   public function setMaxLinesToProcess($max) {
+    CRM_Core_Error::deprecatedFunctionWarning('no replacement');
     $this->_maxLinesToProcess = $max;
   }
 
@@ -746,6 +723,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    * @return string
    */
   public static function errorFileName($type) {
+    CRM_Core_Error::deprecatedFunctionWarning('no replacement');
     $fileName = NULL;
     if (empty($type)) {
       return $fileName;
@@ -1279,6 +1257,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    * @return mixed
    */
   protected function parsePseudoConstantField($submittedValue, $fieldSpec) {
+    CRM_Core_Error::deprecatedFunctionWarning('no replacement');
     // dev/core#1289 Somehow we have wound up here but the BAO has not been specified in the fieldspec so we need to check this but future us problem, for now lets just return the submittedValue
     if (!isset($fieldSpec['bao'])) {
       return $submittedValue;