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

Set::xor hangs #53

Closed
basz opened this issue Aug 31, 2016 · 4 comments
Closed

Set::xor hangs #53

basz opened this issue Aug 31, 2016 · 4 comments
Labels

Comments

@basz
Copy link

basz commented Aug 31, 2016

Whilst trying to calculate a set of mutations the xor operation hangs

I expect $removalChangeSet to contain only ['member']

I'm using DS 1.0.4 extension on OSX

require 'vendor/autoload.php';

$roles             = new \Ds\Set(['guest', 'member']);
$requestedRemovals = new \Ds\Set(['member', 'nothing']);

$keepSet          = $roles->diff($requestedRemovals);
$removalChangeSet = $roles->xor($keepSet);

var_dump($removalChangeSet->toArray());
@basz
Copy link
Author

basz commented Aug 31, 2016

update : using the php-ds/php-ds compatibility polypill no hang occurs

@rtheunissen
Copy link
Member

Very interesting, the freezing bug was fixed at some point and doesn't exist in 1.1.4 (current version), but the xor doesn't produce the expected result. It's yielding guest as well.

@rtheunissen
Copy link
Member

This has now been fixed in 3199f78 and released as v1.1.5 on PECL.

@basz
Copy link
Author

basz commented Aug 31, 2016

thanks!

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

No branches or pull requests

2 participants