&quot“ plugin-api version”在作曲家在不同环境上安装之间不断更改
我们正在与多个人合作,该项目使用作曲家软件包。每当同事更新/安装软件包时,plugin-api version
在composer.lock.lock
文件中更改。
这是一个问题,还是我们可以忽略这一点,只要没有包装plugin-api-version
?
We are working with multiple people on a project which uses composer packages. Every time a colleague updates/installs a package, the plugin-api-version
changes in the composer.lock
file.
Is this a problem or can we ignore this as long as there are no packages specifying a plugin-api-version
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当问题成为问题时,这是一个问题。
如果它不会阻止您安装项目,那不是问题。
但是,如果多个开发人员正在从事同一项目,并且所有开发人员都在对依赖项进行更改(例如运行
UPDATE
和/或需要
在该项目上调用),则更好实践将使所有开发人员都使用相同的版本(希望不在V1上)。It's a problem when it becomes a problem.
If it doesn't block you from installing your project, then it's not a problem.
But if multiple developers are working on the same project, and all of them are making changes on dependencies (e.g. running
update
and/orrequire
calls on that project), the better practice would be for all developers to be on the same version (and hopefully not on V1).之所以发生这种情况,是因为人们在环境中具有不同版本的作曲家。
自2020年以来(版本1.10.0 )
copser.lock.lock.lock
具有该字段插件-Apiversion
跟踪创建的作曲家版本。我建议所有开发人员使用同一版本的生产环境作曲家合作,以避免部署惊喜。
您可以通过运行
sudo composer self-lt; version>
升级/回滚版本,也可以从“手动下载” 作曲家下载页面的部分。如果开发人员更喜欢拥有并管理自己的作曲家版本,则可能需要下载
composer.phar
并将其作为项目的一部分。这样,您确保以每项项目的基础上的所有环境中使用相同的作曲家。This is happening because people have different versions of composer in their environments.
Since 2020 (Version 1.10.0)
composer.lock
has the fieldplugin-api-version
to track which Composer version created it.I recommended all devs to work with the same version of Composer of the production environment, to avoid surprises on deploy.
You can upgrade/rollback versions by running
sudo composer self-update <version>
or downloading the appropriatecomposer.phar
file from the "Manual Download" section of Composer downloads page.If developers prefer to have and manage their own versions of composer, you may want to download
composer.phar
and make it part of the project. This way, you ensure the same composer is used across all environments on a per-project basis.