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

Elasticsearch ^6.0 compatibility #304

Closed
wachterjohannes opened this issue Feb 5, 2018 · 15 comments
Closed

Elasticsearch ^6.0 compatibility #304

wachterjohannes opened this issue Feb 5, 2018 · 15 comments

Comments

@wachterjohannes
Copy link
Member

wachterjohannes commented Feb 5, 2018

Q A
Bug? no
New Feature? no
SuluArticleBundle Version all
Sulu Version ^1.6

Actual Behavior

ongr-io/ElasticsearchBundle does not support PHP ^7.2 (ongr-io/ElasticsearchBundle#832) and elasticsearch ^6.0 (ongr-io/ElasticsearchBundle#828)

Expected Behavior

This should be supported.

Possible Solutions

  • Remove dependency to ongr-io/ElasticsearchBundle (rewrite of indexing - e.g. using raw elasticsearch library)
  • Find a better solution for the performance problems and remove elasticsearch dependency
@mareksuscak
Copy link

What's the current status? I'm a little confused because according to this comment the issue got resolved in ElasticsearchBundle 5.2.0 but despite having installed version 5.2.4 and SuluArticleBundle 1.0.1, I'm still seeing weird autoloading errors.

@wachterjohannes
Copy link
Member Author

@mareksuscak this issue is only resolved partly - the bundle is now ready for 7.2 but not ES 6.0

@mareksuscak
Copy link

Which version is ready for PHP 7.2 though? The latest one (i.e. 1.0.1)? Or the development version that's not been released yet? 1.0.1 didn't work w/ PHP 7.2 and Elasticsearch server 5.x.

@wachterjohannes
Copy link
Member Author

all versions ^1.0 should be ready for php 7.2 and ES ^5.0 - what is you exact problem? do you have any error message?

@mareksuscak
Copy link

There was a problem w/ the autoloader. Specifically, it was looking for Object class in this file and said the file was there but the class was not found.

@YetiCGN
Copy link
Contributor

YetiCGN commented Feb 4, 2019

@mareksuscak I think you need to use the new annotation @ObjectType instead of @Object in your own code.

@mareksuscak
Copy link

mareksuscak commented Feb 4, 2019

We don't use that annotation in our own code. Just tried it again w/ the same result. However, upon manually removing the contents of the cache folder, it started working. I'm pretty sure I ran cache:clear command before.

Anyway, it now works.

@alexander-schranz
Copy link
Member

@mareksuscak when working with sulu you should keep in mind there are 2 Kernels (Admin and Website) which has there own caches to clear them use:

bin/adminconsole cache:clear       
bin/websiteconsole cache:clear

# make also sure you provide the correct environment to each ocmmand using e.g.: --env prod

or the evil way:

rm -rf var/cache/*

@YetiCGN
Copy link
Contributor

YetiCGN commented Feb 4, 2019

I don't think that's evil at all, I always do it the rm -rf way. Much faster and more thorough. 😉

@mareksuscak
Copy link

@alexander-schranz I am aware of that. That's the thing. I always clear both. And it should not even be necessary in dev env, no?

@alexander-schranz alexander-schranz changed the title Conflicts: PHP ^7.2 and Elasticsearch ^6.0 Elasticsearch ^6.0 compatibility Feb 5, 2019
@alexander-schranz alexander-schranz pinned this issue Feb 5, 2019
@alexander-schranz
Copy link
Member

@mareksuscak there are only a few things which don't need cache clear on dev but there are also many things e.g. routes and compilerpass values which need also a clear cache on dev.

@jaswanthjinni
Copy link

Cannot use 'Object' as class name as it is reserved
is their any solution for this ?

@alexander-schranz
Copy link
Member

alexander-schranz commented Jan 20, 2020

@jaswanthjinni

Cannot use 'Object' as class name as it is reserved
is their any solution for this ?

which version of the Ongr/ElasticsearchBundle are you using this should be fixed some time ago in there bundle.

composer info ongr/elasticsearch-bundle | grep version

@jaswanthjinni
Copy link

i am using php 7.2 with yii 2.0.14 and i am working on ubantu 20.04 version

@alexander-schranz
Copy link
Member

ES 6 support was some time ago merged. ES 7 support is coming soon. See #433

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

No branches or pull requests

5 participants