Skip to main content
Topic: Composer (Read 6101 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Composer

I know we don't want to use Composer because some people won't have it installed and that's another thing we'd need to support. Instead of having the users run Composer commands, can we, as developers, use Composer to install third-party stuff and then distribute it?

Re: Composer

Reply #1

What is Composer ?

Re: Composer

Reply #2

It's the first item in a Google search for "composer".

Re: Composer

Reply #3

LOL Joshua ;D
~ SimplePortal Support Team ~

Re: Composer

Reply #4

This ?

 https://getcomposer.org/

Re: Composer

Reply #5

Quote from: Joshua Dickerson – I know we don't want to use Composer because some people won't have it installed
Actually that's not entirely true, at least for me (and if I said that I was probably drunk).
I'm fine with Composer, I used it in OpenImporter. What I think we should pay attention is the way we release: at the moment is not uncommon people pick the whole repo and just overwrite the existing files. Using Composer this could be a bit more tricky, so I'd like to have a more frequent release cycle before switching to Composer (let's say once a month), or at least have a "buildbot" releasing nightly builds, so that anyone wanting to test the code could just download and play with it.
At the moment I have a spare-to-be-dismissed VPS that I can redirect to be a buildbot, there is "just" to write the backend. O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: Composer

Reply #6

FYI, if it helps, another project I follow use Composer for its development environment but builds a snapshot of the libraries into the release version for use on Shared Hosting. That could be a way to go, then, and you'd also encourage more people to use release versions (aka stable) on shared hosting which is what most people will have, rather than trying to use development nightlies.

Re: Composer

Reply #7

Why can't shared hosts use Composer? It uses a Phar which is just PHP. The only reason they wouldn't is because they are using an old version of PHP (< 5.3) and I thought the next version will require >= 5.3.

Re: Composer

Reply #8

Quote from: Joshua Dickerson – Why can't shared hosts use Composer? It uses a Phar which is just PHP. The only reason they wouldn't is because they are using an old version of PHP (< 5.3) and I thought the next version will require >= 5.3.

It's pretty hard to install Composer on a shared host if it's not already there. And most of the big hosts don't care enough to cater to people who want special features.

Re: Composer

Reply #9

You don't need to install Composer. It's a Phar. You can just drop it in and run it.

The only issue would be if you don't have shell access. There is a solution - http://stackoverflow.com/a/26277355 but I suspect that many hosts would still not allow the requisite commands.

For that, we could just use Composer's API. Looking for some tutorials on how to do that now.

Re: Composer

Reply #10

Quote from: Joshua Dickerson – You don't need to install Composer. It's a Phar. You can just drop it in and run it.

The only issue would be if you don't have shell access. There is a solution - http://stackoverflow.com/a/26277355 but I suspect that many hosts would still not allow the requisite commands.

For that, we could just use Composer's API. Looking for some tutorials on how to do that now.

Non-jailed shell access is the biggest problem, yep.

Re: Composer

Reply #11

Quote from: Eliana Tamerin – FYI, if it helps, another project I follow use Composer for its development environment but builds a snapshot of the libraries into the release version for use on Shared Hosting. That could be a way to go, then, and you'd also encourage more people to use release versions (aka stable) on shared hosting which is what most people will have, rather than trying to use development nightlies.
Yep, that was my idea when I wrote the post above: have a cron that builds snapshots on a... daily basis for example. And when a release is ready, prepare the package including all the dependencies (i.e. add a step to the packaging procedure to run composer).
Bugs creator.
Features destroyer.
Template killer.

Re: Composer

Reply #12

I am trying to install Pimple via Composer in a branch. I want to commit Pimple but it seems that vendor files are ignored. Should I just unignore it, commit, then ignore changes again or is there another strategy that people are using to add to vendor? Is vendor not supposed to be used like that?

Re: Composer

Reply #13

Why not just the composer.json? Apart from what I wrote above. :P
Bugs creator.
Features destroyer.
Template killer.

Re: Composer

Reply #14

I added it to composer.json and it doesn't get committed because /vendor/* is in .gitignore.