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

Make filters optional? #39

Open
rustamwin opened this issue Oct 5, 2023 · 10 comments
Open

Make filters optional? #39

rustamwin opened this issue Oct 5, 2023 · 10 comments
Labels
status:ready for adoption Feel free to implement this issue.
Milestone

Comments

@rustamwin
Copy link
Member

Should we return all classes if no filters are used?

if ($countInterfaces === 0 && $countAttributes === 0 && $this->parentClass === null) {
return [];
}

@xepozz
Copy link
Member

xepozz commented Oct 6, 2023

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

@vjik
Copy link
Member

vjik commented Oct 6, 2023

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

@rustamwin
Copy link
Member Author

Either we need to refactor filters.

@rustamwin
Copy link
Member Author

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

Are the specified directories not a filter?

@vjik
Copy link
Member

vjik commented Oct 18, 2023

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
Copy link
Member

xepozz commented Oct 20, 2023

Make sense, would you implement it, @rustamwin ?

@rustamwin
Copy link
Member Author

Make sense, would you implement it, @rustamwin ?

#41

@xepozz
Copy link
Member

xepozz commented Oct 20, 2023

Let's separate it

@rustamwin
Copy link
Member Author

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

@rustamwin rustamwin reopened this Oct 26, 2023
@vjik
Copy link
Member

vjik commented Nov 22, 2023

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

@samdark samdark added status:ready for adoption Feel free to implement this issue. and removed status:under discussion labels Jul 16, 2024
@samdark samdark added this to the 1.0.0 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for adoption Feel free to implement this issue.
Projects
None yet
Development

No branches or pull requests

4 participants