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

Add composer repository #36

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Add composer repository #36

merged 1 commit into from
Aug 30, 2022

Conversation

Erikvv
Copy link
Collaborator

@Erikvv Erikvv commented Jul 29, 2022

This adds a packages.json file which can be read over HTTP from Github by Composer. The previous installation method still works. This packages.json file is maintained manually.

This makes Uplink-PHP behave more like a normal PHP library. This has advantages for a PHP developer managing their project:

  1. composer update can automatically update Uplink-PHP to the latest version

  2. If we release versions which depend on different PHP versions or different PHP libraries, Composer will select the version most compatible with your project.

    Unfortunately composer currently only does a limited check on platform compatibility which does not include OS type, instruction set architecture, and glibc version.

I tested this in a project with commands:

composer config repositories.storj/uplink '{
    "type": "composer",
    "url": "https://raw.githubusercontent.com/storj-thirdparty/uplink-php/composer-repository/"
}' &&
composer require storj/uplink

Then it installs v1.3.0. Then I tried out all the released versions:

composer require storj/uplink:0.1.0
composer require storj/uplink:1.0.0
composer require storj/uplink:1.1.0
composer require storj/uplink:1.2.0
composer require storj/uplink:1.3.0

Solves #35

@Erikvv Erikvv force-pushed the composer-repository branch 2 times, most recently from 7ee60c2 to 4df8e61 Compare July 29, 2022 17:00
This adds a packages.json file which can be read over HTTP from Github by
Composer. The previous installation method still works. This packages.json file
is maintained manually.

This makes Uplink-PHP behave more like a normal PHP library. This has
advantages for a PHP developer managing their project:

1. `composer update` can automatically update Uplink-PHP to the latest version

2. If we release versions which depend on different PHP versions
   or different PHP libraries, Composer will select the version most
   compatible with your project.

   Unfortunately composer currently only does a
   [limited check on platform compatibility](https://getcomposer.org/doc/01-basic-usage.md#platform-packages)
   which does not include OS type, instruction set architecture, and glibc version.

I tested this in a project with commands:

```
composer config repositories.storj/uplink '{
    "type": "composer",
    "url": "https://raw.githubusercontent.com/storj-thirdparty/uplink-php/composer-repository/"
}' &&
composer require storj/uplink
```

Then it installs v1.3.0. Then I tried out all the released versions:

```
composer require storj/uplink:0.1.0
composer require storj/uplink:1.0.0
composer require storj/uplink:1.1.0
composer require storj/uplink:1.2.0
composer require storj/uplink:1.3.0
```

Solves #35
@Erikvv
Copy link
Collaborator Author

Erikvv commented Aug 22, 2022

Asked Brandon to add Clement to the org.

@Erikvv Erikvv merged commit 42c0f85 into main Aug 30, 2022
@Erikvv Erikvv deleted the composer-repository branch August 30, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants