for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\ElasticsearchDSL\Aggregation;
use ONGR\ElasticsearchDSL\BuilderInterface;
use ONGR\ElasticsearchDSL\Aggregation\Bucketing\FiltersAggregation as Base;
/**
* Class representing filters aggregation.
* @deprecated Aggregations was moved to it's type namespace. Add `Metric` or `Bucketing` after `Aggregation`.
* This class will be removed in 3.0.
class FiltersAggregation extends Base
{
public function __construct($name, BuilderInterface $filter)
parent::__construct($name, $filter);
$filter
object<ONGR\ElasticsearchDSL\BuilderInterface>
array<integer,object<ONG...hDSL\BuilderInterface>>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
trigger_error(
'This aggregation is moved to `Bucketing` namespace. Use the new namespace instead.' .
' It will be removed in 3.0',
E_USER_DEPRECATED
);
}
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: