When composer require is installed, the difference in the directory tree and the source of the instruction acquisition
P粉463811100
P粉463811100 2023-09-14 17:37:11
0
1
377

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:

  • Checked packagist.org/packages/prestashop/prestashop to confirm that it indeed uses github.com/PrestaShop/PrestaShop/tree/develop as the source
  • Searched Prestashop's Github for any mention of packagist
  • Searched for information on how Composer determines folder structure but only found general information

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

P粉463811100
P粉463811100

reply all(1)
P粉402806175

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!