# Contributing

Contributions are welcome! Here's how to get started.

## Development Setup

```bash
git clone git@github.com:inodrahq/php-sui-sdk.git
cd php-sui-sdk
composer install
```

This package depends on `inodrahq/bcs`. For local development against the BCS source, add a path repository to your `composer.json`:

```json
{
    "repositories": [
        { "type": "path", "url": "../php-bcs" }
    ]
}
```

## Running Tests

```bash
composer test
```

698 tests covering BCS types, cryptography, transport layers, transaction building, and parity with reference implementations.

## Static Analysis

```bash
composer analyse
```

PHPStan level 8 is enforced on all source code (excluding auto-generated Proto files).

## gRPC / Protobuf

The `src/Proto/` directory contains auto-generated protobuf classes. To regenerate:

```bash
composer proto:generate
```

Requires `protoc` and `grpc_php_plugin` to be installed.

## Pull Requests

1. Fork the repository and create a branch from `main`
2. Add tests for any new functionality
3. Ensure all tests pass and PHPStan reports no errors
4. Keep commits focused and write clear commit messages
5. Open a pull request against `main`

## Code Style

- Follow PSR-12 coding standards
- Use strict types (`declare(strict_types=1)`) in all files
- Type all parameters, return types, and properties

## Reporting Issues

- Use GitHub Issues for bug reports and feature requests
- For security vulnerabilities, see [SECURITY.md](SECURITY.md)
