Forum


Replies: 1   Views: 782
Create a private phpdocx github repository
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by rabol  · 15-04-2023 - 19:55

Hi

I have created several 'normal' Laravel pacakages and private pacakages but never creataed one from code that I have never created.

Does anyone have a guide on how the structure should look like for a composer based project (Laravel) ?

Thanks in advance

Kind regards

Steen

Posted by admin  · 15-04-2023 - 21:10

Hello,

Creating a private repository is very easy. For example, using GitHub:

1. Create a private repository (https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository) and import the SSH keys in your machine/server/docker...

2. Upload the phpdocx namespace package to this private repository adding a custom composer.json file. As explained on Integrate phpdocx with Composer projects composer.json must use classmap to autoload phpdocx classes:

"autoload": {
    "classmap": [
        "vendor/phpdocx/Classes/Phpdocx"
    ]
}

3. Update the composer.json of your project adding the private repository and install it as any other package/repository.

These steps are the same for other Git repositories such as Bitbucket or GitLabs.Please note that this is a Composer question (Using private repositories with Composer) and you can find detailed instructions on many pages. For example:

Learn How to create and publish a composer php package: https://dudi.dev/create-composer-php-package

Using Composer With Private Packages Hosted On Github: https://dudi.dev/composer-private-packages-github-repository

Regards.