Skip to content

8.0 meta ticket #1028

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

Closed
5 of 10 tasks
ezimuel opened this issue May 8, 2020 · 7 comments
Closed
5 of 10 tasks

8.0 meta ticket #1028

ezimuel opened this issue May 8, 2020 · 7 comments
Labels
Milestone

Comments

@ezimuel
Copy link
Contributor

ezimuel commented May 8, 2020

To-do list

Items for the new 8.0 release of elastic/elasticsearch-php:

If you have feedback or things that you would like to have in 8.0 version please comment, thanks!

@ezimuel ezimuel added this to the v8.0.0 milestone May 8, 2020
@ezimuel ezimuel added the meta label May 8, 2020
@hacfi
Copy link
Contributor

hacfi commented May 20, 2020

Remove src/autoload.php and the corresponding entry from composer.json.

Unfortunately this currently prevents using the new Opcache preloading feature (PHP 7.4) with Symfony 4.4.

@ezimuel
Copy link
Contributor Author

ezimuel commented May 20, 2020

@hacfi yes, we will definitely remove the src/autoload.php. We introduced it only because a BC break case. Btw, can you give me more detail about the issue with Symfony 4.4? Thanks!

@hacfi
Copy link
Contributor

hacfi commented May 20, 2020

@ezimuel Symfony 4.4 introduced a new feature (see https://symfony.com/blog/new-in-symfony-4-4-preloading-symfony-applications-in-php-7-4) that makes use of PHP 7.4's opcache.preload= option. When you use any class of this package in your app the Elasticsearch\ classes will be preloaded automatically when the server starts. The problem is that when your application includes Composer's autoloader it will run vendor/elasticsearch/elasticsearch/src/autoload.php and throws some warnings that those classes have already been defined. If you want a reproducible test repo let me know and I'll set it up. I created a fork removing the autoload.php and it fixes the issue.

@hacfi
Copy link
Contributor

hacfi commented May 20, 2020

Just thought of a simple fix for that: call class_exists($alias, false) before you actually create the alias. That's also how it's fixed in another repo that has this issue: https://github.com/hoaproject/Consistency/pull/36/files

@ezimuel
Copy link
Contributor Author

ezimuel commented May 21, 2020

@hacfi thanks for the info. I'll provide a PR to fix this.

@ezimuel
Copy link
Contributor Author

ezimuel commented Feb 11, 2021

I implemented a first version of the HTTP transport layer for the next Elastic PHP clients: https://github.com/elastic/elastic-transport-php

@joshua-bn
Copy link

Can you add the tasks to the project https://github.com/elastic/elasticsearch-php/projects/2 ?

Then, what can we do to move this along? Every time I look at NewRelic and see GuzzleHttp\Ring it makes me sigh.

@ezimuel ezimuel closed this as completed Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants