Where should the third-party sdk of yii2 be placed in the project?

for example, where should a Taobao guest"s sdk be placed so that it can load

automatically?
Mar.19,2021

you can configure compser: if you put it in any location.

"autoload": {
    "classmap": [""]
}

is then generated with the command composer dump-autoload .
but not all sdk in Taobao has an entry file such as TopSdk.php file, so you might as well require this file directly when you use it.

A more recommended method is to find an encapsulated class with a namespace on github, such as randomly searching for a https://github.com/ennnnny/tbk.


it's hard to load perfectly without composer.

official documentation:
ide/2.0/tutorial-yii-integration-sharpusing-libs-in-yii" rel=" nofollow noreferrer "> using third-party libraries in Yii2

you can refer to this project and write an auto-loading class.
https://github.com/songyichao.

Menu