Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Add support for new SoapClient option: keep_alive and ssl_method #1

Closed
wants to merge 8 commits into from
Closed

Add support for new SoapClient option: keep_alive and ssl_method #1

wants to merge 8 commits into from

Conversation

lku
Copy link
Contributor

@lku lku commented May 31, 2015

This PR adds two SoapClient options introduced in PHP 5.4 and 5.5:

keep_alive option allows sending "Connection: close" header directly from SoapClient.

ssl_method option allows to specify the SSL version to use

*/
public function testAllSslMethodsAreSupported()
{
if (!version_compare(PHP_VERSION, '5.5.0', '>=')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this. ZF > 2.5 has a minimum of php 5.5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Maks3w Done. I didn't know that master is already for 2.5, thanks!

@lku
Copy link
Contributor Author

lku commented Jun 4, 2015

I just accidentally discovered that tests failed in HHVM with this PR. I have to look into that.

@lku
Copy link
Contributor Author

lku commented Jun 10, 2015

I played with HHVM little bit and I have no idea how to fix the HHVM errors :( The reason is very simple - there are no SOAP_SSL_METHOD* constants in HHVM (hhvm src vs php src).

Any thoughts? Should I avoid using these constants?

@Maks3w
Copy link
Member

Maks3w commented Jun 10, 2015

define the constants if not defined.

if (!defined('FOO')) {
  define('FOO', 123456789);
}

@Maks3w
Copy link
Member

Maks3w commented Jun 10, 2015

Please rebase your PR. There are merge conflicts.

@lku
Copy link
Contributor Author

lku commented Jun 10, 2015

@Maks3w: Rebased and updated my code to short array syntax.

Where should I define these constants? They need to be in global namespace.

@Maks3w
Copy link
Member

Maks3w commented Jun 10, 2015

If constant is not preffixed with \ does not matter if is local or global namespace.

Anyway I think the feature of validate sslMethod can be omitted

@lku
Copy link
Contributor Author

lku commented Jun 10, 2015

Ok, I completely removed the SSL method validation.

There are other failures in HHVM, but those were already there. I could take a look at them later.

weierophinney added a commit that referenced this pull request Jun 23, 2015
Add support for new SoapClient option: keep_alive and ssl_method
weierophinney added a commit that referenced this pull request Jun 23, 2015
weierophinney added a commit that referenced this pull request Jun 23, 2015
@weierophinney
Copy link
Member

Merged to develop for release with 2.6.0.

@lku
Copy link
Contributor Author

lku commented Jun 23, 2015

Thank you 👍

And thank you @Maks3w for your code review

@lku lku deleted the feature/missing-client-options branch July 17, 2015 20:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants