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

setSoapHeader calls overwrite previously set headers #49

Open
mlaurense opened this issue May 15, 2023 · 3 comments · May be fixed by #46
Open

setSoapHeader calls overwrite previously set headers #49

mlaurense opened this issue May 15, 2023 · 3 comments · May be fixed by #46
Labels

Comments

@mlaurense
Copy link

This seems to be a PHP 8 issue. Due to the __default_headers being a private property, subsequent calls to setSoapHeader overwrite the previously set headers.

@mikaelcom
Copy link
Member

Might be fixed by #46, but tests are failling for now, I did not have the time to fix it yet

@mikaelcom mikaelcom self-assigned this May 22, 2023
@mikaelcom mikaelcom added the bug label May 22, 2023
@mikaelcom mikaelcom linked a pull request May 22, 2023 that will close this issue
@awaters-pa
Copy link

awaters-pa commented Nov 17, 2023

I think the fix would be to change the signature of AbstractSoapClientBase->setSoapHeader to allow for an array, or add another method to setup the default headers. Currently, no matter what setSoapHeader will always override headers not set directly on the underlying SOAP client. It seems that due to all the properties goign private in PHP 8, the only way to properly do this is to manage the headers internal to the abstract class. Or, if the user wants this functionality, they could expose the __default_headers in their own __soap_client.
The fix in #46 of removing ->setSoapClient isn't acceptable as we need to be able to inherit and override some of the base calls in order to implement logging and such.

@mikaelcom
Copy link
Member

Feel free to make a PR if you're comfortable enough, we'll discuss about it then, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants