-
Notifications
You must be signed in to change notification settings - Fork 974
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
Replaced array_walk with array_map in Connection::getURI #1075
Replaced array_walk with array_map in Connection::getURI #1075
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
This came up in #1063 (comment) I took the changes in the PR and applied them to our local source tree in CI and can confirm that they work as intended! |
@giovannialbero1992 🤷♀️ I see what you mean, didn't realize that #1063 targets master and this PR targets However I'm not familiar with the process here, just a reported at this point :) I'm used to the multiple branch model that fixes will be applied to the lowest version ( |
@deguif @giovannialbero1992 PHP 8 was released today, is there any update on the progress of this PR? |
@ezimuel this one should probably be merged to fully support PHP 8 , as it fails otherwise on PHP 8 |
@pascaldevink it should probably target |
b5b6140
to
cb80cdc
Compare
In Connection::getURI, array_walk was used together with passing the values as references, to change the original array. Passing values as references is error-prone and discouraged for quite some time. Also, when using in conjunction with PHP 8.0, it will fail. array_map can do the same thing as the original array_walk implementation, but without the downsides of having side effects and having to pass values as references.
cb80cdc
to
80f0cf7
Compare
* Added the x-elastic-client-meta header * Removed @ExpectedException usage in PHPUnit * Removed prestissimo plugin for composer in github action * Added .phpunit.result.cache in .gitignore * Add the t transport parameter in telemetry client header * Fixed semver format for PHP version in client telemetry header
@pascaldevink actually, it was enough to remove the |
In Connection::getURI, array_walk was used together with passing the values as references, to change the original array.
Passing values as references is error-prone and discouraged for quite some time.
Also, when using in conjunction with PHP 8.0, it will fail.
array_map can do the same thing as the original array_walk implementation, but without the downsides of having side effects and having to pass values as references.