hubcio commented on code in PR #3380:
URL: https://github.com/apache/iggy/pull/3380#discussion_r3332792862


##########
foreign/php/composer.json:
##########
@@ -1,14 +1,95 @@
 {
     "name": "apache/iggy-php",
     "description": "PHP extension bindings for Apache Iggy.",
+    "type": "php-ext",

Review Comment:
   flagging for the eventual publish path (out of scope here): public packagist 
can't register a package whose `composer.json` lives in a repo subdirectory - 
it references the source repo root and won't zip subtrees (packagist#472). 
there's no root `composer.json` or split tooling, so `apache/iggy-php` isn't 
installable from this monorepo as-is.



##########
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": {},

Review Comment:
   empty `autoload` is valid but does nothing for a native extension - there's 
no php source to autoload, the module ships as a compiled `.so`. cleaner to 
drop the key entirely.



##########
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": {

Review Comment:
   these excludes are package-root-relative (the `foreign/php/` dir), so the 
leading-slash repo-root paths like `/core`, `/bdd`, `/web`, `/.github`, 
`/foreign/csharp` never match anything here - only `/tests`, 
`/phpunit.xml.dist`, `/Dockerfile.test`, `/docker-compose.test.yml`, `/target`, 
`/vendor` actually exist under this dir. separately, `archive.exclude` only 
affects the `composer archive` cli. when someone `composer require`s this, 
packagist serves the github zipball and PIE's `composer-default` builds from 
the github source zip - both honor `.gitattributes export-ignore`, not 
`archive.exclude`. so once publishing is wired this whole block gets ignored. a 
scoped `foreign/php/.gitattributes` with `export-ignore` does what you want 
here - keeps the root `git archive` source release untouched (your stated 
reason for avoiding root `.gitattributes`) while actually filtering the real 
download path.



##########
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": [

Review Comment:
   `pre-packaged-binary` makes PIE look for github release assets named like 
`php_iggy_php-{ver}_php{X.Y}-{arch}-{os}-{libc}-nts.zip`. nothing produces 
those yet, so PIE silently falls through to `composer-default` and builds from 
source. harmless - that's exactly why the fallback is second - just noting this 
entry is aspirational until a release-asset workflow exists.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to