M
M
Monitorkin2016-10-17 00:16:29
Yii
Monitorkin, 2016-10-17 00:16:29

How to update Yii2 via composer if I moved my project folders to a level above pullic_html?

Hello, I'm learning, don't kick me too hard on this.
I took yii2-app-basic with its initial structure and put it on the server in the pullic_html folder:

pullic_html/
  |-assets/
  |-commands/
  |-controllers/
  |-mail/
  |-models/
  |-runtime/
  |-tests/
  |-vendor/
  |-views/
  |-web/
  |-<a href="https://github.com/yiisoft/yii2-app-basic/blob/master/composer.json">composer.json</a>

The guys advised for security to leave only the contents of the web folder in the pullic_html/ folder, and move the rest to a higher level, after that we got the following structure (the contents of the web folder were moved to pullic_html, and all other folders were moved to the site folder):
site/
  |-assets/
  |-commands/
  |-controllers/
  |-mail/
  |-models/
  |-runtime/
  |-tests/
  |-vendor/
  |-views/
pullic_html/
composer.json

How can I correctly compose composer.json so that I can update Yii2 in this state through composer? How to specify new paths?
If I just transfer composer.json, then when I try to update, I get:
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - yiisoft/yii2 2.0.9 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - Installation request for yiisoft/yii2 >=2.0.5 -> satisfiable by yiisoft/yii2[2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.d> for further common problems.

Maybe you shouldn't put everything in the site folder?, but in this case, it turns out a lot of their yii2 folders and server folders. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-10-17
@Monitorkin

there will be no heap if
-mysite
-- public_html // web content here -- yii // everything
else
with the composer is the same as usual, only run composer update from the yii folder,
but the composer error is unlikely due to the project structure,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question