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

Support ElasticSearch 5.0 added #151

Merged
merged 30 commits into from
Apr 24, 2017
Merged

Support ElasticSearch 5.0 added #151

merged 30 commits into from
Apr 24, 2017

Conversation

kleinkoerkamp
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Fixed tickets fixes #149
License MIT

What's in this PR?

ArticleBundle now also ElasticSearch 5.0 compatible

BC Breaks

  • Not compatible with PHP 5.5 anymore if you make use of 5.0 bundle

To Do

  • Documentation for ONGR/ElasticsearchBundle is different now. Config has changed. I only changed it to the new configuration. Don't if you can see this as Break.

@wachterjohannes
Copy link
Member

we should also include that into the test suite:

  • one test run for elasticsearch 2.4
  • one test run for elasticsearch 5.1

@@ -38,6 +38,11 @@ public function registerContainerConfiguration(LoaderInterface $loader)
$loader->load(__DIR__ . '/config/versioning.yml');
}

$loader->load(__DIR__ . '/config/config.yml');
// If version is lower then 5.6 it is an testcase for elasticsearch 2.*, so different ONGR config is needed
if (phpversion() < 5.6) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be handled via a envorinment variable in travis.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wachterjohannes you're right i will fix this

@wachterjohannes
Copy link
Member

in travis the default elasticsearch version is 1.7 so we have to handle the versions there manually. see https://github.com/wachterjohannes/pucene/blob/b68a2afdb7e95c6bb410b0cb576ae46b29e85319/.travis.yml

@kleinkoerkamp
Copy link
Contributor Author

@wachterjohannes hi Johannes, i changed the code for travis, but still get some unknown problems, can you have a look into it? My knowledge of Travis is still a little bit low.


echo $ES_VERSION;

if [[ "${ES_VERSION}" = "2.4.4" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would always use the same installation method (download) this makes the installation script easier to read.

.travis.yml Outdated
apt:
packages:
- oracle-java8-set-default

matrix:
include:
- php: 5.5
env:
- SULU_VERSION="~1.5.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you change this to ~1.5.3 it may work.

@kleinkoerkamp kleinkoerkamp changed the title Feature/elasticsearch 50 Support ElasticSearch 5.0 added Apr 21, 2017
.travis.yml Outdated
@@ -59,5 +70,6 @@ script:
- ./vendor/bin/phpunit $CODE_COVERAGE

after_script:
- cat elasticsearch.log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where have you specified that this file will be written?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not used anymore

@@ -0,0 +1,58 @@
# Installation

If you w
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is missing the half sentence (:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not needed anymore.

@@ -38,6 +38,10 @@ public function registerContainerConfiguration(LoaderInterface $loader)
$loader->load(__DIR__ . '/config/versioning.yml');
}

$loader->load(__DIR__ . '/config/config.yml');
if (getenv('ES_VERSION') == '2.4.4') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change that by using http://php.net/manual/de/function.version-compare.php ? it should match >=2.2 and <5.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed,

UPGRADE.md Outdated

## 0.5.0

Now also support for ElasticSearch 5. To still be compatible with ^2.2, make sure you run:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move that to dev-develop. i will change that when i release the bundle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it

@wachterjohannes wachterjohannes merged commit 6c5bdac into sulu:develop Apr 24, 2017
@wachterjohannes
Copy link
Member

@kleinkoerkamp thanks for contribution (:

@kleinkoerkamp kleinkoerkamp deleted the feature/elasticsearch-50 branch April 24, 2017 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ElasticSearch 5.0
2 participants