raylib-php icon indicating copy to clipboard operation
raylib-php copied to clipboard

Composer

Open RobLoach opened this issue 5 years ago • 2 comments

Can haz composer require Raylib???

RobLoach avatar Mar 31 '20 00:03 RobLoach

@RobLoach Composer cannot install native PHP extensions only PECL can which means I need to apply to have my package here: https://pecl.php.net/packages.php

You can require an extension, but it only checks if its installed i.e:

{
  "name": "myproejct/example",
  "require": {
    "php": ">=7.4.0",
    "swiftmailer/swiftmailer": "5.3.0",
    "ext-raylib": "*"
  }
}

PECL doesn't run on Windows, so it's not something a Windows user can run. Instead, Windows users go to https://windows.php.net/downloads/pecl/releases/ and download the DLLs for native extensions.

There were two efforts on this, one was getting this into Composer, but its stalled. Another effort was Pickle https://github.com/FriendsOfPHP/pickle and there is a PR as well for Composer to integrate but both efforts have died out. Pickle should still be usable, but again for Windows I am not sure how complex the setup is. Pickle still requires the package to be available via PECL.

joseph-montanez avatar Mar 31 '20 10:03 joseph-montanez

Thanks for the investigation! Looks like PECL/Pickle may be the way to go, if effort picks up again. Easiest may be repositories of asking to build the packages by self.

RobLoach avatar Mar 31 '20 12:03 RobLoach