feat(php): fill Packagist metadata - #3380
Merged
Merged
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
countradooku
marked this pull request as ready for review
May 30, 2026 04:17
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
Contributor
Author
|
/ready |
slbotbm
requested changes
Jun 5, 2026
Packagist support metadata should point users at the project chat alongside docs, issues, and source links. The Composer support.chat key keeps the community link in package metadata without changing archive contents or extension behavior. Constraint: Address open PR review suggestion for a Discord support link Confidence: high Scope-risk: narrow Tested: php JSON_THROW_ON_ERROR parse for foreign/php/composer.json Tested: composer validate --strict foreign/php/composer.json Tested: prek run --files foreign/php/composer.json Not-tested: Full Rust workspace checks; metadata-only PHP composer change
Contributor
Author
|
/ready |
hubcio
approved these changes
Jun 9, 2026
spetz
approved these changes
Jun 9, 2026
numinnex
approved these changes
Jun 9, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3380 +/- ##
============================================
+ Coverage 74.28% 74.49% +0.21%
Complexity 943 943
============================================
Files 1245 1240 -5
Lines 121653 121526 -127
Branches 97957 97647 -310
============================================
+ Hits 90370 90531 +161
+ Misses 28326 28044 -282
+ Partials 2957 2951 -6
🚀 New features to boost your workflow:
|
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.