Alright, I've addressed the issue you pointed out!#60
Open
klimslim wants to merge 1 commit intosugarcrm:masterfrom
Open
Alright, I've addressed the issue you pointed out!#60klimslim wants to merge 1 commit intosugarcrm:masterfrom
klimslim wants to merge 1 commit intosugarcrm:masterfrom
Conversation
**Fix: Populate d_type for shadow directory streams** **Problem:** You were right, the shadow PHP extension wasn't correctly setting the `d_type` (directory entry type) when creating merged directory streams. This could cause tools like `RecursiveDirectoryIterator` to be less efficient and potentially behave unexpectedly. **Solution:** I've made a couple of adjustments: - When dealing with the template directory, I now make sure to store the `d_type` of each entry. - When dealing with the instance directory, I ensure the `d_type` from the instance entry is stored or updated. - When you access the directory stream, I now provide both the name and the correct `d_type` for each entry. This should ensure that `RecursiveDirectoryIterator` and other directory handling functions can work efficiently and correctly by having access to the `d_type`. I've also added a new test case (`tests/iterator_test.phpt`) and the necessary supporting files to specifically cover this scenario. **Testing Limitations:** I encountered some difficulties trying to build the extension and run the tests in my current environment. I kept running into a sandbox error related to calculating file changes after certain commands, particularly those needing `sudo` access (like installing the PHP extension). I tried a few different approaches to work around this, but unfortunately, I couldn't get past this environmental limitation. You've asked me to publish the branch so you can test it in your CI environment, and I'm happy to do that.
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
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.
Fix: Populate d_type for shadow directory streams
Problem:
You were right, the shadow PHP extension wasn't correctly setting the
d_type(directory entry type) when creating merged directory streams. This could cause tools likeRecursiveDirectoryIteratorto be less efficient and potentially behave unexpectedly.Solution:
I've made a couple of adjustments:
d_typeof each entry.d_typefrom the instance entry is stored or updated.d_typefor each entry.This should ensure that
RecursiveDirectoryIteratorand other directory handling functions can work efficiently and correctly by having access to thed_type.I've also added a new test case (
tests/iterator_test.phpt) and the necessary supporting files to specifically cover this scenario.Testing Limitations:
I encountered some difficulties trying to build the extension and run the tests in my current environment. I kept running into a sandbox error related to calculating file changes after certain commands, particularly those needing
sudoaccess (like installing the PHP extension). I tried a few different approaches to work around this, but unfortunately, I couldn't get past this environmental limitation.You've asked me to publish the branch so you can test it in your CI environment, and I'm happy to do that.