使用 Composer Archive 将文件添加到子文件夹
我使用 composer archive
命令将我的 PHP 电子商务插件存档到 zip 文件。它运行良好,但我有一个问题:它不会在存档中创建子文件夹,这使得它与目标平台上的 Web 安装程序不兼容。
当前的 zip 结构:
- plugin.zip
- 文件1.php
- 文件2.php
- config.yml
所需的 zip 结构:
- plugin.zip
- 插件文件夹
- 文件1.php
- 文件2.php
- config.yml
- 插件文件夹
有没有办法使用composer archive
来实现这样的结果?如果没有,我愿意接受替代方案。
I use composer archive
command to archive my PHP e-commerce plugin to a zip file. It works well but I have one issue: it does not create a sub-folder within the archive which makes it incompatible with web installer on targeted platform.
Current zip structure:
- plugin.zip
- file1.php
- file2.php
- config.yml
Desired zip structure:
- plugin.zip
- plugin-folder
- file1.php
- file2.php
- config.yml
- plugin-folder
Is there a way to achieve such result using composer archive
? If not, I am open for alternatives.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论