Answer the question
In order to leave comments, you need to log in
How to package composer project into phar?
Trying Nette Framework, made a sandbox project to check if the remote server satisfies the requirements of the framework. The result is the following directory structure:
If you copy the entire project to htdocs, and open localhost/sandbox/www/, then the application page opens.
I need to copy a project to a subdirectory inside public_html on a remote beget.com server.
Just copy it as it is? Then all service files of the project will get to production. Is this right?
I'm not a PHP expert, I'm a Java developer, so I don't know how it's done in PHP.
Ideally, I would like to package the project in phar, but I can't figure out how to package the composer project in phar. Can't google anything. I am using the humbug/box package. It works fine on CLI script. How do they package a web app with composer? I do the same with CLI, I get phar, but from the console it gives an error like index.php was not found inside phar. In general, if someone has packaged the composer of a web application in a phar, I would like advice, because google only gives retellings of the documentation and no working examples.
Answer the question
In order to leave comments, you need to log in
use git to store and deploy the project, and composer install on a remote server to deploy. Of course, you do not need to store vendor files in the repository
Just upload all these files to the hosting, and rename www to public_html
There are special tools for project deployment.
For small teams and solo developers, capistrano is the way to go. And its php clones: deployer, rocketeer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question