search

Home  >  Q&A  >  body text

How to introduce third-party libraries in symfony2?

The way I understand it is mainly through Composer or git.

How can I introduce self-written libraries (not hosted on git or submitted to Packagist) and some open platform SDKs into the project?

The first thing I thought of was to integrate these libraries by implementing a Bundle and then introduce them into the symfony project. I would like to know how friends with experience in this area implement it. It is best to describe it in detail. Thank you!

高洛峰高洛峰2800 days ago591

reply all(3)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-16 16:46:40

    Refer to the phpfig specification and composer package production.

    reply
    0
  • 阿神

    阿神2017-05-16 16:46:40

    Just click include and require
    Be more elegant and use composer

    reply
    0
  • 高洛峰

    高洛峰2017-05-16 16:46:40

    https://github.com/happen-zhang
    There is a symfony2 tutorial in it, and it seems to be mentioned in the chapter about search

    When adding other third-party libraries, there is generally no need to include, composer is enough. But you can also load it manually, and most standard third parties can autoload.

    reply
    0
  • Cancelreply