从客户端到服务器运行PHP Composer命令

We have a php project shared on a server on our local network. Developers are working on the same project using the client pcs. Now we need to run the composer commands on the main project without giving them access to our main server. Is it possible to run php composer commands from local client to local server?

First off all do not let clients to access composer by any means as the can upload a shell directly to your server and all of your hosted domains can be hacked.

Let's guess you have no problem with this issue,

  1. you have to be confirm that composer is accessible from command line directly. composer ** ** like this

  2. use exec, shell_exec etc command from any php script directly.

  3. Be sure that all of your clients have permission to access composer (if you are in linux)

Note: It is a very bad practice to let them get access to composer. Your server may be compromised.