This is directly related to #2329453: Ignore front end vendor folders to improve directory search performance which allows you to add items to the blacklist in RecursiveExtensionFilterIterator. I would like to similarly be able to add items to the whitelist which is used when searching the docroot during discovery.
We want the ability to have a "components" folder in the docroot which can be used to place decoupled blocks. The components are not modules, profiles, or themes and we want them to live in their own space.
With a config option in settings.php, I could add 'components' to the whitelist so its not excluded during ExtensionDiscovery->scanDirectory()
Comment | File | Size | Author |
---|---|---|---|
#18 | 2783389-18.patch | 2.54 KB | Nikhil_110 |
| |||
#16 | 2783389-nr-bot.txt | 168 bytes | needs-review-queue-bot |
#2 | drupal-file_scan_include_directories-2783389-1.patch | 2.28 KB | mrconnerton |
Comments
Comment #2
mrconnerton CreditAttribution: mrconnerton commentedAttached is a patch that creates a file_scan_include_directories. I've tested and works well locally. Still need to create a test.
Comment #3
dawehnerJust moving things around for now :)
Comment #7
boyan.borisov CreditAttribution: boyan.borisov at FFW commentedLooks like the feature that need now :) I will give it a try...
Comment #8
prashantgajare CreditAttribution: prashantgajare as a volunteer and commentedLGTM! #2 @mrconnerton patch works!
Comment #16
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #17
andypostComment #18
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedTried to apply patch drupal-file_scan_include_directories-2783389-1.patch but getting some error so I created new patch for Drupal 10.1.x
array $whitelist = [] is replaced by array $allowedExtensionTypes = [] in __construct functions
Comment #19
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedComment #20
smustgrave CreditAttribution: smustgrave at Mobomo commentedIssue summary could use some attention.
This will need a change record and test coverage.