php qt cache:clear --all fails on a folder that holds only hidden files
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先阅读 issue 中提到的方法 ResourceCacheClearCommand::removeFilesFromDirectory(),并检查它列出目录内容时如何处理名称以点开头的文件。使用 cache/test/.hidden 复现问题,并运行 php qt cache:clear --all;当命令删除隐藏文件并以“Resource cache cleared successfully.”结束时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Summary
php qt cache:clear --all stops with rmdir(...): Directory not empty when a folder under the cache directory contains a file whose name starts with a dot, for example cache/composer/.htaccess.
Cause
ResourceCacheClearCommand::removeFilesFromDirectory() lists the entries with glob($dir . DS . '*'). The pattern does not match names that start with a dot, so the command never removes those files. It then counts the folder as empty and calls removeDirectory(), which fails.
Expected
cache:clear --all empties the folders it clears, hidden files included, and finishes with "Resource cache cleared successfully."
Steps to reproduce
- In a project, create
cache/test/.hidden. - Run
php qt cache:clear --all. - The command fails with
rmdir(.../cache/test): Directory not empty.
Note
--all empties the whole cache directory, not only the resource cache, so it also removes cache/data, the default location of the file cache adapter. Whether --all should be limited to the resource cache (views, asserts) is a separate question and not part of this ticket.
- 主要语言
- PHP
- 星标
- 44
- 派生
- 22
- 平均合并
- 2 小时 49 分钟
- 30 天内合并 PR
- 61
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quantum-php/framework 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
quantum-php/framework#737 ·
维护者通常 1 天内回复
-
tech debt testing
难度 2/5 1-3 小时 新手友好度 72/100
quantum-php/framework#696 ·
维护者通常 1 天内回复
-
routing testing
难度 2/5 1-3 小时 新手友好度 76/100
quantum-php/framework#547 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
quantum-php/framework#741 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 40/100
quantum-php/framework#740 ·
维护者通常 1 天内回复
查看 quantum-php/framework 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
🐛 Web Bug
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
omeka/plugin-Commenting#72 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
`mercure()` Twig function: the `lastEventId` option adds query parameters that Mercure hubs 1.0+ ignore可能已有人在做 @daFish 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100