[Guidelines Change] PHP Changes

Tom "spot" Callaway tcallawa at redhat.com
Mon May 21 18:49:25 UTC 2007

Changes were made to http://fedoraproject.org/wiki/Packaging/PHP


The php-common package In Fedora Core 6 and above (version 5.1.6-3.4)
uses new virtual provides to ensure ABI compatility, and usefull macros
to test for it (ref.: /etc/rpm/macros.php in php-devel.)

The new versions provide:
 * php(api): PHP Api Version
 * php(zend-abi) : Zend Module Api No

Older versions only provide:
 * php-api : PHP Api Version

Therefore the guidelines for the PECL Requires section were updated to
include the following information:

%if %{?php_zend_api}0
Requires:     php(zend-abi) = %{php_zend_api}
Requires:     php(api) = %{php_core_api}
Requires:     php-api = %{php_apiver}

Provides:     php-pecl(foo)

This will ensure ABI compatiblity while also maintaining backwards
compatibility with older versions of php.  After FC-6 is deprecated,
maintaining backwards compatiblity should no longer be required in the
guidelines.  The PEAR section just above the PECL section was also
reformatted so that it is contained within wiki code blocks for


The Macros and Scriptlets section of the PHP guidelines now has a
versioned BuildRequires of:

BuildRequires:  php-pear >= 1:1.4.9-1.2

The reason for this is because the macros are only defined after this
version. See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=227190
Bug #227190 for an example of how the current guidelines are confusing.

More information about the fedora-devel-list mailing list