-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Finder] Prevent unintentional file locks in Windows #33402
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
Merged
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
Need to rework this before submitting. My apologizes. |
AppVeyor self-cancelled. |
Didn't mean to close. |
Thank you @jspringe. |
nicolas-grekas
added a commit
that referenced
this pull request
Sep 1, 2019
…inge) This PR was submitted for the 4.3 branch but it was squashed and merged into the 3.4 branch instead (closes #33402). Discussion ---------- [Finder] Prevent unintentional file locks in Windows | Q | A | ------------- | --- | Branch? | 4.3 for bug fixes <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #33400 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | ~~This replaces the constructor behavior for `SortableIterator`. Instead of storing the sort strategy as a property, causing the object to hold references to the files being sorted and thus locking them in Windows, it uses a method to determine the sort strategy when calling `getIterator`.~~ Change stored `$sort` closure to a static closure. This removes the instance context that causes the file lock. This doesn't change any intended behavior. I, unfortunately, did not provided tests for 2 reasons. The first being that I've never written tests for the Symfony framework so I do not know the nuances. ~~The second is that in order for the test to actually fail it would need to be run in the Windows OS.~~ AppVeyor tests with a Windows instance, but it appears the `Finder` tests get skipped. Commits ------- 997cc5c [Finder] Prevent unintentional file locks in Windows
Thanks for the merge! Just curious, as I am not familiar, how long does it usually take to see this change in the framework/components? Only asking because I have another issue contingent upon this change. |
We release bug fix versions at least one a month, at the end of the month.
|
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.
This replaces the constructor behavior forSortableIterator
. Instead of storing the sort strategy as a property, causing the object to hold references to the files being sorted and thus locking them in Windows, it uses a method to determine the sort strategy when callinggetIterator
.Change stored
$sort
closure to a static closure. This removes the instance context that causes the file lock. This doesn't change any intended behavior.I, unfortunately, did not provided tests for 2 reasons. The first being that I've never written tests for the Symfony framework so I do not know the nuances.
The second is that in order for the test to actually fail it would need to be run in the Windows OS.AppVeyor tests with a Windows instance, but it appears theFinder
tests get skipped.