Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jspringe commentedAug 30, 2019
Need to rework this before submitting. My apologizes. |
jspringe commentedAug 31, 2019
AppVeyor self-cancelled. |
jspringe commentedAug 31, 2019
Didn't mean to close. |
nicolas-grekas commentedSep 1, 2019
Thank you@jspringe. |
…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 <!-- seehttps://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
jspringe commentedSep 1, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
nicolas-grekas commentedSep 1, 2019 via email
We release bug fix versions at least one a month, at the end of the month. |
Uh oh!
There was an error while loading.Please reload this page.
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
$sortclosure 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 theFindertests get skipped.