Skip to content

[Filesystem] Fix Filesystem::remove() on Windows #57574

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 1 commit into from
Jun 28, 2024

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues #57375, #57346
License MIT

Let's experiment with @smnandre's theory.

@carsonbot carsonbot added this to the 5.4 milestone Jun 28, 2024
@nicolas-grekas nicolas-grekas merged commit 572ce41 into symfony:5.4 Jun 28, 2024
7 of 12 checks passed
github-merge-queue bot pushed a commit to Lendable/composer-license-checker that referenced this pull request Jun 28, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [symfony/filesystem](https://symfony.com)
([source](https://togithub.com/symfony/filesystem)) | `6.4.8` -> `6.4.9`
|
[![age](https://developer.mend.io/api/mc/badges/age/packagist/symfony%2ffilesystem/6.4.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/symfony%2ffilesystem/6.4.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/symfony%2ffilesystem/6.4.8/6.4.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/symfony%2ffilesystem/6.4.8/6.4.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>symfony/filesystem (symfony/filesystem)</summary>

###
[`v6.4.9`](https://togithub.com/symfony/filesystem/releases/tag/v6.4.9)

[Compare
Source](https://togithub.com/symfony/filesystem/compare/v6.4.8...v6.4.9)

**Changelog**
(symfony/filesystem@v6.4.8...v6.4.9)

- bug
[symfony/symfony#57574](https://togithub.com/symfony/symfony/issues/57574)
\[Filesystem] Fix Filesystem::remove() on Windows
([@&#8203;nicolas-grekas](https://togithub.com/nicolas-grekas))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Lendable/composer-license-checker).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@nicolas-grekas nicolas-grekas deleted the fs-RM branch June 29, 2024 05:43
@nicolas-grekas
Copy link
Member Author

appveyor still failing after this PR, your guess didn't work this time @smnandre :)

@smnandre
Copy link
Member

Well could we use the old « dot » thing on Windows ? On my PR it seems to work well (and i’m not sure if the alpha order is the cause or the dot dot thing .. but i’m sure this change is the root of the problem — or at least what exposes it)

@nicolas-grekas
Copy link
Member Author

I really really doubt that changing for a dot would fix anything. We should look for something else.

@xabbuh
Copy link
Member

xabbuh commented Jul 4, 2024

If we find a proper solution for this, could it be that such a fix will also fix #50326? (the FilesystemCommonTrait doesn't use the Filesystem component)

@smnandre
Copy link
Member

smnandre commented Jul 4, 2024

Maybe something there: rectorphp/rector-src#5514

using null arg to keep file permission:

- $this->filesystem->dumpFile($filePath, $newContent);
+ FileSystem::write($filePath, $newContent, null);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants