Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "4.65.2",
"cliVersion": "4.103.1",
"generatorName": "fernapi/fern-php-sdk",
"generatorVersion": "2.4.0",
"generatorVersion": "2.9.5",
"generatorConfig": {
"clientName": "Brevo",
"namespace": "Brevo",
Expand All @@ -20,6 +20,10 @@
"generateClientInterfaces": true,
"useDefaultRequestParameterValues": true
},
"originGitCommit": "d2e18d0bd27160206c8251e11269b139a3b4ea10",
"sdkVersion": "4.0.13"
"originGitCommit": "1934b60b480a426232f9443e7831353a6f965651",
"originGitCommitIsDirty": true,
"invokedBy": "manual",
"requestedVersion": "5.0.0",
"ciProvider": null,
"sdkVersion": "5.0.0"
}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: "8.3"

- name: Install tools
run: |
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: "8.3"

- name: Install tools
run: |
Expand Down
120 changes: 120 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Contributing

Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.

## Getting Started

### Prerequisites

- PHP 8.1+
- Composer

### Installation

Install the project dependencies:

```bash
composer install
```

### Testing

Run the test suite:

```bash
composer test
```

Or run PHPUnit directly:

```bash
./vendor/bin/phpunit
```

### Linting & Formatting

Fix code style issues:

```bash
./vendor/bin/php-cs-fixer fix
```

### Static Analysis

Run static analysis:

```bash
./vendor/bin/phpstan analyse
```

## About Generated Code

**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated.

### Generated Files

The following directories contain generated code:
- `src/` - API client classes and types
- Most PHP files in the project

### How to Customize

If you need to customize the SDK, you have two options:

#### Option 1: Use `.fernignore`

For custom code that should persist across SDK regenerations:

1. Create a `.fernignore` file in the project root
2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
3. Add your custom code to those files

Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.

For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).

#### Option 2: Contribute to the Generator

If you want to change how code is generated for all users of this SDK:

1. The PHP SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
2. Generator code is located at `generators/php/`
3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
4. Submit a pull request with your changes to the generator

This approach is best for:
- Bug fixes in generated code
- New features that would benefit all users
- Improvements to code generation patterns

## Making Changes

### Workflow

1. Create a new branch for your changes
2. Make your modifications
3. Run tests to ensure nothing breaks: `composer test`
4. Run formatting: `./vendor/bin/php-cs-fixer fix`
5. Run static analysis: `./vendor/bin/phpstan analyse`
6. Commit your changes with a clear commit message
7. Push your branch and create a pull request

### Commit Messages

Write clear, descriptive commit messages that explain what changed and why.

### Code Style

This project uses PHP CS Fixer for automated code formatting. Run `./vendor/bin/php-cs-fixer fix` before committing to ensure your code meets the project's style guidelines.

## Questions or Issues?

If you have questions or run into issues:

1. Check the [Fern documentation](https://buildwithfern.com)
2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues)
3. Open a new issue if your question hasn't been addressed

## License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "getbrevo/brevo-php",
"version": "4.0.13",
"version": "5.0.0",
"description": "Official PHP SDK for the Brevo API.",
"keywords": [
"brevo",
Expand All @@ -20,7 +20,7 @@
"php-http/multipart-stream-builder": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^12.5.22",
"friendsofphp/php-cs-fixer": "3.5.0",
"phpstan/phpstan": "^1.12",
"guzzlehttp/guzzle": "^7.4"
Expand Down
Loading
Loading