Skip to content

Commit 87f9f2f

Browse files
committed
Remove support for Laravel 5.1/5.2/5.3
Return a dummyt paginator if the search seems to be for count only. Speed up Travis builds by pre-generating the lockfiles for the matrix.
1 parent 75ad858 commit 87f9f2f

23 files changed

+68472
-48
lines changed

Diff for: .travis.yml

+33-29
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,51 @@ php:
66

77
sudo: false
88

9+
git:
10+
depth: 3
11+
912
env:
10-
- ILLUMINATE_VERSION=^5.1 TESTBENCH_VERSION=^3.1 ELASTICSEARCH_VERSION=^2
11-
- ILLUMINATE_VERSION=^5.2 TESTBENCH_VERSION=^3.2 ELASTICSEARCH_VERSION=^2
12-
- ILLUMINATE_VERSION=^5.3 TESTBENCH_VERSION=^3.3 ELASTICSEARCH_VERSION=^2
13-
- ILLUMINATE_VERSION=^5.4 TESTBENCH_VERSION=^3.4 ELASTICSEARCH_VERSION=^2
14-
- ILLUMINATE_VERSION=^5.5 TESTBENCH_VERSION=^3.5 ELASTICSEARCH_VERSION=^2
15-
- ILLUMINATE_VERSION=^5.6 TESTBENCH_VERSION=^3.6 ELASTICSEARCH_VERSION=^2
16-
- ILLUMINATE_VERSION=^5.1 TESTBENCH_VERSION=^3.1 ELASTICSEARCH_VERSION=^5
17-
- ILLUMINATE_VERSION=^5.2 TESTBENCH_VERSION=^3.2 ELASTICSEARCH_VERSION=^5
18-
- ILLUMINATE_VERSION=^5.3 TESTBENCH_VERSION=^3.3 ELASTICSEARCH_VERSION=^5
19-
- ILLUMINATE_VERSION=^5.4 TESTBENCH_VERSION=^3.4 ELASTICSEARCH_VERSION=^5
20-
- ILLUMINATE_VERSION=^5.5 TESTBENCH_VERSION=^3.5 ELASTICSEARCH_VERSION=^5
21-
- ILLUMINATE_VERSION=^5.6 TESTBENCH_VERSION=^3.6 ELASTICSEARCH_VERSION=^5
22-
- ILLUMINATE_VERSION=^5.1 TESTBENCH_VERSION=^3.1 ELASTICSEARCH_VERSION=^6
23-
- ILLUMINATE_VERSION=^5.2 TESTBENCH_VERSION=^3.2 ELASTICSEARCH_VERSION=^6
24-
- ILLUMINATE_VERSION=^5.3 TESTBENCH_VERSION=^3.3 ELASTICSEARCH_VERSION=^6
25-
- ILLUMINATE_VERSION=^5.4 TESTBENCH_VERSION=^3.4 ELASTICSEARCH_VERSION=^6
26-
- ILLUMINATE_VERSION=^5.5 TESTBENCH_VERSION=^3.5 ELASTICSEARCH_VERSION=^6
27-
- ILLUMINATE_VERSION=^5.6 TESTBENCH_VERSION=^3.6 ELASTICSEARCH_VERSION=^6
13+
- ILLUMINATE_SUBVERSION=4 ELASTICSEARCH_VERSION=2
14+
- ILLUMINATE_SUBVERSION=5 ELASTICSEARCH_VERSION=2
15+
- ILLUMINATE_SUBVERSION=6 ELASTICSEARCH_VERSION=2
16+
- ILLUMINATE_SUBVERSION=7 ELASTICSEARCH_VERSION=2
17+
- ILLUMINATE_SUBVERSION=4 ELASTICSEARCH_VERSION=5
18+
- ILLUMINATE_SUBVERSION=5 ELASTICSEARCH_VERSION=5
19+
- ILLUMINATE_SUBVERSION=6 ELASTICSEARCH_VERSION=5
20+
- ILLUMINATE_SUBVERSION=7 ELASTICSEARCH_VERSION=5
21+
- ILLUMINATE_SUBVERSION=4 ELASTICSEARCH_VERSION=6
22+
- ILLUMINATE_SUBVERSION=5 ELASTICSEARCH_VERSION=6
23+
- ILLUMINATE_SUBVERSION=6 ELASTICSEARCH_VERSION=6
24+
- ILLUMINATE_SUBVERSION=7 ELASTICSEARCH_VERSION=6
2825

2926
matrix:
3027
exclude:
3128
- php: 7.0
32-
env: ILLUMINATE_VERSION=^5.6 TESTBENCH_VERSION=^3.6 ELASTICSEARCH_VERSION=^2
29+
env: ILLUMINATE_SUBVERSION=6 ELASTICSEARCH_VERSION=2
30+
- php: 7.0
31+
env: ILLUMINATE_SUBVERSION=6 ELASTICSEARCH_VERSION=5
32+
- php: 7.0
33+
env: ILLUMINATE_SUBVERSION=6 ELASTICSEARCH_VERSION=6
3334
- php: 7.0
34-
env: ILLUMINATE_VERSION=^5.6 TESTBENCH_VERSION=^3.6 ELASTICSEARCH_VERSION=^5
35+
env: ILLUMINATE_SUBVERSION=7 ELASTICSEARCH_VERSION=2
3536
- php: 7.0
36-
env: ILLUMINATE_VERSION=^5.6 TESTBENCH_VERSION=^3.6 ELASTICSEARCH_VERSION=^6
37+
env: ILLUMINATE_SUBVERSION=7 ELASTICSEARCH_VERSION=5
38+
- php: 7.0
39+
env: ILLUMINATE_SUBVERSION=7 ELASTICSEARCH_VERSION=6
40+
fast_finish: true
3741

38-
install:
42+
before_install:
3943
- phpenv config-rm xdebug.ini
44+
- composer config -g github-oauth.github.com "${GITHUB_TOKEN}"
4045
- travis_retry composer global require hirak/prestissimo
41-
- travis_retry composer require elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION} illuminate/support:${ILLUMINATE_VERSION}
42-
- travis_retry composer require --dev orchestra/testbench:${TESTBENCH_VERSION}
4346

44-
script: composer run coverage
47+
install:
48+
- cp "lockfiles/php-${TRAVIS_PHP_VERSION}-laravel-5.${ILLUMINATE_SUBVERSION}-es-${ELASTICSEARCH_VERSION}.lock" composer.lock
49+
- composer update --lock
4550

46-
after_script:
47-
- vendor/bin/test-reporter
51+
script: composer run test
4852

4953
cache:
5054
directories:
51-
- vendor
52-
- "$HOME/.composer/cache"
55+
- "$HOME/.composer/cache/files"
56+
- "$HOME/.cache/composer/files"

Diff for: README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
Laravel-oriented implementation of [elasticsearch-model](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model).
44

5+
Supports Laravel 5.4 and higher on PHP 7.0/7.1. PHP 7.2 will be supported and tested once Travis directly supports it.
6+
7+
Note that at least PHP 7.1 is required for Laravel 5.6+.
8+
59
[![Build Status](https://travis-ci.org/datashaman/elasticsearch-model.svg?branch=master)](https://travis-ci.org/datashaman/elasticsearch-model)
610
[![StyleCI](https://styleci.io/repos/61363628/shield?style=flat)](https://styleci.io/repos/61363628)
7-
[![Code Climate](https://codeclimate.com/github/datashaman/elasticsearch-model/badges/gpa.svg)](https://codeclimate.com/github/datashaman/elasticsearch-model)
8-
[![Test Coverage](https://codeclimate.com/github/datashaman/elasticsearch-model/badges/coverage.svg)](https://codeclimate.com/github/datashaman/elasticsearch-model/coverage)
911

1012
*NB* This is currently *BETA* quality software. Use on production at your own risk, and be aware that there might some
1113
further simplifications of the API in the next version or two.

Diff for: composer.json

+7-10
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^7.0 || ^7.1 || ^7.2",
21-
"elasticsearch/elasticsearch": "^2.0 || ^5.0 || ^6.0",
22-
"illuminate/support": "^5.1 || ^5.2 || ^5.3 || ^5.4 || ^5.5 || ^5.6"
20+
"php": ">=7.0",
21+
"elasticsearch/elasticsearch": ">=2",
22+
"illuminate/support": ">=5.1"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "^4.8 || ^5.4 || ^6.0 || ^7.0",
26-
"mockery/mockery": "dev-master",
27-
"codeclimate/php-test-reporter": "dev-master",
28-
"orchestra/testbench": "^3.1 || ^3.2 || ^3.3 || ^3.4 || ^3.5 || ^3.6",
25+
"mockery/mockery": "*",
26+
"orchestra/testbench": ">=3.1",
27+
"phpunit/phpunit": "*",
28+
"symfony/yaml": "*",
2929
"ext-sqlite3": "*"
3030
},
3131
"suggest": {
3232
"symfony/yaml": "To load settings from a YAML file"
3333
},
3434
"autoload": {
3535
"psr-4": {
36-
"App\\": "app/",
3736
"Datashaman\\Elasticsearch\\Model\\": "src"
3837
}
3938
},
@@ -45,8 +44,6 @@
4544
"scripts": {
4645
"test": "vendor/bin/phpunit",
4746
"test-wip": "vendor/bin/phpunit --group wip",
48-
"coverage": "php -dzend_extension=xdebug.so `which phpunit` --coverage-clover build/logs/clover.xml",
49-
"send-coverage": "bash -c 'source .env && vendor/bin/test-reporter'",
5047
"watch-test": "bash watch-test.sh",
5148
"docs": "phpdoc -d ./src -t ./docs/api"
5249
},

0 commit comments

Comments
 (0)