Are there plans to build in composer? This is a pretty important feature for us since most of our themes manage packages with composer. We could use composer outside of the container but that would lead to potential version mismatches.
Hi @greghunt . Welcome to DevKinsta! You should still be able to use Composer on your sites once a site has been created on DevKinsta. It would be installed locally rather than on the Docker container. Have you experienced any issues implementing Composer on a site?
Hi Michael, thanks for the reply. Yes the trouble is I may have a PHP version mismatch when using composer. For example my OS currently runs php8 but my kinsta site may be running 7.4 in its container. So if I run composer locally I may get errors with confused PHP versions
Backing this request up.
We also develop lotâs of WP sites with composer, so it would be great to have that included.
Hi @aaronmeder @greghunt . I see what you mean. Youâre correct that itâd need to do used from within the container but I understand that may not be ideal. Iâll move this over to our feature request section for our devs to take a look at.
@aaronmeder @greghunt
Until this is part of DevKinsta, there is a simple and easy way to install composer on your DevKinsta.
Cheers
Thank you for sharing @nemanjac !
Hi,
Is there already a update? Because this hash is not valid anymore and we can not install composer.
Hi @jasperheidebrink, this should work if you use the current installer checksum found at the top of this page: https://composer.github.io/pubkeys.html
Iâll ask our developers to look into this feature request again as well.
Hello @nemanjac thanks for your answer, do you know if there is an option to use this on MacOS system?
Hello @DavidME Welcome to DevKinsta Community!
I donât have/use Mac here (but Linux Ubuntu), and as I could check/see, those command-lines shared by manjac ( Thank you Nemanja Cimbaljevic!) should be able to be run on Mac machines as well.
In order to do so, first you can run/open the Terminal
program on your Mac.
Then on your Terminal
program, you can type this command (that will log you in to your local devkinsta_fpm
dockerâs container) :
docker exec -it devkinsta_fpm bash
After that, you can follow the next steps/commands provided there - start from line #5.
Note that on line #9 , you will just need to change that line to the following:
php -r âif (hash_file(âsha384â, âcomposer-setup.phpâ) === â55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eaeâ) { echo âInstaller verifiedâ; } else { echo âInstaller corruptâ; unlink(âcomposer-setup.phpâ); } echo PHP_EOL;â
that random number ( 55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae
) is taken from the current âInstaller Checksum (SHA-384)â section here: https://composer.github.io/pubkeys.html
Once done, you can test to call the composer
in that devkinsta_fpm
container with something like this ( as shown on line #20 in that github page - to check its version ) :
composer --version
You can then type: exit
to quit from that devkinsta_fpm
container (and may want to close your Terminal
program).
I also ran the above command lines on my Linux machine and the composer
seems to be running fine there .
Cheers,
Agus