# PECL site improvements

- Thread: https://externals.io/message/69551
- Original archive: https://news-web.php.net/php.internals/69551
- Started by Anatol Belski on 2013-10-14T11:34:50+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #69551 — Anatol Belski — 2013-10-14T11:34:50+00:00

URL: https://externals.io/message/69551#69551

Hi,

there are two improvements just implemented to the PECL website.

I

Every package is required to have LICENSE or COPYING to be present in
the root of the package. The goal is to enforce the conformance with at
least PHP and BSD licenses. Where by no explicit check for exact license
type is done, it's considered as a good practice to include the license.
Also, the licenses will be included into the windows binary packages. To
add that file to the tarball, just add a line like this to the root dir
in the package.xml

<file name="LICENSE" role="doc" />

II

Every package is required to have the macros PHP_MYEXTNAME_VERSION to be
defined in one of the headers in the root of the package. The goal is to
fix discrepancy between `phpinfo()` and PECL site extension versions
shown. I guess it happened almost to everyone at least once to
unintendingly forget to sync both version strings before the release.

The actual macros name is guessed using <name> and <providesextension>
tags from package.xml. The common definition format is

#define PHP_MYEXTNAME_VERSION "1.2.3"

That macros should be then used in the zend_module_entry defining the
extension module. The macros name has to match the exact pattern, not
MYEXTNAME_VERSION, MYEXTNAME_VERSION_STRING, MYEXT_VERSION_STR or else
because there can be other extension specific macros defined and could
possibly lead to ambiguity. Say the ext can have PHP_MYEXT_VERSION_STR
and PHP_MYEXT_VERSION_ID, so then it's hard to guess.

I'm going to walk through the extensions and fix this definitions in the
next days, but if you'll need to release before it's done, please fix it
yourself.


That's it, please ping me if you think there's a bug in one of those
changes.

Regards

Anatol

---

## #69552 — johannes@schlueters.de — 2013-10-14T11:54:23+00:00

URL: https://externals.io/message/69551#69552 · In reply to: #69551

Hi,


> I'm going to walk through the extensions and fix this definitions in the
> next days, but if you'll need to release before it's done, please fix it
> yourself.

Please also update ext/skeleton in php-src accordingly. Also
README.SELF-CONTAINED-EXTENSIONS and others might eventually need an
update.

johannes

---

## #69553 — Anatol Belski — 2013-10-14T12:05:32+00:00

URL: https://externals.io/message/69551#69553 · In reply to: #69552

Hi Johannes,

On Mon, 2013-10-14 at 13:54 +0200, Johannes Schlüter wrote: 
> Hi,
> 
> 
> > […]
> 
> Please also update ext/skeleton in php-src accordingly. Also
> README.SELF-CONTAINED-EXTENSIONS and others might eventually need an
> update.

thanks for the hint, I wasn't aware of those places. Will touch them as
well.

Regards

Anatol
