-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
add functions [filterPath(), normalizeOptions(), copyDirectory()] #5
Conversation
terabytesoftw
commented
Aug 19, 2019
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
Tests pass? | ✔️ |
Fixed issues | (#4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me now. Do you plan more changes?
We will review all possible use cases that we can have with the copyDirectory () and filterPath () from the AssetManager and based on those uses we will debug the filtering function well and know exactly what it returns for each case, Please do not merge. |
Please check the code and tests, add 3 cases of only and except, and it works perfect, remove the filter option within filterPath, it had no use there, filterPath is only used for copyDirectory(), only and except are sufficient to filter in copyDirectory(). I think that using well only and except you can delete beforeCopy() and afterCopy(), it's just an opinion. |
On the other hand I have been trying to raise the coverage to the tests but for example:
Solution:
|
Already fix all the phpdocs of FileHelperTest, and try to simplify and improve FileHelper, the Yii2 code works perfect, it is the only utility that copies, and allows filtering and excepting files in github. |
Seems to be OK now. Anything else you want in? |
What do you think of creating BaseFileHelper as in Yii2, or creating a new FilterHelper.php, and passing the filtering classes there and lowering the cognitive complexity of FileHelper.php that scrutinizer punishes heavily, those filters are only used by the copyDirectory() function. |
I see no need for
Then I see no reason to have them in a separate helper. |
Ok then for my part everything is ready too. |
Merged. Thank you! |