Why does the source code of PHPWord contain no vendor folder?

Source: Internet
Author: User
Tags phpword composer install
In PHPWordbootstrap. php: {code...} but here: github. comPHPOffice... does not see the vendor folder? What's going on? In PHPWord/bootstrap. php
Medium:

$vendorDirPath = realpath(__DIR__ . '/vendor');if (file_exists($vendorDirPath . '/autoload.php')) {    require $vendorDirPath . '/autoload.php';} else {    throw new Exception(        sprintf(            'Could not find file \'%s\'. It is generated by Composer. Use \'install --prefer-source\' or \'update --prefer-source\' Composer commands to move forward.',            $vendorDirPath . '/autoload.php'        )    );}

But here: https://github.com/PHPOffice...
The vendor folder is not displayed?
What's going on?

Reply content:

In PHPWord/bootstrap. php
Medium:

$vendorDirPath = realpath(__DIR__ . '/vendor');if (file_exists($vendorDirPath . '/autoload.php')) {    require $vendorDirPath . '/autoload.php';} else {    throw new Exception(        sprintf(            'Could not find file \'%s\'. It is generated by Composer. Use \'install --prefer-source\' or \'update --prefer-source\' Composer commands to move forward.',            $vendorDirPath . '/autoload.php'        )    );}

But here: https://github.com/PHPOffice...
The vendor folder is not displayed?
What's going on?

The composer should be generated after being installed.
Without using the composer package management, there is no vendor.

The Exception in throw has been clearly written.

You develop a project to manage package dependencies through composer, and then open-source it to github. However, the third-party libraries you depend on do not need to be placed in the version controller.
You only needcomposer.jsonPut the file,read.meThe installation method is usually described in the file for you to runcomposer install,
ThereforevendorIgnore, git ignorevendorThe method is in.gitignoreAdd this directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.