From dfee3dec57fe7459e89abb75a1f855109cec2bdd Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Wed, 25 Sep 2024 09:12:58 +0100 Subject: [PATCH] Add support-nts flag for php-ext section (#12127) * Add support-nts flag for php-ext section Ref: https://github.com/ThePHPF/pie-design/pull/25 * Update php-ext getter/setter definition with support-nts --- res/composer-schema.json | 6 ++++++ src/Composer/Package/Package.php | 2 +- src/Composer/Package/PackageInterface.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/res/composer-schema.json b/res/composer-schema.json index e6f626dcb..ba62d21a4 100644 --- a/res/composer-schema.json +++ b/res/composer-schema.json @@ -311,6 +311,12 @@ "example": false, "default": true }, + "support-nts": { + "type": "boolean", + "description": "Does this package support non-Thread Safe mode", + "example": false, + "default": true + }, "configure-options": { "type": "array", "description": "These configure options make up the flags that can be passed to ./configure when installing the extension.", diff --git a/src/Composer/Package/Package.php b/src/Composer/Package/Package.php index 9d1b0ffc1..ad17538d6 100644 --- a/src/Composer/Package/Package.php +++ b/src/Composer/Package/Package.php @@ -595,7 +595,7 @@ class Package extends BasePackage /** * Sets the list of paths added to PHP's include path. * - * @param array{extension-name?: string, priority?: int, support-zts?: bool, configure-options?: list}|null $phpExt List of directories. + * @param array{extension-name?: string, priority?: int, support-zts?: bool, support-nts?: bool, configure-options?: list}|null $phpExt List of directories. */ public function setPhpExt(?array $phpExt): void { diff --git a/src/Composer/Package/PackageInterface.php b/src/Composer/Package/PackageInterface.php index b7c9ecd45..6e723d5bb 100644 --- a/src/Composer/Package/PackageInterface.php +++ b/src/Composer/Package/PackageInterface.php @@ -326,7 +326,7 @@ interface PackageInterface /** * Returns the settings for php extension packages * - * @return array{extension-name?: string, priority?: int, support-zts?: bool, configure-options?: list}|null + * @return array{extension-name?: string, priority?: int, support-zts?: bool, support-nts?: bool, configure-options?: list}|null */ public function getPhpExt(): ?array;