# PHP Configuration Options

This section details the available configuration options for the PHP SDK. All configuration is managed in the `gen.yaml` file under the `php` section.

## Version and general configuration

```yml
php:
  version: 1.2.3
  packageName: "openapi/openapi"
  namespace: "OpenAPI\\OpenAPI"
```

## Method and parameter management
```yml
php:
  maxMethodParams: 4
```

## Security configuration

```yml
php:
  flattenGlobalSecurity: true
```

## Import management

```yml
php:
  imports:
    option: "openapi"
    paths:
      callbacks: models/Callbacks
      errors: models/Errors
      operations: models/Operations
      shared: models/Components
      webhooks: models/Webhooks
```

### Import paths

## Error and Response Handling

```yml
php:
  clientServerStatusCodesAsErrors: true
  responseFormat: "flat"
  enumFormat: "enum"
```

## Laravel service provider

When a PHP SDK is used within a Laravel application, Speakeasy is able to generate the needed [Service Provider](https://laravel.com/docs/master/providers)
code to support seamless integration.

> ...all of Laravel's core services, are bootstrapped via service providers.
>
> But, what do we mean by "bootstrapped"? In general, we mean registering things, including registering service container bindings, event listeners, middleware, and even routes. Service providers are the central place to configure the application.

To enable the Laravel Service Provider generation, update the `gen.yaml` configuration setting `enabled` to `true`, and set `svcName` appropriately.

```yml
php:
  laravelServiceProvider:
    enabled: true
    svcName: "openapi"
```

### Laravel service provider configuration

## Additional dependencies

```yml
php:
 additionalDependencies: {
    "autoload": {
      "OpenAPI\\OpenAPI\\Lib\\": "lib/"
    },
    "autoload-dev": {
      "OpenAPI\\OpenAPI\\Test\\": "Tests/"
      },
    "require": {
      "firebase/php-jwt": "^6.10",
      "phpseclib/phpseclib": "^3.0"
    },
    "require-dev": {
      "monolog/monolog": "^3.0"
    }
  }
```

### Additional dependencies configuration
