-
Notifications
You must be signed in to change notification settings - Fork 293
PHP: Add prependPath
option to listFiles
method
#462
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
Merged
adamziel
merged 5 commits into
WordPress:trunk
from
eliot-akira:base-php-list-files-with-include-path-option
Jun 1, 2023
Merged
PHP: Add prependPath
option to listFiles
method
#462
adamziel
merged 5 commits into
WordPress:trunk
from
eliot-akira:base-php-list-files-with-include-path-option
Jun 1, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
includePath
option to listFiles
methodincludePath
option to listFiles
method
adamziel
reviewed
May 30, 2023
includePath
option to listFiles
methodprependPath
option to listFiles
method
OK, renamed option to |
adamziel
reviewed
May 31, 2023
adamziel
approved these changes
Jun 1, 2023
This is amazing @eliot-akira, it will save everyone writing the boilerplate - thank you for your willingness to help! |
adamziel
added a commit
that referenced
this pull request
Jun 1, 2023
The options argument for listFiles was added to BasePHP in #462. This commit adds it to an interface and a Web PHP Endpoint so that it can be used across the board in web and node.js applications
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Add
prependPath
option toPHP.listFiles
method, which will prepend given folder path to every file found in it.Why?
It's a common need to iterate over a list of files with each file path being an accessible path instead of only the file name. Idea mentioned in:
For example, this is a common pattern:
Also expressed as:
With the new option, the above can be simplified as:
How?
prependPath
option toBasePHP.listFiles
methodTesting Instructions
nx test playground-blueprints