-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implements Countable
interface on each Finder
#14
Comments
Hi @llaville,
Anyway, if there's a particularly useful (non-trivial) use case, it's ok for me to implement it. |
@alekitto could you explain "Iterating such finders can potentially cause side-effects" ? (I don't see what context will lead to a side-effect) PS: Unless you have in mind note at https://symfony.com/doc/current/components/finder.html#transforming-results-into-arrays (about |
Just including a file (and registering its classes and functions) is a side-effect IMHO. The only way to not produce any side-effect is to use a non-including finder (phpDocumentor for example which unfortunately does not support attributes, but I'm also working on a finder based on php-parser) that can read the php files without adding them to the runtime. |
It's interresting, because I have the same idea, and currently working on such solution. |
Hello @alekitto
With my first report #13, I've found that
ComposerFinder
(but its always true to all other) is not yet able to count values of classes found (like Symfony Finder did it).Compares both syntaxes
This one works with current version 0.4.0
But not yet this one
I suggest to fix at least the
ComposerFinder
code like thisAnd think about other finders, or have a common fix !
WDYT ?
The text was updated successfully, but these errors were encountered: