Include support for php's Composer dependency manager
Completed
Many php applications and developers are migrating from pear to composer for dependency management.
Composer allows different web applications to install different versions of the the same libraries for different applications, making it ideal for shared hosting.
Ideally this would be a profile option you could select in EasyApache if the php version was recent enough.
In cPanel & WHM version 58, we have installed (PHP) Composer. You can read more about that in our Release Notes, and for more information about how to use Composer read our How to Set Up (PHP) Composer documentation. Let me know what questions you have!
In cPanel & WHM version 58, we have installed (PHP) Composer. You can read more about that in our Release Notes, and for more information about how to use Composer read our How to Set Up (PHP) Composer documentation. Let me know what questions you have!
Relevant blog article summarizing php dev's attitude towards pear and composer:
http://benramsey.com/blog/2013/11/the-fall-of-pear-and-the-rise-of-composer/
Relevant blog article summarizing php dev's attitude towards pear and composer:
http://benramsey.com/blog/2013/11/the-fall-of-pear-and-the-rise-of-composer/
We use composer on a daily basis, however only advanced users will probably use composer and it's very easy to install from command line.
To install composer you just run the single line from the composer website then you can create an alias to the full path of composer.phar.
What would advantage would installing composer with cPanel have ?
We use composer on a daily basis, however only advanced users will probably use composer and it's very easy to install from command line.
To install composer you just run the single line from the composer website then you can create an alias to the full path of composer.phar.
What would advantage would installing composer with cPanel have ?
cPanel helps define the minimum requirements for web applications, if cPanel shipped composer installed by default it would help tip the entire industry and it would ensure that new developers learn using the right tools from the start.
Its worth noting that phpUnit and symphony have both announced plans to deprecate Pear support entirely.
cPanel helps define the minimum requirements for web applications, if cPanel shipped composer installed by default it would help tip the entire industry and it would ensure that new developers learn using the right tools from the start.
Its worth noting that phpUnit and symphony have both announced plans to deprecate Pear support entirely.
Pear is going to disappear - please take the opportunity to get AHEAD of obsolesnce.
Pear is going to disappear - please take the opportunity to get AHEAD of obsolesnce.
Log into your account with SSH and run the install command directly from there. It will install composer.phar to your home directory. If you want to be able to use it from everywhere on your user account you will then need to either add an alias to composer.phar or instead install composer in a seperate directory like for example ~/bin-composer/ rename composer.phar to just composer and add ~/bin-composer/ to the PATHS variable in your .bashrc file.
Your webhost could also install composer globaly, in the same way and update it with a cronjob. This way all users would have access to the composer command.
i haven't looked into any security implications of installing it globaly but I don't see whey there would be any.Using composer is mostly from command line. Most php developers are presumed to be familiar with command line now.
Log into your account with SSH and run the install command directly from there. It will install composer.phar to your home directory. If you want to be able to use it from everywhere on your user account you will then need to either add an alias to composer.phar or instead install composer in a seperate directory like for example ~/bin-composer/ rename composer.phar to just composer and add ~/bin-composer/ to the PATHS variable in your .bashrc file.
Your webhost could also install composer globaly, in the same way and update it with a cronjob. This way all users would have access to the composer command.
i haven't looked into any security implications of installing it globaly but I don't see whey there would be any.Using composer is mostly from command line. Most php developers are presumed to be familiar with command line now.
Any chance for an instruction walk-through for this? I have been wanting to use composer for some time, but everything I have found in regards to using this with WHM/Cpanel seems like there would be issues. For instance, here is a post I just found talking about compatibility issues - http://forums.cpanel.net/threads/compatibility-issue-found.425241/#post-1718642
In the past I have been able to use a phar version of apps to get around the need for composer, but this isn't always an option provided by the app dev.
If you are truly using this with no issues then please post detailed instructions.
Any chance for an instruction walk-through for this? I have been wanting to use composer for some time, but everything I have found in regards to using this with WHM/Cpanel seems like there would be issues. For instance, here is a post I just found talking about compatibility issues - http://forums.cpanel.net/threads/compatibility-issue-found.425241/#post-1718642
In the past I have been able to use a phar version of apps to get around the need for composer, but this isn't always an option provided by the app dev.
If you are truly using this with no issues then please post detailed instructions.
Most of modern, if not all of the RESTful API's require Composer in order to work.
Most of modern, if not all of the RESTful API's require Composer in order to work.
I've just started using RESTful API's, and literally every single one needs Composer and assumes you have it, unless the service is a really old XML thing. Installing Composer on shared hosting or managed VPS is a nightmare. Just include it. Embrace the present and the future and just include it. There is no good reason not to.
I've just started using RESTful API's, and literally every single one needs Composer and assumes you have it, unless the service is a really old XML thing. Installing Composer on shared hosting or managed VPS is a nightmare. Just include it. Embrace the present and the future and just include it. There is no good reason not to.
monarobase is absolutely correct. Why include something that be ran locally within the cPanel user account only?!...
I am going to put the command between "quotes", don't type them with the quotes!
* Make sure you have PHP compiled with the bz2 & phar libraries (EasyApache)
* login via SSH using the username login & pass (if you login as root, you know how to switch to username: command "su username", if you get an error about shell access, you'll need to modify the cPanel account, check the box to activate Jailed SSH and redo "su username")
* once in the account, make sure you can see "www" by using the command: "ls"
* then command "wget https://getcomposer.org/composer.phar"
* from there you can use composer using the command: "php composer.phar YOUR_COMPOSER_COMMAND_HERE"
here you go~
An example of a composer command will be:
"php composer.phar create-project skyronic/crudkit-template public_html"
monarobase is absolutely correct. Why include something that be ran locally within the cPanel user account only?!...
I am going to put the command between "quotes", don't type them with the quotes!
* Make sure you have PHP compiled with the bz2 & phar libraries (EasyApache)
* login via SSH using the username login & pass (if you login as root, you know how to switch to username: command "su username", if you get an error about shell access, you'll need to modify the cPanel account, check the box to activate Jailed SSH and redo "su username")
* once in the account, make sure you can see "www" by using the command: "ls"
* then command "wget https://getcomposer.org/composer.phar"
* from there you can use composer using the command: "php composer.phar YOUR_COMPOSER_COMMAND_HERE"
here you go~
An example of a composer command will be:
"php composer.phar create-project skyronic/crudkit-template public_html"
I have a question? Are you all looking to just have Composer installed on cPanel boxes by default in an cPanel user accessible directory and run via shell; Or are you looking for a user interface inside of cPanel that lets you setup and run various Composer on a directory via point and click user interfaces?
I have a question? Are you all looking to just have Composer installed on cPanel boxes by default in an cPanel user accessible directory and run via shell; Or are you looking for a user interface inside of cPanel that lets you setup and run various Composer on a directory via point and click user interfaces?
In cPanel & WHM version 58, we have installed (PHP) Composer. You can read more about that in our Release Notes, and for more information about how to use Composer read our How to Set Up (PHP) Composer documentation. Let me know what questions you have!
In cPanel & WHM version 58, we have installed (PHP) Composer. You can read more about that in our Release Notes, and for more information about how to use Composer read our How to Set Up (PHP) Composer documentation. Let me know what questions you have!
Replies have been locked on this page!