PHP作曲家和PHPSTORM -PHP 5.3.3至7.4

发布于 2025-02-06 03:37:20 字数 174 浏览 0 评论 0原文

我想检查PHP 5.3.3脚本以升级到PHP 7.4。我有phpstorm 2022.1.2。

我收集到我需要安装php_codesniffer,可能是为了方便起见。

作曲家似乎希望在我的开发计算机上安装PHP(这与我的服务器分开...)。有其他选择吗?还是在我本地机器上没有PHP的情况下如何安装作曲家?

I am wanting to check PHP 5.3.3 scripts for compatibility to upgrade to PHP 7.4. I have PhpStorm 2022.1.2.

I gather I need to install PHP_CodeSniffer, probably in PhpStorm for convenience.

Composer seems to want PHP installed on my development computer (which is separate from my server...). Is there an alternative to this? Or how should Composer be installed without PHP on my local machine?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

最单纯的乌龟 2025-02-13 03:37:20

作曲家似乎希望在我的开发计算机上安装PHP(这与我的服务器分开...)。有其他选择吗?

在本地计算机上安装PHP的另一种选择是在本地机器的虚拟环境中安装PHP。

您可以使用Docker做到这一点。 php docker映像: https://hub.docker.com/__/php

另外在您的Docker映像中:

” 。在该容器中,您可以安装所需的所有软件包并运行作曲家。

最后,PHP和作曲家未直接在本地机器上安装,而是将它们安装在本地计算机上的Docker(在容器中)的虚拟环境中。

Composer seems to want PHP installed on my development computer (which is separate from my server...). Is there an alternative to this?

An alternative of having PHP installed on your local machine, is to install PHP in a virtual environment of your local machine.

You can do this with Docker. PHP Docker image: https://hub.docker.com/_/php

Additionally install Composer in your Docker image: https://getcomposer.org/download/

Then you can bash into the Docker container. In that container you can install all packages you want and run Composer.

At the end, PHP and Composer are not installad on your local machine directly, they are installed in the virtual environment of Docker (in a container) on your local machine.

深府石板幽径 2025-02-13 03:37:20

作曲家似乎希望在我的开发计算机上安装PHP(这与我的服务器分开...)。有其他选择吗?

https://hub.docker.com/_/composer

它将与PHP一起发货。

通常,您不能没有PHP来运行作曲家,因为它需要运行。

只是在作曲家Docker容器中,也有PHP。因此,您通过拉动容器来安装它。


取决于您正在使用的操作系统,如果您担心开发环境,nix-shell(1)nix-env(1)可以比Docker容器更合适,并且具有更大的灵活性。

Composer seems to want PHP installed on my development computer (which is separate from my server...). Is there an alternative to this?

https://hub.docker.com/_/composer

It will ship with PHP.

And in general you can't run Composer without PHP because it needs it to run.

It is just that within the Composer Docker container, there is PHP, too. So you install it by pulling the container.


Depending which operating system you're using and if you're concerned about the development environment(s), nix-shell(1) and nix-env(1) could be appropriate as well with more flexibility than Docker containers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文