symfony/symfony — Issue #3208: Finder merges iterator results when called twotimes
Author: gries
Created: 2012-01-28 21:30:32+00:00
State: open

I don't know if this is the intended behaviour, but if I use the finder to list directories and then use the same finder object to list another directory the iterator results get somehow merged.

For example:

We have two directories like this and list them:

test
- sub1
- sub2
test2
- sub3
- sub4

```php
directories()->in('/test/'); // sub1, sub2
$dirs2 = $finder->directories()->in('/test2/'); // sub1, sub2, sub3, sub4
```

Even if it's not intended to use the Finder class that way, the behaviour still seems strange.