Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for elasticsearch 7 #433

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ jobs:
docker:
- image: circleci/php:7.1-node-browsers
environment:
- ES_VERSION=6.5.4
- ARTICLE_TEST_CASE=extend
- image: circleci/mysql:5.7
environment:
- MYSQL_USER=root
- MYSQL_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=circle_test
- image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
environment:
- cluster.name: es-test-cluster
- xpack.security.enabled: false
- transport.host: localhost
- network.host: 127.0.0.1
- http.port: 9200
- discovery.type: single-node
steps:
- checkout
- run:
Expand All @@ -21,28 +28,17 @@ jobs:
sudo apt-get install -y libpng-dev
sudo docker-php-ext-install pdo_mysql gd
parallel: true
- run:
name: Install Elasticsearch
command: |
curl -L -o elasticsearch.zip https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.zip
unzip elasticsearch.zip
parallel: true
- run: sudo composer self-update
- run: sudo composer self-update --snapshot
- restore_cache:
keys:
- composer-v2-{{ checksum "composer.json" }}
- composer-v2-
- run: php -d memory_limit=-1 /usr/local/bin/composer install -n --prefer-dist
- run: php -d memory_limit=2G /usr/local/bin/composer install -n --prefer-dist
- save_cache:
key: composer-v2-{{ checksum "composer.json" }}
paths:
- vendor
- ~/.composer/cache
- run:
name: Run Elasticsearch
command: |
ES_JAVA_OPTS="-Xms512m -Xmx1024m" ./elasticsearch-${ES_VERSION}/bin/elasticsearch
background: true
- run:
name: Test Elasticsearch
command: |
Expand Down
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ env:
global:
- JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre"
- JACKRABBIT_VERSION=2.12.0
- SYMFONY__PHPCR__TRANSPORT=doctrinedbal
- SYMFONY__DATABASE__VERSION=5.5.39
- ES_VERSION="6.5.4"
- ES_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.zip"

cache:
directories:
Expand All @@ -23,12 +20,13 @@ matrix:
- php: 5.6
env:
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction -vvv"
- ES_VERSION="5.6.14"
- ES_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.zip"
- ES_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.14.tar.gz"
- SYMFONY__PHPCR__TRANSPORT=doctrinedbal
- ENABLE_SWAP=true
- php: 7.3
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
- ES_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.2-linux-x86_64.tar.gz"
- SYMFONY__PHPCR__TRANSPORT=jackrabbit
- PHPSTAN=true

Expand Down Expand Up @@ -60,7 +58,7 @@ install:
java -jar downloads/jackrabbit-standalone-$JACKRABBIT_VERSION.jar > /dev/null &
fi
- wget ${ES_DOWNLOAD_URL}
- unzip elasticsearch-*.zip
- tar xvzf elasticsearch-*.tar.gz
- cd ./elasticsearch-*
- bin/elasticsearch -d
- cd ..
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Additional features included:
* Composer
* PHP `^5.5 || ^7.0`
* Sulu `^1.6`
* Elasticsearch `^5.0 || ^6.0`
* Elasticsearch `^5.0 || ^6.0 || ^7.0`

For detailed requirements see [composer.json](https://github.com/sulu/SuluArticleBundle/blob/master/composer.json).

Expand Down
5 changes: 3 additions & 2 deletions Resources/doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

### ElasticSearch

The SuluArticleBundle requires a running elasticsearch `^5.0` or `^6.0`.
The SuluArticleBundle requires a running elasticsearch `^5.0`, `^6.0` or `^7.0`.

For elasticsearch `^2.0` see the [1.0.x](https://github.com/sulu/SuluArticleBundle/tree/release/1.0) version of the bundle.

## Install the bundle
## Install dependencies

```bash
composer require elasticsearch/elasticsearch:^7.0 # use matching elasticsearch version
composer require sulu/article-bundle
```

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"php": "^5.6 || ^7.0",
"sulu/sulu": "^1.6.8",
"handcraftedinthealps/elasticsearch-bundle": "^5.2.6.2",
"handcraftedinthealps/elasticsearch-dsl": "^5.0.7.1 || ^6.2.0.1",
"handcraftedinthealps/elasticsearch-dsl": "^5.0.7.1 || ^6.2.0.1 || ^7.2.0.1",
"jackalope/jackalope": "^1.2.8 || >=1.3.3",
"jms/serializer-bundle": "^1.1 || ^2.0"
},
"require-dev": {
"elasticsearch/elasticsearch": "^5.0 || ^6.0 || ^7.0",
"massive/build-bundle": "~0.3.0",
"zendframework/zend-stdlib": "~2.3",
"zendframework/zendsearch": "@dev",
"handcraftedinthealps/zendsearch": "^2.0",
"symfony/monolog-bundle": "^2.8.7 || ^3.0",
"jackalope/jackalope-doctrine-dbal": "^1.2.5",
"jackalope/jackalope-jackrabbit": "^1.2",
Expand Down