allegro / php-protobuf

PHP Protobuf - Google's Protocol Buffers for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to composer require ?

sm2017 opened this issue · comments

How can I require allegro/php-protobuf using composer?

In composer.json

{
    "require": {
        "pear/console_commandline": "^1.2"
    }
}

there is no package name

The composer.json you see is to specify the requirements for the protoc plugin that comes with php-protobuf, not for making php-protobuf installable by composer. The last time I checked the composer was not able to install a PHP extension. There is ongoing project (pickle) that aims to solve this issue. All you can do is to specify in your composer.json that you require a given extension to be installed (it means you need to install it before running composer install by hand, using an OS-specific package manager or equivalent). There is one more thing that @christophermancini proposed. We can make php-protobuf installable by composer but it would mean manual build and installation of an extension. Why? Because the only thing that composer installation can give us at this point is to put extension sources to the vendor directory. Here you can find how Christopher handles it.

To make this extension installable on most of the operating systems is to publish this extension to the PECL. I have tried it once but unfortunately the project was not mature enough at that time and it's publication was rejected. It's time I will try once again.

Solved #78