简体   繁体   English

我可以使用 Composer 将 PHP Zip 添加到 Laravel 项目中吗?

[英]Can I add PHP Zip to a Laravel project using composer?

I need to use the PHP zip extension in a Laravel project.我需要在 Laravel 项目中使用 PHP zip 扩展。 The PHP manual talks about building PHP with the zip extension, http://php.net/manual/en/zip.installation.php . PHP 手册讨论了使用 zip 扩展名http://php.net/manual/en/zip.installation.php构建 PHP。

My environments all run on Ubuntu, though on differing versions.我的环境都在 Ubuntu 上运行,尽管版本不同。 I see plenty of articles talking about using apt-get to install the extension.我看到很多关于使用 apt-get 安装扩展的文章。

I'm pretty sure that I can use composer to manage this extension, but I can't find any articles on it.我很确定我可以使用 composer 来管理这个扩展,但是我找不到任何关于它的文章。 Can I do this?我可以这样做吗? How do I add it?我如何添加它? I would prefer to use composer if possible.如果可能的话,我更喜欢使用作曲家。

Ok, just found this on the composer site:好的,刚刚在作曲家网站上找到了这个:

Composer has platform packages, which are virtual packages for things that are installed on the system but are not actually installable by Composer. Composer 有平台包,它们是安装在系统上但实际上不能由 Composer 安装的东西的虚拟包。 This includes PHP itself, PHP extensions and some system libraries.这包括 PHP 本身、PHP 扩展和一些系统库。

It can not do the install, but presumably adding the ext reference to composer.json will give satisfy my IDE.它无法进行安装,但大概添加对 composer.json 的 ext 引用将满足我的 IDE。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM