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

Cloning behavior inconsistent with the extension #60

Open
mnavarrocarter opened this issue Feb 20, 2020 · 2 comments
Open

Cloning behavior inconsistent with the extension #60

mnavarrocarter opened this issue Feb 20, 2020 · 2 comments

Comments

@mnavarrocarter
Copy link

Hi there!

I'm implementing a middleware pipeline third-party library using this extension with the polyfill. The implementation exhausts the Queue class of this library recursively by cloning itself. You can take a look at the implementation here.

When I run the tests with the extension, everything works perfectly well and as expected. However, when I run the tests with the polyfill, everything breaks.

Looking at the polyfill code, I realized that there was not a Ds\Queue::__clone method implemented, so when I called clone on the queue, the internal Ds\Deque containing the array was not being cloned.

I implemented the clone method in my vendor folder just for testing purposes, and this fixed it.

I can submit a PR with the fix if you are busy to fix it yourself. Just let me know.

Thanks for this awesome extension!

@rtheunissen
Copy link
Member

Thanks for this bug report, I'll make some time to fix this asap. 👍

@mnavarrocarter
Copy link
Author

Thanks a lot! Switched to Deque in the meantime so no hurry! :)

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

No branches or pull requests

2 participants