diff --git a/doc/config-schema.md b/doc/config-schema.md index b82b6d6cdff..e23892bf1eb 100644 --- a/doc/config-schema.md +++ b/doc/config-schema.md @@ -135,6 +135,7 @@ This document describes the schema for the librarian.yaml. | `go` | [GoModule](#gomodule-configuration) (optional) | Contains Go-specific library configuration. | | `java` | [JavaModule](#javamodule-configuration) (optional) | Contains Java-specific library configuration. | | `nodejs` | [NodejsPackage](#nodejspackage-configuration) (optional) | Contains Node.js-specific library configuration. | +| `php` | [PHPPackage](#phppackage-configuration) (optional) | Contains PHP-specific library configuration. | | `python` | [PythonPackage](#pythonpackage-configuration) (optional) | Contains Python-specific library configuration. | | `rust` | [RustCrate](#rustcrate-configuration) (optional) | Contains Rust-specific library configuration. | | `swift` | [SwiftPackage](#swiftpackage-configuration) (optional) | Contains Swift-specific library configuration. | @@ -190,6 +191,7 @@ This document describes the schema for the librarian.yaml. | `go` | [GoAPI](#goapi-configuration) (optional) | Contains Go-specific API configuration. | | `java` | [JavaAPI](#javaapi-configuration) (optional) | Contains Java-specific API configuration. | | `nodejs` | [NodejsAPI](#nodejsapi-configuration) (optional) | Contains Node.js-specific API configuration. | +| `php` | [PHPAPI](#phpapi-configuration) (optional) | Contains PHP-specific API configuration. | ## GoDefault Configuration @@ -418,6 +420,17 @@ This document describes the schema for the librarian.yaml. | `metadata_name_override` | string | Allows the name field in .repo-metadata.json to be overridden. | | `name_pretty_override` | string | Allows the name_pretty field in .repo-metadata.json to be overridden. | +## PHPAPI Configuration + +| Field | Type | Description | +| :--- | :--- | :--- | +| `migration_mode` | string | Controls migration mode setting for the PHP generator (e.g. "NEW_SURFACE_ONLY"). | + +## PHPPackage Configuration + +| Field | Type | Description | +| :--- | :--- | :--- | + ## PythonDefault Configuration | Field | Type | Description | diff --git a/internal/config/config.go b/internal/config/config.go index 939084ba1ac..3038dcc9cdf 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -330,6 +330,9 @@ type Library struct { // Nodejs contains Node.js-specific library configuration. Nodejs *NodejsPackage `yaml:"nodejs,omitempty"` + // PHP contains PHP-specific library configuration. + PHP *PHPPackage `yaml:"php,omitempty"` + // Python contains Python-specific library configuration. Python *PythonPackage `yaml:"python,omitempty"` @@ -423,6 +426,9 @@ type API struct { // Nodejs contains Node.js-specific API configuration. Nodejs *NodejsAPI `yaml:"nodejs,omitempty"` + + // PHP contains PHP-specific API configuration. + PHP *PHPAPI `yaml:"php,omitempty"` } // GoDefault defines Go-specific default configuration. diff --git a/internal/config/language.go b/internal/config/language.go index e394198f047..d9e3fb05711 100644 --- a/internal/config/language.go +++ b/internal/config/language.go @@ -804,3 +804,13 @@ type NodejsAPI struct { // Path is the source path. Path string `yaml:"path,omitempty"` } + +// PHPPackage contains PHP-specific library configuration. +type PHPPackage struct { +} + +// PHPAPI represents configuration for a single API within a PHP package. +type PHPAPI struct { + // MigrationMode controls migration mode setting for the PHP generator (e.g. "NEW_SURFACE_ONLY"). + MigrationMode string `yaml:"migration_mode,omitempty"` +}