Skip to content

Commit

Permalink
Merge pull request #50 from madewithlove/replace-illuminate-support-w…
Browse files Browse the repository at this point in the history
…ith-lightweight-lib

Replace illuminate/support with jdrieghe/array-helpers
  • Loading branch information
dieterve authored Jul 18, 2018
2 parents eb7e8ed + b23287b commit 1d195d7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"elasticsearch/elasticsearch": "^5.1",
"illuminate/support": "^4.2|~5"
"jdrieghe/array-helpers": "^0.2.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
Expand Down
2 changes: 1 addition & 1 deletion src/Abstracts/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace ElasticSearcher\Abstracts;

use ArrayHelpers\Arr;
use ElasticSearcher\ElasticSearcher;
use ElasticSearcher\Parsers\ArrayResultParser;
use ElasticSearcher\Parsers\FragmentParser;
use ElasticSearcher\Traits\BodyTrait;
use Illuminate\Support\Arr;

/**
* Base class for queries.
Expand Down
2 changes: 1 addition & 1 deletion src/Abstracts/AbstractResultParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace ElasticSearcher\Abstracts;

use Illuminate\Support\Arr;
use ArrayHelpers\Arr;

/**
* Base class for result parsing.
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/BodyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace ElasticSearcher\Traits;

use Illuminate\Support\Arr;
use ArrayHelpers\Arr;

/**
* A body can be an entire query or just a chunk of query (fragment).
Expand Down
6 changes: 5 additions & 1 deletion tests/Managers/IndicesManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public function testGetting()
$expectedIndex = ['authors' => ['mappings' => $authorsIndex->getTypes()]];
$this->assertEquals($expectedIndex, $this->indicesManager->get('authors'));

$expectedIndex = ['authors' => ['mappings' => array_only($authorsIndex->getTypes(), 'producers')]];
$expectedIndex = [
'authors' => [
'mappings' => array_intersect_key($authorsIndex->getTypes(), array_flip((array) 'producers')),
],
];
$this->assertEquals($expectedIndex, $this->indicesManager->getType('authors', 'producers'));
}

Expand Down

0 comments on commit 1d195d7

Please sign in to comment.