Skip to content

Commit 63f8e6d

Browse files
committed
Fix composer.json, check if Amazon SDK installed
1 parent 7a7ecf8 commit 63f8e6d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

composer.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121
"illuminate/database": "~4.2|^5",
2222
"illuminate/config": "~4.2|^5",
2323
"nesbot/carbon": "~1.0",
24-
"elasticsearch/elasticsearch": ">1.0 <2.2",
25-
"aws/aws-sdk-php": "^3.18"
24+
"elasticsearch/elasticsearch": ">1.0 <2.2"
2625
},
2726
"require-dev": {
2827
"phpunit/phpunit": "~4.2|~5.0",
2928
"mockery/mockery": "^0.9.4"
3029
},
30+
"suggest": {
31+
"aws/aws-sdk-php": "^3.18"
32+
},
3133
"autoload": {
3234
"psr-4": {
3335
"Elasticquent\\": "src/"

src/ElasticSearchClientFactory.php

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function getClient()
5454
*/
5555
private function getAwsESHandler()
5656
{
57+
if (!class_exists('\Aws\default_http_handler')) {
58+
return false;
59+
}
60+
5761
$awsConfig = $this->getElasticConfig('aws');
5862
if (empty($awsConfig)) {
5963
return false;

0 commit comments

Comments
 (0)