By smustgrave on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
11.x
Issue links:
Description:
The following methods now correctly return an integer instead of a string, matching the previously existing return type hints documented by their interfaces:
Drupal\Core\Entity\RevisionLogEntityTrait::getRevisionCreationTime()Drupal\comment\Entity\Comment::getCreatedTime()Drupal\content_translation\ContentTranslationMetadataWrapper::getCreatedTime()Drupal\media\Entity\Media::getCreatedTime()Drupal\node\Entity\Node.php::getCreatedTime()Drupal\user\Entity\User::getCreatedTime()Drupal\workspaces\Entity\Workspace::getCreatedTime()
Before:
public function getCreatedTime() {
if (isset($this->get('created')->value)) {
return $this->get('created')->value;
}
return NULL;
}
After:
public function getCreatedTime() {
$value = $this->get('created')->value;
return isset($value) ? (int) $value : NULL;
}
Impacts:
Module developers