Problem/Motivation
There is 2 ways of creating an instance:
- bare bone, with
EntityInterface::create()or with EntityStorageInterface::create(). We use this only in kernel tests as far as I know - so through a DisplayBuildable plugin
Only the creation through a DisplayBuildable initialize a present state, the bare bone is initializing an empty array.
But this array is move around when we manipulate history and Instance::getCountPast() and Instance::getCountFuture() count this empty array.
Proposed resolution
Remove empty arrays from Instance::getCountPast() and Instance::getCountFuture(), and also prevent them to be moved around.
Fix false positives from InstanceHistoryTest
Issue fork display_builder-3577023
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pdureau commentedComment #4
pdureau commentedI may have something to add :)
Comment #5
pdureau commentedComment #7
mogtofu33 commented