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-php produces lots of warnings with php 7.4 preloading enabled. #1042

Closed
hoebelix opened this issue Jun 18, 2020 · 6 comments
Closed

Comments

@hoebelix
Copy link

Summary of problem or feature request

I use elasticsearch-php within a symfony project (symfony 4.4). Elasticsearch-php produces lots of warnings with php 7.4 preloading enabled.

Example log line:
NOTICE: PHP message: PHP Warning: Cannot declare class \Elasticsearch\Endpoints\Cluster\Nodes\HotThreads, because the name is already in use in /code/xx/vendor/elasticsearch/elasticsearch/src/autoload.php on line 11

This line is repeated for every class_alias defined in the mentioned autoload.php

System details

  • Operating System: Alpine Linux
  • PHP Version: 7.4.6
  • ES-PHP client version: 7.7.0
  • Elasticsearch version: 7.7
@adri
Copy link

adri commented Jun 26, 2020

I'm seeing the same issue with PHP 7.4.7.

PHP 7.4.7 (cli) (built: Jun 11 2020 18:41:17) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.7, Copyright (c), by Zend Technologies

annuh added a commit to annuh/elasticsearch-php that referenced this issue Jul 7, 2020
@ezimuel
Copy link
Contributor

ezimuel commented Jul 16, 2020

@hoebelix, @adri we are working on #1051 but I would like to understand the preload configuration that you are using. Thanks!

@hoebelix
Copy link
Author

I just use the default symfony 4.4 preload configuration:

opcache.preload=/var/www/var/cache/prod/srcApp_KernelProdContainer.preload.php
opcache.preload_user=www-data

@adri
Copy link

adri commented Jul 16, 2020

Same for me, default symfony 4.4

@ezimuel
Copy link
Contributor

ezimuel commented Jul 17, 2020

@hoebelix, @adri thanks for the information. The issue has been fixed in #1051. I'll release it soon in 7.9.

@ezimuel ezimuel closed this as completed Jul 17, 2020
@adri
Copy link

adri commented Jul 18, 2020

Awesome thanks!

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

3 participants