Contributing to the PHP SDK

We welcome contributions! To set up your development environment and run tests, follow these steps.

Dev Environment Setup

  1. Clone the repository.
  2. Install dependencies via Composer:
    composer install

Running Tests

You must set environment variables to point to a valid OSS test bucket and credentials.

export OSS_ACCESS_KEY_ID=<your-id>
export OSS_ACCESS_KEY_SECRET=<your-secret>
export OSS_ENDPOINT=<your-endpoint>
export OSS_BUCKET=<your-test-bucket>

Run the test suite using PHPUnit:

php vendor/bin/phpunit

Coding Standards

Please ensure your code follows standard PHP PSR guidelines. Add unit tests for any new features or bug fixes.

Submitting Changes

  1. Fork the repo.
  2. Create a feature branch.
  3. Submit a Pull Request with a clear description of the changes.