joseph-montanez / raylib-php

PHP 8 Bindings to raylib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Composer

RobLoach opened this issue · comments

Can haz composer require Raylib???

@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.

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.