summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Hojtsy2017-11-03 13:13:19 +0100
committerGabor Hojtsy2017-11-03 13:13:19 +0100
commit4e83abc5e4bc2018a4e27a7388fe8eca6c9b5801 (patch)
treef47cd1299fddca349097782c868e7cac364fa19a
parent7f1579251694c7631df13347af612813529bcc8c (diff)
Issue #2911306 by alexpott, roynilanjan, mondrake, quicksketch, quietone: Migration module breaks with PHP 7.2 due to inherited method signature differences
-rw-r--r--core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php2
-rw-r--r--core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php2
-rw-r--r--core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php2
-rw-r--r--core/modules/migrate/src/Plugin/migrate/source/DummyQueryTrait.php2
-rw-r--r--core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php5
-rw-r--r--core/modules/migrate/src/Plugin/migrate/source/SqlBase.php2
-rw-r--r--core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php2
-rw-r--r--core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php2
-rw-r--r--core/modules/node/src/Plugin/migrate/source/d6/ViewModeBase.php2
9 files changed, 12 insertions, 9 deletions
diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php
index 4417e91..7b92da9 100644
--- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php
+++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php
@@ -30,7 +30,7 @@ class CommentVariable extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return count($this->getCommentVariables());
}
diff --git a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php
index a54b17d..452c6bb 100644
--- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php
+++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php
@@ -145,7 +145,7 @@ class FieldInstance extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return $this->initializeIterator()->count();
}
diff --git a/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php b/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php
index 17c34bf..f4182a9 100644
--- a/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php
+++ b/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php
@@ -78,7 +78,7 @@ class UploadInstance extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return count($this->initializeIterator());
}
diff --git a/core/modules/migrate/src/Plugin/migrate/source/DummyQueryTrait.php b/core/modules/migrate/src/Plugin/migrate/source/DummyQueryTrait.php
index b77f95e..efe56b4 100644
--- a/core/modules/migrate/src/Plugin/migrate/source/DummyQueryTrait.php
+++ b/core/modules/migrate/src/Plugin/migrate/source/DummyQueryTrait.php
@@ -27,7 +27,7 @@ trait DummyQueryTrait {
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return 1;
}
diff --git a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php
index 429a145..94e5c22 100644
--- a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php
@@ -436,7 +436,10 @@ abstract class SourcePluginBase extends PluginBase implements MigrateSourceInter
* Returns -1 if the source is not countable.
*
* @param bool $refresh
- * (optional) Whether or not to refresh the count. Defaults to FALSE.
+ * (optional) Whether or not to refresh the count. Defaults to FALSE. Not
+ * all implementations support the reset flag. In such instances this
+ * parameter is ignored and the result of calling the method will always be
+ * up to date.
*
* @return int
* The count.
diff --git a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
index 881e2fb..35ab8ab 100644
--- a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
@@ -365,7 +365,7 @@ abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPlugi
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return $this->query()->countQuery()->execute()->fetchField();
}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
index 410acec..e127dfb 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
@@ -58,7 +58,7 @@ class Variable extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return intval($this->query()->countQuery()->execute()->fetchField() > 0);
}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php
index 566a840..f2ca8b7 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php
@@ -68,7 +68,7 @@ class VariableTranslation extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return $this->initializeIterator()->count();
}
diff --git a/core/modules/node/src/Plugin/migrate/source/d6/ViewModeBase.php b/core/modules/node/src/Plugin/migrate/source/d6/ViewModeBase.php
index 315f069..88d84d9 100644
--- a/core/modules/node/src/Plugin/migrate/source/d6/ViewModeBase.php
+++ b/core/modules/node/src/Plugin/migrate/source/d6/ViewModeBase.php
@@ -12,7 +12,7 @@ abstract class ViewModeBase extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
- public function count() {
+ public function count($refresh = FALSE) {
return count($this->initializeIterator());
}