yiisoft / classifier

Classifier traverses file system to find classes by a certain criteria.
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Make filters optional? #39

Open rustamwin opened 11 months ago

rustamwin commented 11 months ago

Should we return all classes if no filters are used? https://github.com/yiisoft/classifier/blob/16b0d8aaa2b4b1f435ccb2b087f2a52e5e43be22/src/Classifier.php#L75-L77

xepozz commented 11 months ago

Why do you want to get all classes without any filters?

vjik commented 11 months ago

If classifier will be may parse specific folder only, it is matter.

rustamwin commented 11 months ago

Either we need to refactor filters.

rustamwin commented 10 months ago

Why do you want to get all classes without any filters?

Are the specified directories not a filter?

vjik commented 10 months ago

Are the specified directories not a filter?

I mean initial classes to which the filters will aready be applied. Now is include all PHP files from defined directories and use get_declared_classes() for get all classes. In this case directory is not filter.

xepozz commented 10 months ago

Make sense, would you implement it, @rustamwin ?

rustamwin commented 10 months ago

Make sense, would you implement it, @rustamwin ?

41

xepozz commented 10 months ago

Let's separate it

rustamwin commented 10 months ago

Now is include all PHP files from defined directories and use get_declared_classes() for get all classes. In this case directory is not filter.

See https://github.com/yiisoft/classifier/blob/master/src/Classifier.php#L97-L100

vjik commented 9 months ago

@rustamwin Is "Directory" filter or not in this discussion?