From Elastica\Aggregation\Histogram which DateHistogram extends
/**
* @param string $name the name of this aggregation
* @param string $field the name of the field on which to perform the aggregation
* @param int $interval the interval by which documents will be bucketed
*/
public function __construct($name, $field, $interval)
{
parent::__construct($name);
$this->setField($field);
$this->setInterval($interval);
}
@param for $interval should be string for DateHistogram, not int.
From Elastica\Aggregation\Histogram which DateHistogram extends
@param for $interval should be string for DateHistogram, not int.
Suggestion: Change to
@param int|string $interval