Skip to content

FEATURE: add $skipErrors option to GlobIterator - #61

Merged
Ocramius merged 5 commits into
webmozarts:4.6.xfrom
zobo:feat-skip-errors
May 24, 2022
Merged

FEATURE: add $skipErrors option to GlobIterator#61
Ocramius merged 5 commits into
webmozarts:4.6.xfrom
zobo:feat-skip-errors

Conversation

@zobo

@zobo zobo commented May 17, 2022

Copy link
Copy Markdown
Contributor

No description provided.

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires an automated test to validate the behavior of the new flag and prevent regressions long-term.

Comment thread src/Iterator/GlobIterator.php Outdated
@zobo

zobo commented May 17, 2022

Copy link
Copy Markdown
Contributor Author

I can imagine hacking something for linux based tests. chmod-ing a directory and so causing an access error...

@Ocramius

Copy link
Copy Markdown
Contributor

Yup, pretty much what is needed 👍

@zobo zobo changed the title feat: add $skip_errors option to GlobIterator feat: add $skipErrors option to GlobIterator May 17, 2022
@zobo

zobo commented May 17, 2022

Copy link
Copy Markdown
Contributor Author

Added a test also.

Amazingly, I managed to screw up the RecursiveIteratorIterator flag (because I copied the code around so much) and the test caught it :)

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests currently failing 😁

Comment thread tests/Iterator/GlobIteratorErrorTest.php
@zobo
zobo force-pushed the feat-skip-errors branch from b14dd39 to 84830d9 Compare May 17, 2022 19:54
@zobo

zobo commented May 18, 2022

Copy link
Copy Markdown
Contributor Author

Now the only other change I can think of is exposing $skipErrors to Glob::glob.

Comment thread src/Iterator/GlobIterator.php Outdated
Comment thread tests/Iterator/GlobIteratorErrorTest.php

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zobo!

@Ocramius Ocramius self-assigned this May 24, 2022
@Ocramius Ocramius added this to the 4.6.0 milestone May 24, 2022
@Ocramius
Ocramius merged commit 3c17f7d into webmozarts:4.6.x May 24, 2022
@Ocramius Ocramius changed the title feat: add $skipErrors option to GlobIterator FEATURE: add $skipErrors option to GlobIterator May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants