ServiceCollection with IlluminateCollection bug
tamaspanczel opened this issue · 2 comments
tamaspanczel commented
IlluminateCollection functions like 'filter' not working on ServiceCollection class:
example:
$services = $client->services()->find()->filter(function($item) {
return $item->toArray()['spec']['type'] === 'NodePort';
});
in Collection.php:
return new static(...);
in ServiceCollection.php (no items
property):
public function __construct(array $data)
{
parent::__construct($this->getServices(isset($data['items']) ? $data['items'] : []));
maclof commented
I'll take a look at this and get back to you.
maclof commented
This is fixed in master