Problem/Motivation

#2960136: Add the ability to use a prefix for all the tables in a table mapping was only committed to 8.7.x and TemporaryTableMapping deprecation message points to 8.6.x

Proposed resolution

Fix the deprecation error message

Remaining tasks

Review patch

User interface changes

Non

API changes

Non

Data model changes

Non

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pasan.gamage created an issue. See original summary.

pasan.gamage’s picture

Issue summary: View changes
pasan.gamage’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.59 KB

larowlan credited jibran.

larowlan’s picture

Crediting jibran who provided mentoring here

Status: Needs review » Needs work

The last submitted patch, 3: 2991001-deprecation-message-1.patch, failed testing. View results

jibran’s picture

Can you please make sure you are using 8.7.x branch as a base.

+++ b/core/lib/Drupal/Core/Entity/Sql/TemporaryTableMapping.php
@@ -4,8 +4,13 @@
+@trigger_error(__NAMESPACE__ . '\TemporaryTableMapping is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Use the default table mapping with a prefix instead.', E_USER_DEPRECATED);
...
+ * @deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Use the
+ * default table mapping with a prefix instead.

+++ b/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php
@@ -445,6 +446,142 @@ public function testGetFieldTableNameInvalid() {
+   * @expectedDeprecation Drupal\Core\Entity\Sql\TemporaryTableMapping is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Use the default table mapping with a prefix instead.

You have to replace it in three places. @expectedDeprecation message shouldn't be wrapped.

pasan.gamage’s picture

Status: Needs work » Needs review
FileSize
1.86 KB

Removed wrapping.
Attaching new patchfile

pasan.gamage’s picture

Please ignore patch file on comment #8
Attaching new patch file

The last submitted patch, 8: 2991001-deprecation-message-2.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 9: 2991001-deprecation-message-3.patch, failed testing. View results

jibran’s picture

+++ b/core/lib/Drupal/Core/Entity/Sql/TemporaryTableMapping.php
@@ -4,13 +4,12 @@
+ * @deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Use the default table mapping with a prefix instead.

This should be wrapped and you have to change the @expectedDeprecation on testTemporaryTableMapping not on testGetFieldTableNameInvalid

pasan.gamage’s picture

Status: Needs work » Needs review
FileSize
2.02 KB
jibran’s picture

Category: Task » Bug report
Status: Needs review » Reviewed & tested by the community

Looks good now. Thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed b043354 and pushed to 8.7.x. Thanks!

diff --git a/core/lib/Drupal/Core/Entity/Sql/TemporaryTableMapping.php b/core/lib/Drupal/Core/Entity/Sql/TemporaryTableMapping.php
index e12c186ca4..abcb017f16 100644
--- a/core/lib/Drupal/Core/Entity/Sql/TemporaryTableMapping.php
+++ b/core/lib/Drupal/Core/Entity/Sql/TemporaryTableMapping.php
@@ -10,7 +10,7 @@
  * Defines a temporary table mapping class.
  *
  * @deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Use the
- * default table mapping with a prefix instead.
+ *   default table mapping with a prefix instead.
  */
 class TemporaryTableMapping extends DefaultTableMapping {
 

Fixed the indentation in the comment on commit too.

  • alexpott committed b043354 on 8.7.x
    Issue #2991001 by pasan.gamage, jibran: Fix TemporaryTableMapping...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.