php / pie

The PHP Installer for Extensions
BSD 3-Clause "New" or "Revised" License
666 stars 19 forks source link

Support building when package is not in the root directory #84

Closed asgrim closed 5 days ago

asgrim commented 2 weeks ago

From @zeriyoshi - original proposal in #82

Add extension-src directive to the php-ext section in composer.json.

This enables support for patterns where extension source code is not located in the project root, which is commonly seen in third-party extensions.

https://github.com/protocolbuffers/protobuf/tree/main/php/ext/google/protobuf

{
    "name": "google/protobuf",
    "type": "php-ext",
    "description": "protocolbuffers php extension",
    "php-ext": {
        "extension-name": "protobuf",
        "extension-src": "php/ext/google/protobuf"
    }
}

Investigate options, check this makes sense and is clear. Documentation would be needed, and upstream Composer schema support.

asgrim commented 2 weeks ago

I will revisit this after #83 is merged

macintoshplus commented 1 week ago

@asgrim This option can specify the name of the extension DLL?

Other automated scripts already use the zip attached on the GitHub release to install an extension automatically. It's hard to change the dll name into the zip archive without breaking something.

asgrim commented 1 week ago

@asgrim This option can specify the name of the extension DLL?

Other automated scripts already use the zip attached on the GitHub release to install an extension automatically. It's hard to change the dll name into the zip archive without breaking something.

This is an entirely separate issue

asgrim commented 1 week ago

@zeriyoshi I gave this some thought, I think build-path may be a better name for this.

https://github.com/ThePHPF/pie-design/pull/28

If there is no further feedback, please leave it with me, I have a PR updated and also will send a patch upstream to Composer.