| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
so that the library can be used with Mink (ie php 5.3 with namespace).
Conflicts:
WebDriverBase.php
Use upstream code.
|
why do you have to do the \Exception thing? is that just part of the syntax when in a namespace? i'm unfamiliar. |
Sorry, something went wrong.
|
Yes - it's part of the namespace syntax. The scope of the whole file is set by the namespace call at the beginning of the file. Since Exception is not defined in the WebDriver namespace, _throw Exception(...)_ fails. Instead they need to be fully qualified _throw \Exception(...)_. See http://us3.php.net/manual/en/language.namespaces.rules.php for more information. |
Sorry, something went wrong.
|
hey man. this is tough because we don't use namespaces anywhere in our php code at facebook. are a lot of open sourcers going to be reticent to adopt this if it's not in it's own namespace? |
Sorry, something went wrong.
|
If you decide against namespacing, could you at least switch to WebDriver_ as the prefix for class names, so it follows the PEAR/ZF naming convention? |
Sorry, something went wrong.
|
so WebDriverElement would become WebDriver_Element, etc? |
Sorry, something went wrong.
|
Right. Something like https://github.com/CodingNinja/php-webdriver/commit/d16018d75ff691ede344cba53a4a5c348d9bcb9b |
Sorry, something went wrong.
|
so another naming convention at FB is we don't put _'s in our class names. heh. i'm not sure how to best resolve this. trying my best to not fork our internal fb version from this open source one. |
Sorry, something went wrong.
|
You could maintain it as a branch, I suppose. |
Sorry, something went wrong.
|
yeah i could have a PEAR branch or what not. good idea. |
Sorry, something went wrong.
|
still haven't actually seen any docs about this supposed PEAR/ZF naming convention? is that officially defined somewhere? gonna close this for now. please reopen if you have that doc and i can try to set up a branch with those changes so that we match what PEAR wants. |
Sorry, something went wrong.
|
Here is a link to the Zend coding style where the naming convention for classes is outlined: http://framework.zend.com/manual/en/coding-standard.naming-conventions.html |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add namespace to ease integration as a vendor library in 3rd party projects (eg Mink - https://github.com/behat/mink).