From 2c1e709b3aeb57de2d6ee52cf603566233cf556b Mon Sep 17 00:00:00 2001 From: Diaconu Radu-Mihai <52667211+countradooku@users.noreply.github.com> Date: Sat, 30 May 2026 07:13:50 +0300 Subject: [PATCH 1/2] feat(php): fill Packagist metadata The PHP SDK composer manifest only had the minimum fields, which left the package thin for Packagist and PIE publication. Fill in discovery metadata, PIE extension metadata, and archive exclusions so the package has the expected Composer shape before publication is enabled. Constraint: PIE extension packages require type php-ext and php-ext metadata; the extension name must be the publishable underscore form. Rejected: Root .gitattributes export-ignore | it would affect Apache source-release git archives that intentionally package the full repository. Confidence: high Scope-risk: narrow Directive: Keep archive exclusions compatible with running composer archive from foreign/php so source-build files such as Cargo.toml and .cargo/config.toml stay packaged. Tested: php JSON_THROW_ON_ERROR decode of foreign/php/composer.json Tested: composer validate --strict foreign/php/composer.json Tested: composer archive --format=zip from foreign/php and inspected archive contents Tested: PATH=/tmp/iggy-addlicense-bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/opt/homebrew/bin:/Users/radudiaconu/.vite-plus/bin:/Users/radudiaconu/.codex/tmp/arg0/codex-arg0noojQ9:/Users/radudiaconu/.opencode/bin:/opt/homebrew/opt/ruby/bin:/opt/homebrew/lib/ruby/gems/4.0.0/bin:/Users/radudiaconu/.local/bin:/Users/radudiaconu/Library/Application Support/Herd/bin/:/Users/radudiaconu/.bun/bin:/opt/zerobrew/bin:/Users/radudiaconu/.zerobrew/bin:/Users/radudiaconu/.cargo/bin:/Users/radudiaconu/Library/Application Support/JetBrains/Toolbox/scripts:/Users/radudiaconu/Library/Android/sdk/platform-tools:/Applications/Codex.app/Contents/Resources:/Users/radudiaconu/Library/Application Support/JetBrains/Toolbox/scripts prek run --files foreign/php/composer.json --- foreign/php/composer.json | 83 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/foreign/php/composer.json b/foreign/php/composer.json index d7175ac2c8..492afa73b1 100644 --- a/foreign/php/composer.json +++ b/foreign/php/composer.json @@ -1,14 +1,95 @@ { "name": "apache/iggy-php", "description": "PHP extension bindings for Apache Iggy.", + "type": "php-ext", "license": "Apache-2.0", - "type": "library", + "homepage": "https://iggy.apache.org", + "keywords": [ + "apache", + "iggy", + "messaging", + "streaming", + "message-streaming", + "event-streaming", + "php-extension", + "rust-extension" + ], + "authors": [ + { + "name": "Apache Iggy (Incubating) Contributors", + "homepage": "https://iggy.apache.org" + } + ], + "support": { + "docs": "https://iggy.apache.org/docs/", + "issues": "https://github.com/apache/iggy/issues", + "source": "https://github.com/apache/iggy/tree/master/foreign/php" + }, "require": { "php": ">=8.3" }, "require-dev": { "phpunit/phpunit": "^10.5" }, + "autoload": {}, + "php-ext": { + "extension-name": "iggy_php", + "support-zts": false, + "support-nts": true, + "configure-options": [], + "download-url-method": [ + "pre-packaged-binary", + "composer-default" + ] + }, + "archive": { + "exclude": [ + "/.asf.yaml", + "/.claude", + "/.config", + "/.dockerignore", + "/.github", + "/.gitignore", + "/.markdownlint.json", + "/.markdownlint.yml", + "/.pre-commit-config.yaml", + "/.taplo.toml", + "/.typos.toml", + "/AGENTS.md", + "/ASF_LICENSE.txt", + "/CLAUDE.md", + "/CONTRIBUTING.md", + "/Cargo.lock", + "/DISCLAIMER", + "/Dockerfile", + "/PULL_REQUEST_TEMPLATE.md", + "/about.hbs", + "/about.toml", + "/assets", + "/bdd", + "/cliff.toml", + "/codecov.yml", + "/core", + "/docker-compose.yml", + "/examples", + "/foreign/csharp", + "/foreign/cpp", + "/foreign/go", + "/foreign/java", + "/foreign/node", + "/foreign/python", + "/helm", + "/justfile", + "/rust-toolchain.toml", + "/web", + "/Dockerfile.test", + "/docker-compose.test.yml", + "/phpunit.xml.dist", + "/target", + "/tests", + "/vendor" + ] + }, "scripts": { "test": "phpunit" } From 944622c655caa5f53bee945e279e20c216346dca Mon Sep 17 00:00:00 2001 From: Diaconu Radu-Mihai <52667211+countradooku@users.noreply.github.com> Date: Mon, 1 Jun 2026 16:09:54 +0300 Subject: [PATCH 2/2] fix(php): use export-ignore for package archive Review pointed out that Composer archive exclusions are package-root relative and do not affect the GitHub source archives that Packagist and PIE consume. Move package filtering into a scoped foreign/php .gitattributes file and drop the empty native-extension autoload key. Constraint: Public Packagist and PIE source fallback consume GitHub archives that honor export-ignore attributes, not composer archive.exclude. Rejected: Root .gitattributes export-ignore | would affect Apache source-release archives for the full repository. Confidence: high Scope-risk: narrow Directive: Keep build-critical PHP extension files such as Cargo.toml, .cargo/config.toml, README.md, src, and scripts packaged. Tested: composer validate --strict foreign/php/composer.json Tested: git check-attr export-ignore for PHP package include/exclude paths Tested: PATH=/tmp/iggy-addlicense-bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/opt/homebrew/bin:/Users/radudiaconu/.vite-plus/bin:/Users/radudiaconu/.codex/tmp/arg0/codex-arg02FDRYS:/Users/radudiaconu/.opencode/bin:/opt/homebrew/opt/ruby/bin:/opt/homebrew/lib/ruby/gems/4.0.0/bin:/Users/radudiaconu/.local/bin:/Users/radudiaconu/Library/Application Support/Herd/bin/:/Users/radudiaconu/.bun/bin:/opt/zerobrew/bin:/Users/radudiaconu/.zerobrew/bin:/Users/radudiaconu/.cargo/bin:/Users/radudiaconu/Library/Application Support/JetBrains/Toolbox/scripts:/Users/radudiaconu/Library/Android/sdk/platform-tools:/Applications/Codex.app/Contents/Resources:/Users/radudiaconu/Library/Application Support/JetBrains/Toolbox/scripts prek run --files foreign/php/composer.json foreign/php/.gitattributes --- foreign/php/.gitattributes | 29 ++++++++++++++++++++++ foreign/php/composer.json | 49 -------------------------------------- 2 files changed, 29 insertions(+), 49 deletions(-) create mode 100644 foreign/php/.gitattributes diff --git a/foreign/php/.gitattributes b/foreign/php/.gitattributes new file mode 100644 index 0000000000..2cb8f7c14c --- /dev/null +++ b/foreign/php/.gitattributes @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +/.gitattributes export-ignore +/.gitignore export-ignore +/Dockerfile.test export-ignore +/composer.lock export-ignore +/docker-compose.test.yml export-ignore +/phpunit.xml.dist export-ignore +/target export-ignore +/target/** export-ignore +/tests export-ignore +/tests/** export-ignore +/vendor export-ignore +/vendor/** export-ignore diff --git a/foreign/php/composer.json b/foreign/php/composer.json index 492afa73b1..93ce131bc7 100644 --- a/foreign/php/composer.json +++ b/foreign/php/composer.json @@ -31,7 +31,6 @@ "require-dev": { "phpunit/phpunit": "^10.5" }, - "autoload": {}, "php-ext": { "extension-name": "iggy_php", "support-zts": false, @@ -42,54 +41,6 @@ "composer-default" ] }, - "archive": { - "exclude": [ - "/.asf.yaml", - "/.claude", - "/.config", - "/.dockerignore", - "/.github", - "/.gitignore", - "/.markdownlint.json", - "/.markdownlint.yml", - "/.pre-commit-config.yaml", - "/.taplo.toml", - "/.typos.toml", - "/AGENTS.md", - "/ASF_LICENSE.txt", - "/CLAUDE.md", - "/CONTRIBUTING.md", - "/Cargo.lock", - "/DISCLAIMER", - "/Dockerfile", - "/PULL_REQUEST_TEMPLATE.md", - "/about.hbs", - "/about.toml", - "/assets", - "/bdd", - "/cliff.toml", - "/codecov.yml", - "/core", - "/docker-compose.yml", - "/examples", - "/foreign/csharp", - "/foreign/cpp", - "/foreign/go", - "/foreign/java", - "/foreign/node", - "/foreign/python", - "/helm", - "/justfile", - "/rust-toolchain.toml", - "/web", - "/Dockerfile.test", - "/docker-compose.test.yml", - "/phpunit.xml.dist", - "/target", - "/tests", - "/vendor" - ] - }, "scripts": { "test": "phpunit" }