ConfigEntityInterface::setOriginalID() should return $this, just like any other setter.

Files: 
CommentFileSizeAuthor
#8 interdiff.txt1.15 KBXano
#8 drupal_2088241_8.patch7.68 KBXano
PASSED: [[SimpleTest]]: [MySQL] 58,814 pass(es).
[ View ]
#7 drupal_2088241_6.patch7.71 KBXano
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]
#7 interdiff.txt729 bytesXano
#3 drupal_2088241_3.patch6.81 KBXano
FAILED: [[SimpleTest]]: [MySQL] 58,725 pass(es), 13 fail(s), and 7 exception(s).
[ View ]
#3 interdiff.txt6.27 KBXano
#1 drupal_2088241_1.patch999 bytesXano
PASSED: [[SimpleTest]]: [MySQL] 59,298 pass(es).
[ View ]

Comments

Assigned:Xano» Unassigned
Status:Active» Needs review
StatusFileSize
new999 bytes
PASSED: [[SimpleTest]]: [MySQL] 59,298 pass(es).
[ View ]

Also, should the method name not be setOriginalId()?

Issue tags:+Needs tests

I also agree that it should be name setOriginalId

StatusFileSize
new6.27 KB
new6.81 KB
FAILED: [[SimpleTest]]: [MySQL] 58,725 pass(es), 13 fail(s), and 7 exception(s).
[ View ]

Issue tags:-Needs tests

.

Status:Needs review» Needs work

The last submitted patch, drupal_2088241_3.patch, failed testing.

  1. +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
    @@ -28,9 +28,9 @@ public function getOriginalID();
    -   * @return void
    +   * @return \Drupal\Core\Config\Entity\ConfigEntityInterface

    We are using '@return self' in quite some places which gives even more information.

  2. +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php
    @@ -62,12 +78,22 @@ public function testStorageControllerMethods() {
    +    $this->assertTrue($entity->setOriginalId($id) instanceof EntityInterface);

    We could even check that it is the same object using spl_object_hash

Status:Needs work» Needs review
StatusFileSize
new729 bytes
new7.71 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

StatusFileSize
new7.68 KB
PASSED: [[SimpleTest]]: [MySQL] 58,814 pass(es).
[ View ]
new1.15 KB

Status:Needs review» Reviewed & tested by the community

Thank you!

Category:feature» task

Title:ConfigEntityInterface::setOriginalID() should return $thisChange notice: ConfigEntityInterface::setOriginalID() should return $this
Priority:Normal» Major
Status:Reviewed & tested by the community» Active
Issue tags:+Needs change record

Committed and pushed to 8.x. Thanks!

Will need a change notice.

Title:Change notice: ConfigEntityInterface::setOriginalID() should return $thisConfigEntityInterface::setOriginalID() should return $this
Priority:Major» Normal
Status:Active» Fixed
Issue tags:-Needs change record

Change notice is at https://drupal.org/node/2107951.

For some reason the capitalization issue was never fixed or rolled back. See #2113319: Rename getOriginalID() to getOriginalId() and setOriginalID() to setOriginalId().

Status:Fixed» Closed (fixed)

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