Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide pre-built DLLs from Private Packagist #110

Open
macintoshplus opened this issue Nov 19, 2024 · 5 comments
Open

Provide pre-built DLLs from Private Packagist #110

macintoshplus opened this issue Nov 19, 2024 · 5 comments
Labels
enhancement New feature or request maintainer feedback needed Needs details or feedback to be added by maintainers

Comments

@macintoshplus
Copy link

Some companies or state organizations do not allow the servers or the developer's computer to access the Internet. Others have a private PHP extension. I use the Satis term to speak of the private packagist.

I try to understand how PIE works with a private composer repository and how to get the DLL to install it. Without reading the code ;-)

I have tried with Satis and xdebug. The installation has noway.

Composer repository and satis generated files do not contain the PHP extension configuration to build or get the DLL.

For each package information provided by Satis, this is the minimal information:

{
    "name": "smarty/smarty",
    "version": "3.1.7",
    "dist": {
        "url": "https://www.smarty.net/files/Smarty-3.1.7.zip",
        "type": "zip"
    }
}

This information is minimal for PHP library. But for PHP extension, some other information is needed: DLL download information, and compilation options...

I have this idea of JSON structure for an extension package

{
    "name": "xdebug/xdebug",
    "version": "3.1.7",
    "sources": {
        "url": "https://xdebug.org/files/xdebug-3.1.7.zip",
        "type": "zip"
        "reference": "tags/3.1.7"
    }
    "dist": {
        "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-ts-vs17-x86_64.zip",
        "type": "zip"
    },{
        "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-ts-vs17-x86.zip",
        "type": "zip"
    },{
        "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-nts-vs17-x86_64.zip",
        "type": "zip"
    },{
        "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-nts-vs17-x86.zip",
        "type": "zip"
    }
}

The source archive contains the composer.json file with the build options and other information. However, no information about the DLLs.

With the public packagist, PIE gets the DLL from the Release Asset and searches the right archive corresponding with the name template (see doc).

How to download DLL from Satis or another private composer repository?

@macintoshplus
Copy link
Author

@Seldaek, this change has an impact on the composer?

@Seldaek
Copy link

Seldaek commented Nov 21, 2024

Yes this would not be doable as you describe just in pie I suppose, unless pie stores/retrieves this stuff in the extra key.

@macintoshplus
Copy link
Author

Yes this would not be doable as you describe just in pie I suppose, unless pie stores/retrieves this stuff in the extra key.

Okay, this schema is possible:

{
    "name": "xdebug/xdebug",
    "version": "3.1.7",
    "dist": {
        "url": "https://xdebug.org/files/xdebug-3.1.7.zip",
        "type": "zip"
    }
   "extra": {
        "windows-dist": {
            "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-ts-vs17-x86_64.zip",
            "type": "zip"
        },{
            "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-ts-vs17-x86.zip",
            "type": "zip"
        },{
            "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-nts-vs17-x86_64.zip",
            "type": "zip"
        },{
            "url": "https://www.smarty.net/files/Smarty-3.1.7-8.4-nts-vs17-x86.zip",
            "type": "zip"
        }
    }
}

@asgrim asgrim changed the title How to use a private packagist to provide an extension? Provide pre-built DLLs from Private Packagist Nov 21, 2024
@asgrim asgrim added the enhancement New feature or request label Nov 21, 2024
@asgrim
Copy link
Collaborator

asgrim commented Nov 21, 2024

I'm starting to understand what you're asking for now. You are asking for another way of downloading pre-built DLLs (your use case being that you cannot use public internet).

At the moment, the only supported way PIE fetches DLLs is by downloading from the release assets on a GH release: https://github.com/php/pie/blob/main/docs/extension-maintainers.md#windows-support

We can evaluate in the future other ways of downloading prebuilt DLLs such as this, but this isn't something I'll be able to look at just yet.

@asgrim asgrim added the maintainer feedback needed Needs details or feedback to be added by maintainers label Nov 21, 2024
@macintoshplus
Copy link
Author

This feature can be used by the maintainer in the composer.json found in the version package. In this case, the Packagist must copy the information.

Now you use the GitHub release feature, but some other SVC systems exist and some other source code hosting exists (Zoho, Bitbucket, GitLab...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintainer feedback needed Needs details or feedback to be added by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants