M
M
Michael2016-04-05 00:52:09
Yii
Michael, 2016-04-05 00:52:09

How to set up composer to work with Yii2 and my own project on it?

Greetings.
I want to make a project on Yii-2, upload it to a turnip, and use it as a start application.
Those. to load, say, a json file that has my project as a dependency, perform an update, and he deployed my project, loaded Yii2 itself, and then went through all the dependencies.
But the trouble is, if I make a dependency on my project, and that one has Yii2 in its dependencies, then in the end it loads Yii, and pushes my project inside the vendor.
And I can't find articles on how to do it.
PS Let's say I have a clean server. I put composer there

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Then I put my project
composer require myname/myproject
in the end it creates a directory tree like this
vendor
   ...
   myname
       myproject
            main
                config
                controllers
                modules
                ...
            index.php
            .htaccess

and I want him to create
main
    config
    controllers
    modules
    vendor
    ...
index.php
.htaccess
...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SilverSlice, 2016-04-05
@SilverSlice

composer create-project

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question