feat(php): fill Packagist metadata#3380
Open
countradooku wants to merge 3 commits into
Open
Conversation
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
hubcio
requested changes
Jun 1, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
foreign/php/composer.jsonPackagist metadata: homepage, keywords, authors, support links, and an explicit empty autoload sectionphp-extand add PIEphp-extmetadata for theiggy_phpextensionCloses #3303.
Validation
php -r 'json_decode(file_get_contents("foreign/php/composer.json"), true, flags: JSON_THROW_ON_ERROR);'composer validate --strict foreign/php/composer.jsoncomposer archive --format=zipfromforeign/phpand inspected the archive contentsPATH=/tmp/iggy-addlicense-bin:$PATH prek run --files foreign/php/composer.jsoncargo clippypassed; Go/Java/C# hooks skipped as no relevant files changedNotes
The archive excludes use
composer.jsoninstead of root.gitattributesso Apache source-release archives created withgit archiveare not affected.