1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Composer & Plugin API

Discussion in 'Development' started by Infernituum, Oct 29, 2017.

  1. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    Hello. Can i use Composer in my plugins to load libraries, e.g RedBeanPHP? And how?
     
  2. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    Yes, check out Sheep, and don't forget to configure poggit.yml if you use Poggit.
     
    jasonwynn10 and Infernituum like this.
  3. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    [Server thread/CRITICAL]: ErrorException: "include_once(../../vendor/autoload.php): failed to open stream: No such file or directory" (EXCEPTION) in "plugins/sheep/src/Sheep/SheepPlugin" at line 28
     
  4. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    file exsists
     

    Attached Files:

  5. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    [16:25:50] [Server thread/CRITICAL]: Could not execute task Sheep\Utils\ScanTask: Class 'React\Promise\Deferred' not found
    [16:25:50] [Server thread/CRITICAL]: Error: "Class 'React\Promise\Deferred' not found" (EXCEPTION) in "plugins/sheep/src/Sheep/Source/PoggitSource" at line 23
     
  6. KnownUnown

    KnownUnown Spider Jockey Poggit Reviewer

    Messages:
    47
    GitHub:
    knownunown
    Hi, I'm the developer of Sheep. That screenshot you posted did not show the correct vendor directory. Can you see if there's a vendor directory in /root/Server/plugins/sheep/?
     
    jasonwynn10 likes this.
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Use the phar from Poggit :/
     
  8. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    Ok. I've installed Sheep phar from poggit... and how to use it?! how to install packages from composer to Sheep and use them?
     
  9. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    That's resolved, i downloaded .phar build. How i can install composer packages to Sheep and use them in my plugin, e.g RedBeanPHP library?
     
  10. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    I meant that you can look at how Sheep uses composer to figure out how to include your own libraries.
     
    jasonwynn10 and Infernituum like this.
  11. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    Solved. But, as tradition, i have a new arror:
     

    Attached Files:

  12. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    Well than it's time to break tradition! Can you show us the file and line that it's talking about please?
     
  13. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    https://redbeanphp.com/index.php - homepage of library. i think that in pocketmine-s standart Bin have not pdo and mysql_pdo. But how i can install them? xD
     
  14. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
     

    Attached Files:

  15. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    help me :c
     
  16. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    You're referncing to a class that apparently doesn't exsit yet. Where do you have said class?
     
  17. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
     

    Attached Files:

  18. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    Can you explain in which file, and where in that file please?
     
  19. Infernituum

    Infernituum Silverfish

    Messages:
    15
    GitHub:
    infernituum
    In file rb.php at line 843
     
  20. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    Hmm, I just don't know. Sorry.
     
  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.