This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Nicolas Grekas 6a31d31f28 bug #33402 [Finder] Prevent unintentional file locks in Windows (jspringe)
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
-------

997cc5c3f0 [Finder] Prevent unintentional file locks in Windows
2019-09-01 23:32:41 +02:00
.composer Drop hirak/prestissimo 2016-05-12 07:44:15 -05:00
.github drop 4.2 branch from pull request template 2019-07-28 09:20:12 +02:00
src/Symfony [Finder] Prevent unintentional file locks in Windows 2019-09-01 23:32:23 +02:00
.appveyor.yml Upgraded CI Composer 2019-08-26 19:51:50 +01:00
.editorconfig Update .editorconfig 2018-09-06 16:22:56 +02:00
.gitignore Run the phpunit-bridge from a PR 2019-08-02 17:46:19 +02:00
.php_cs.dist Remove superfluous phpdoc tags 2019-08-14 13:59:53 +02:00
.travis.yml Sort components on CI 2019-08-27 07:15:48 +02:00
CHANGELOG-3.0.md Merge branch '2.8' into 3.1 2016-08-05 10:37:39 +02:00
CHANGELOG-3.1.md updated CHANGELOG for 3.1.9 2017-01-12 12:43:31 -08:00
CHANGELOG-3.2.md use behavior instead of behaviour 2019-03-25 08:48:46 +01:00
CHANGELOG-3.3.md use behavior instead of behaviour 2019-03-25 08:48:46 +01:00
CHANGELOG-3.4.md updated CHANGELOG for 3.4.31 2019-08-26 18:36:15 +02:00
CODE_OF_CONDUCT.md Added the Code of Conduct file 2018-10-10 03:13:30 -07:00
composer.json [ProxyManager] remove ProxiedMethodReturnExpression polyfill 2019-08-29 16:54:55 +02:00
CONTRIBUTING.md Mention the community review guide 2016-12-18 22:02:35 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 3.4.31 2019-08-26 18:36:24 +02:00
LICENSE update year in license files 2019-01-01 14:45:19 +01:00
link Use the current working dir as default first arg in 'link' binary 2019-05-16 11:52:39 +02:00
phpunit cs fix 2019-08-14 11:39:58 +02:00
phpunit.xml.dist Merge branch '2.8' into 3.4 2018-11-11 20:48:54 +01:00
README.md Merge branch '2.8' into 3.4 2018-05-25 16:50:57 +02:00
UPGRADE-3.0.md Fixed markdown file 2019-08-13 19:39:09 +02:00
UPGRADE-3.1.md [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize 2016-12-08 16:02:32 +01:00
UPGRADE-3.2.md Merge branch '2.8' into 3.4 2018-02-22 13:28:57 +01:00
UPGRADE-3.3.md Merge branch '3.3' into 3.4 2017-11-30 15:59:23 +01:00
UPGRADE-3.4.md Merge branch '2.8' into 3.4 2018-05-31 12:13:22 +02:00
UPGRADE-4.0.md minor: ChoiceType callable deprecation after/before seems wrong 2019-04-26 08:22:35 +02:00

Symfony is a PHP framework for web applications and a set of reusable PHP components. Symfony is used by thousands of web applications (including BlaBlaCar.com and Spotify.com) and most of the popular PHP projects (including Drupal and Magento).

Installation

Documentation

Community

Contributing

Symfony is an Open Source, community-driven project with thousands of contributors. Join them contributing code or contributing documentation.

Security Issues

If you discover a security vulnerability within Symfony, please follow our disclosure procedure.

About Us

Symfony development is sponsored by SensioLabs, led by the Symfony Core Team and supported by Symfony contributors.