Use composer in plugin

Discussion in 'Plugin Help' started by PJZ9n, Jun 18, 2020.

  1. PJZ9n

    PJZ9n Spider

    Hello. I wanted to use composer in a plugin. However, I have found that putting the vendor in the plugin's phar file causes the multiple include issue. Are there any best practices to avoid this?

    The solution I've come up with is for the user to composer require or install in the PocketMine root directory. However, PM does not allow you to do this because PocketMine-MP.phar contains vendor.

    And by including the vendor in the plugin's phar file, the composer system is sometimes pointless. and increase the file size of the plugin. use Poggit CI, I can only think of committing the vendor to GitHub.

    In this regard, the best way is to use the virion framework, but it cannot use the existing libraries configured with composer and cannot manage the dependencies. We can support virion according to the license, but that is not realistic.

    I've been troubled by this for a long time, but I still don't get an answer. What are the best practices for this?


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.