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

Added the possibility to use local WSDL files #11

Merged
merged 1 commit into from
Mar 15, 2016

Conversation

floriansimon1
Copy link

The previous pull request contained bad commits. This one should be better.

The recommended way to install this library is [through composer](packagist://getcomposer.org).
[New to composer?](packagist://getcomposer.org/doc/00-intro.md)
The recommended way to install this library is [through composer](http://getcomposer.org).
[New to composer?](http://getcomposer.org/doc/00-intro.md)
Copy link
Author

Choose a reason for hiding this comment

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

I did not do this manually. I don't really know what happened here (?!)

Copy link
Owner

Choose a reason for hiding this comment

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

Looks like your feature branch is based on an old version of the master branch. Can you rebase and push your changes?

@clue
Copy link
Owner

clue commented Sep 4, 2015

Awesome, I like the new feature!

However, I'm not sure about the method names createClient() vs createClientFromWsdl(). What's your take on this?

@floriansimon1
Copy link
Author

However, I'm not sure about the method names createClient() vs createClientFromWsdl(). What's your take on this?

I don't know. I can only agree with you on the fact that createClientFromWsdl is not the smartest name you can give to that method.

Possible candidates :

  • createClientWithDefinition()
  • fromDefinition()
  • fromWsdlContents()
  • fromMemory()

What do you prefer ? Do you have any other idea ?

@clue
Copy link
Owner

clue commented Sep 4, 2015

What do you prefer ? Do you have any other idea ?

IMO the original createClient() is already a bad choice, simply because it does not actually return a Client instance in the first place. It returns a Promise that resolves to Client.

Also, once we aim for #5, we should make it more obvious which method uses WSDLs.

This means we should aim to rename the original method name (in a separate PR!).
Something like createDeferredClientWsdlDownload($uri) might make sense?

Your new method does in fact return a Client instance for the given WSDL contents.
As such, my personal vote would be something like createClientWsdl($wsdl), but I'm very open to your suggestions.

Can you update your PR with the new method name? 👍 Also, I think we should emphasize the difference to the existing method (documentation).

@floriansimon1
Copy link
Author

I don't know if renaming the original function makes sense. This creates a compatibility break which you might want to avoid. The fact that createClient does not return a client is not a problem to me. It says that it's creating a client, not that it's returning it. I'm kind of biased though, I'm used to working with promises for everything :)

If you're ready to do it anyway, which I can understand, I would rename it to something like createFromWsdlUrl. It'd make it clearer that it's loading a remote WSDL file, which to me implies that it's returning a promise.

I'd rename the createClientFromWsdl method I'm writing to createClientFromDefinition make it clear that the method creates a client using a preloaded definition file (WSDL).

The fact that createClient does not return a client is not a problem to me. It says that it's creating a client, not that it's returning it. I'm kind of biased though, I'm used to working with promises for everything :)

I can't say I particularly like createClientWsdl, because, it might let people think that it generates a WSDL file, which would be confusing IMO.

It's all up to you !

@clue
Copy link
Owner

clue commented Sep 4, 2015

I don't know if renaming the original function makes sense.

You're raising some very valid points here 👍 You're also right in that it probably doesn't make much sense to discuss this in this PR :) As such, I've just filed #15, so let's address these there 👍

Let's get back on topic here :)

In fact, I like the createClientFromWsdl() method name as it accurately describes what it does 👍

Would you care to update the the documentation as to how this new method differs from the existing, dreaded createClient() method? Thanks!

@floriansimon1
Copy link
Author

It's already added in commit 7a5c5a8. It is OK for you ?

@clue
Copy link
Owner

clue commented Mar 15, 2016

Much appreciated, thanks @floriansimon1! 👍

clue added a commit that referenced this pull request Mar 15, 2016
Added the possibility to use local WSDL files
@clue clue merged commit 5d9523b into clue:master Mar 15, 2016
@clue clue mentioned this pull request Mar 15, 2016
@clue clue added this to the v0.2.0 milestone Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants