Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP PEAR/PECL type #300

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions PURL-TYPES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,19 @@ including container images built by Docker and others:
pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest
pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1

pear
----
``pear`` for PEAR and PECL PHP packages:

- The default repository for PEAR is ``https://pear.php.net``. The default repository for PECL is ``https://pecl.php.net/``.
- The ``namespace`` is the channel of the package. The domain portion of the channel MUST be lowercased.
- The ``name`` is not case sensitive
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the standard case? is this normalized to lower case? Is there a spec/doc for this?
For instance, https://pecl.php.net/package/ApacheAccessor points to a proper page, and so is https://pecl.php.net/package/apacheaccessor but this is not true for https://pecl.php.net/rest/p/apacheaccessor/info.xml which is OK, but https://pecl.php.net/rest/p/ApacheAccessor/info.xml is not. So it seems that the name IS case insensitive BUT normalized to lowercase or something else.... if you could research this, it would be great.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pombredanne wouldn't the behavior of the CLI take prescende over how their site is configured? In the CLI, the case doesn't matter. From the site though it doesn't seem like it's normalized to lowercase

- The ``version`` is the version of the package
- Examples:
LaurentGoderre marked this conversation as resolved.
Show resolved Hide resolved

pkg:pear/pear.php.net/[email protected]
pkg:pear/pecl.php.net/[email protected]

pub
----
``pub`` for Dart and Flutter packages:
Expand Down Expand Up @@ -588,8 +601,6 @@ Other candidate types to define:
- ``openwrt`` for OpenWRT packages:
- ``osgi`` for OSGi bundle packages:
- ``p2`` for Eclipse p2 packages:
- ``pear`` for Pear PHP packages:
- ``pecl`` for PECL PHP packages:
- ``perl6`` for Perl 6 module packages:
- ``platformio`` for PlatformIO packages:
- ``ebuild`` for Gentoo Linux portage packages:
Expand Down
36 changes: 36 additions & 0 deletions test-suite-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,5 +550,41 @@
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "valid php pecl purl",
"purl": "pkg:pear/pecl.php.net/[email protected]",
"canonical_purl": "pkg:pear/pecl.php.net/[email protected]",
"type": "pear",
"namespace": "pecl.php.net",
"name": "APCu",
"version": "5.1.23",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "valid php pecl purl without version",
"purl": "pkg:pear/pecl.php.net/APCu",
"canonical_purl": "pkg:pear/pecl.php.net/APCu",
"type": "pear",
"namespace": "pecl.php.net",
"name": "APCu",
"version": null,
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "valid php pear purl",
"purl": "pkg:pear/pear.php.net/[email protected]",
"canonical_purl": "pkg:pear/pear.php.net/[email protected]",
"type": "pear",
"namespace": "pear.php.net",
"name": "Text_Password",
"version": "1.2.1",
"qualifiers": null,
"subpath": null,
"is_invalid": false
}
]