Skip to content

Commit

Permalink
Merge pull request #39 from candasm/elasticsearch_5.x_updates
Browse files Browse the repository at this point in the history
Changes for elastic search 5.x.
  • Loading branch information
candasm committed Feb 27, 2017
2 parents 05fdcee + 6f867ef commit 453b87e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0

addons:
apt:
sources:
- elasticsearch-2.4
- elasticsearch-5.0
packages:
- elasticsearch

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Laravel Elasticsearch Service Provider (4.2.0)
Laravel Elasticsearch Service Provider (4.5.0)
================================================
[![Latest Stable Version](https://poser.pugx.org/shift31/laravel-elasticsearch/v/stable)](https://packagist.org/packages/shift31/laravel-elasticsearch)
[![Total Downloads](https://poser.pugx.org/shift31/laravel-elasticsearch/downloads)](https://packagist.org/packages/shift31/laravel-elasticsearch)
[![Build Status](https://travis-ci.org/shift31/laravel-elasticsearch.svg?branch=4.2)](https://travis-ci.org/shift31/laravel-elasticsearch)
[![Coverage Status](https://coveralls.io/repos/github/shift31/laravel-elasticsearch/badge.svg?branch=4.2)](https://coveralls.io/github/shift31/laravel-elasticsearch?branch=master)
[![Build Status](https://travis-ci.org/shift31/laravel-elasticsearch.svg?branch=4.5)](https://travis-ci.org/shift31/laravel-elasticsearch)
[![Coverage Status](https://coveralls.io/repos/github/shift31/laravel-elasticsearch/badge.svg?branch=4.5)](https://coveralls.io/github/shift31/laravel-elasticsearch?branch=master)
[![License](https://poser.pugx.org/shift31/laravel-elasticsearch/license)](https://packagist.org/packages/shift31/laravel-elasticsearch)

This is a Laravel (4.2) Service Provider for the [official Elasticsearch low-level client](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/index.html):
This is a Laravel (4.2) Service Provider for the [official Elasticsearch low-level client](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/5.0/index.html).

Version Matrix
------------------
Expand All @@ -30,7 +30,7 @@ Attention: Until we launch new versions please keep using old stable versions (w

Usage
-----
1. Run `composer require shift31/laravel-elasticsearch:~4.2.0`
1. Run `composer require shift31/laravel-elasticsearch:~4.5.0`

2. Publish config file

Expand All @@ -42,7 +42,7 @@ You can always read config parameters with:
```php
\Config::get('shift31::elasticsearch');
```
Note: The keys of this array should be named according the parameters supported by [Elasticsearch\Client](https://github.com/elastic/elasticsearch-php/blob/0.4/src/Elasticsearch/Client.php).
Note: The keys of this array should be named according the parameters supported by [Elasticsearch\ClientBuilder](https://github.com/elastic/elasticsearch-php/blob/5.0/src/Elasticsearch/ClientBuilder.php#L119).

3. In the `'providers'` array in app/config/app.php, add `'Shift31\LaravelElasticsearch\ElasticsearchServiceProvider'`.

Expand All @@ -56,8 +56,8 @@ $result = Es::search($searchParams);

Default Configuration
---------------------
If you return an empty array in the config file, Service provider [merges default config with custom config variables](https://github.com/shift31/laravel-elasticsearch/blob/master/src/Shift31/LaravelElasticsearch/ElasticsearchServiceProvider.php#L27).
For custom config file question please see [this](https://www.elastic.co/guide/en/elasticsearch/client/php-api/2.0/_configuration.html#_building_the_client_from_a_configuration_hash) elastic search configuration page.
If you return an empty array in the config file, Service provider [merges default config with custom config variables](src/Shift31/LaravelElasticsearch/ElasticsearchServiceProvider.php).
For custom config file question please see [this](https://www.elastic.co/guide/en/elasticsearch/client/php-api/5.0/_configuration.html#_building_the_client_from_a_configuration_hash) elastic search configuration page.

[Default config file](src/config/elasticsearch.php) which is publishing by artisan command.

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
}
],
"require": {
"php": ">=5.4.0 <=7.0.0",
"php": ">=5.6 <=7.1",
"laravel/framework": "~4.2.0",
"elasticsearch/elasticsearch": "~2.0"
"elasticsearch/elasticsearch": "~5.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.8",
"phpunit/phpunit": "^4.8",
"phpunit/phpunit": "^5.7",
"mockery/mockery": "^0.9.8",
"satooshi/php-coveralls": "^1.0",
"orchestra/testbench": "^2.2",
Expand All @@ -32,7 +32,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "4.2.x-dev"
"dev-master": "4.5.x-dev"
}
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</testsuite>
</testsuites>
<filter>
<blacklist>
<directory>./vendor/*</directory>
</blacklist>
<whitelist>
<directory suffix=".php">./src/Shift31/LaravelElasticsearch</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class ElasticsearchServiceProvider extends ServiceProvider
{
const VERSION = '4.2.0';
const VERSION = '4.5.0';

/**
* @inheritdoc
Expand Down

0 comments on commit 453b87e

Please sign in to comment.