Home  >  Q&A  >  body text

When composer require is installed, the difference in the directory tree and the source of the instruction acquisition

When I install Prestashop via composer require prestashop/prestashop:^8 I get the following structure in the folder where the installation occurs:

root@localhost:prestashop-composer# tree . -L 1
.
├── composer.json
├── composer.lock
├── modules
├── themes
└── vendor

The rest of the Prestashop code I saw on github.com/PrestaShop/PrestaShop/tree/develop is placed in vendor/prestashop/prestashop. (Related: When I download Prestashop's ZIP distribution the traditional way, vendor/prestashop/prestashop doesn't exist there because all the Prestashop code is in the root directory.)

How did

Composer decide to put only modules and themes here, and the rest in vendor? It must be indicated by some configuration file, but I can't find it.

I checked some contents:

(This problem is part of the "composer require prestashop/prestashop" installation, but some folders are missing)

P粉463811100P粉463811100424 days ago410

reply all(1)I'll reply

  • P粉402806175

    P粉4028061752023-09-15 14:38:13

    If you want to use composer to install Prestashop as a project, you just need to run composer create-project prestashop/prestashop in the project directory.

    composer require prestashop/prestashop:^8 actually installs Prestashop v8 as a dependency of the current project, which I don't think is what you want to achieve.

    reply
    0
  • Cancelreply