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

Implement Matcher and Filter that processes also array members. #24

Closed
trebi opened this issue Oct 3, 2015 · 1 comment
Closed

Implement Matcher and Filter that processes also array members. #24

trebi opened this issue Oct 3, 2015 · 1 comment

Comments

@trebi
Copy link
Contributor

trebi commented Oct 3, 2015

For now, filter applies only on property of an object. But for filter PropertyByTypeFilter, it would be more consistent, if its applies on all existing instances of specified type that appears inside copied elemnt, so not just object properties, but also members of arrays, or copied object itself (i.e. $deepCopy->clone(\Mockery::mock(MySuperClass::class)).

This is particullary useful to configure DeepCopy to skip all mocked instances (I'm using Mockery), which oviously, DeepCopy fails to clone.

@trebi trebi changed the title Implement Matcher and Filter that processes array members. Implement Matcher and Filter that processes also array members. Oct 3, 2015
@mnapoli
Copy link
Member

mnapoli commented Oct 5, 2015

I'm not sure it would make sense to change the behavior of PropertyByTypeFilter. Maybe it would be better to add another filter? E.g. PropertyContainsType or something like this?

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

No branches or pull requests

2 participants