Skip to content

feat(php): fill Packagist metadata - #3380

Merged
hubcio merged 7 commits into
apache:masterfrom
countradooku:feat/php-packagist-metadata
Jun 9, 2026
Merged

feat(php): fill Packagist metadata#3380
hubcio merged 7 commits into
apache:masterfrom
countradooku:feat/php-packagist-metadata

Conversation

@countradooku

Copy link
Copy Markdown
Contributor

Summary

  • fill out foreign/php/composer.json Packagist metadata: homepage, keywords, authors, support links, and an explicit empty autoload section
  • switch the package type to php-ext and add PIE php-ext metadata for the iggy_php extension
  • add archive exclusions so Composer package archives stay scoped to the PHP extension source and omit dev/test/vendor output

Closes #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.json
  • composer archive --format=zip from foreign/php and inspected the archive contents
  • PATH=/tmp/iggy-addlicense-bin:$PATH prek run --files foreign/php/composer.json
  • pre-push hook: cargo clippy passed; Go/Java/C# hooks skipped as no relevant files changed

Notes

The archive excludes use composer.json instead of root .gitattributes so Apache source-release archives created with git archive are not affected.

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
countradooku marked this pull request as ready for review May 30, 2026 04:17
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label May 30, 2026
Comment thread foreign/php/composer.json Outdated
Comment thread foreign/php/composer.json
Comment thread foreign/php/composer.json
Comment thread foreign/php/composer.json Outdated
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels 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
@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 5, 2026
@countradooku

Copy link
Copy Markdown
Contributor Author

/ready

Comment thread foreign/php/composer.json
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels 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
@countradooku

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 8, 2026
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.49%. Comparing base (578f024) to head (c91ced1).

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     
Components Coverage Δ
Rust Core 75.59% <ø> (+0.21%) ⬆️
Java SDK 58.44% <ø> (ø)
C# SDK 69.92% <ø> (ø)
Python SDK 81.06% <ø> (ø)
PHP SDK 83.57% <ø> (ø)
Node SDK 91.53% <ø> (+0.27%) ⬆️
Go SDK 40.20% <ø> (ø)
see 533 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio
hubcio merged commit d70a7a8 into apache:master Jun 9, 2026
51 checks passed
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP SDK: fill out Packagist metadata

5 participants