- Issue created by @nils.destoop
- Status changed to Needs review
18 days ago 12:43pm 7 June 2024 - π§πͺBelgium nils.destoop
Updated the logic to correctly return an integer.
- Merge request !8330#3453210: Correctly return an integer for getCreatedTime β (Open) created by nils.destoop
- π§πͺBelgium nils.destoop
nils.destoop β changed the visibility of the branch 3453210-getcreatedtime-returns-string to hidden.
- Status changed to Needs work
18 days ago 1:41pm 7 June 2024 - πΊπΈUnited States smustgrave
Think maybe the docs should be updated? You can see the change causes test failures so there is backwards compatibility concerns with making this change.
- Status changed to Needs review
13 days ago 1:27pm 12 June 2024 - π§πͺBelgium nils.destoop
The docs that need to be updated is the quick fix, but imo a dirty fix. It makes no sense to return an int for getChangedTime and a string for getCreatedTime.
I agree that there could. be backwards compatibility issues, but a simple release note can warn users for this.The failing test that I just fixed also shows how illogical it is:
before:
$this->assertSame('1421727536', $comment->getCreatedTime()); $this->assertSame(1421727536, $comment->getChangedTime());
after:
$this->assertSame(1421727536, $comment->getCreatedTime()); $this->assertSame(1421727536, $comment->getChangedTime());
- πΊπΈUnited States smustgrave
Right but about the BC concern this could immediately start breaking someone's code with no warning.
- Status changed to Needs work
12 days ago 3:43pm 13 June 2024 - πΊπΈUnited States smustgrave
Discussed in slack with @catch, for reference https://drupal.slack.com/archives/C04CHUX484T/p1718289507191399
Created a CR just in case.
But does have a legit failure.
- πΊπΈUnited States cmlara
Setting parent issue to π± [META] Stronger Typing for Entity API Active .