-
Notifications
You must be signed in to change notification settings - Fork 215
Support exceptions. #59
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
Conversation
We should probably bump the version significantly, because exceptions will most likely mean people need to modify their code for it to continue functioning. |
@andreiz How we could resolve this issue about version in pecl repository? |
We update the version here, then build a PECL tarball and upload it. |
I'm not building anything until this is merged in. |
👍 |
@fabiorphp I'm not good at writing test case(maybe because i'm not good at english). Could you guide me to do this? |
Of course! I'm here to help you. Before we start, please look at the tests that are already created. The tests are very easy. |
OK, i'll start with existing case. |
It's normal. If you prefer run in your machine, please look the dev-tools folder. I recommend that you install the Zookeeper server for you create integration tests. |
Let us wait the @andreiz integrating the repository with Travis-CI and Coveralls, it's more easy to approve pull-requests |
@fabiorphp Wait a moment. |
done : ) |
I will test soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the tests must be more simple.
E.g:
--TEST--
Should throw exception when check if node exists without connect
--SKIPIF--
<?php
if (!extension_loaded('zookeeper')) {
echo 'Zookeeper extension is not loaded'
};
--FILE--
<?php
$client = new Zookeeper();
try {
$client->exists('/test1');
} catch(Exception $e) {
echo $e->getMessage() . "\n" . $e->getCode();
}
--EXPECT--
Zookeeper->connect() was not called
5998
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does --EXPECT--
part support PHP code?
like:
--EXPECT--
Zookeeper->connect() was not called
<?php echo Zookeeper::CONNECT_NOT_CALLED; ?>
I'm worried about future changing of constant value.
Is this my over-worriness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, see these docs bellow and be a monster in making tests!
https://qa.php.net/write-test.php
https://qa.php.net/phpt_details.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Monster +_+....
Done. |
Well, @Timandes all tests passed! @andrei look at the Travis-CI integration guide: |
Anything new? |
Sorry, I'll try to do this today. On Mon, Jun 15, 2015 at 3:28 AM, Fábio da Silva Ribeiro <
|
Awesome @andreiz 👍 |
So what should go into .travis.yml file, just this? language: php
On Mon, Jun 15, 2015 at 10:56 AM, Fábio da Silva Ribeiro <
|
The Travis file was created and is on the master branch: You should only enable for this repo. |
I enabled the TravisCI integration and kicked off a build. On Tue, Jun 16, 2015 at 2:09 PM, Fábio da Silva Ribeiro <
|
Awesome! 👍 The next step is enable Coveralls for coverage! |
@Timandes Can you make push --force for run Travis-CI integration? |
@fabiorphp How should i do that? |
It is simple! |
I'm not sure that i did a right thing ... |
Well, is git push push -f origin master in you repo. Be careful! |
Is there anything else i can do? |
Not know. We will wait the @andreiz decide. |
You never sleep? ... |
Never sleep. Sleep is for the weak. |
洗洗睡吧…… |
php_zookeeper.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is PHPZK_ADDITIONAL_CONSTANTS ever defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's useless.
Should I remove it?
Log from Travis-CI:
Should I change mirror of Zookeeper package? |
Is there anything more I can do? |
Something new guys? |
Hope so. |
Is this ready to be merged then? |
👌 |
Yep! |
Something new guys? |
Something new guys? Or that PR will stand still as the other PR #28 |
Can I merge this request? I have permission to do that. |
I'll bump the version and make a release. |
Thanks to @ryanuber 's Pull request #28.
We need more tests after merging.