M
M
may-cat2014-04-02 19:57:19
Composer
may-cat, 2014-04-02 19:57:19

How to use Composer correctly?

I'm trying to get into using Composer. Intriguing is a lively community and ample opportunities, but for me there are several critical points.
I would be grateful for clarifications, I read the API mana, but did not fully understand it.
1. Correct me if I misunderstood.
Let's say I've created a folder and I want to install packages there using composer. I drop composer.phar there and create composer.json. In the latter, I specify which packages I want to install.
2. Can I add some php-script connection in composer.json, and already in the script make an interactive shell in which the user will select the packages he needs?
3. My super duper framework (myfrmwrk) has a bad structure that I can't change. I have additional packages for this framework (myfrmwrk.feature1, myfrmwrk.feature2, myfrmwrk.feature3). The problem is that each "feature" should upload its files to different folders in the framework, for example, models - in one folder, views - in another.
Do I understand correctly that with the help of the included php script specified in composer.json, I can make my own "folder spreader"?
4. Continuing question (3) with poor folder structure of subordinate packages.
Where should the instructions for the composer be located to allow spreading files into different folders - in myfrmwrk/composer.json or in myfrmwrk.feature1/composer.json?
5. What happens if I try to install any standard package? Like jquery? Can I control where it falls?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Gusakov, 2014-04-02
@may-cat

1) yes , you can also install globally
2) no
3) you can, custom installer
4) see
when it's not needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question