When developers are ready to package their distributions, how to avoid to forget some dependencies.
PHP_CompatInfo (alias PHPCI) is a PHP library that parse any data source (file, directory) to find out the minimum version and extensions required for it to run. A CLI tool is available, giving results without to write a line of code.
PHPCI is here to improve your code stability for distribution, and learn some statistics (namespaces, traits, interfaces, classes, functions, constants, extensions) about existing code.
PHPCI takes advantage of new features in PHP 5.2 or greater.
Before you install PHP_CompatInfo, you will need an operating system with PHP 5.2.1 or later installed.
|PEAR Installer 1.9.0||Used to install other PEAR packages|
|PEAR Console_CommandLine 1.2.0||Command-line base engine of PHPCI tool|
|Bartlett PHP_Reflect 1.6.2||PHP parser used by PHPCI to detect elements such as namespaces, traits, interfaces, classes, constants|
|dom extension||Used by the PHPCI CLI tool to read XML configuration|
|libxml extension||Used by the PHPCI CLI tool to read XML configuration|
|pcre extension||Used by the base class of PHPCI|
|SPL extension||Used by the base class of PHPCI|
|Reflection extension||Used by the base class of PHPCI|
Once all of the dependencies have been installed, you can then install PHPCI using the standard PEAR installer. Run the following commands as root (on Linux, OSX, and other UNIX-like operating systems) or as a user with administrator privileges on Windows.
$ pear channel-discover bartlett.laurent-laville.org $ pear install -o php_compatinfo
PHP_CompatInfo could be installed as RPM, using the package installer.
In Fedora, from official repository.
In Enterprise Linux (RHEL, CentOS, Scientific Linux, Oracle Linux, …), from the EPEL repository.
# yum install php-bartlett-PHP-CompatInfo
PHPCI 2.0 basically handle more than 60 references. Each new major version may included some new references.
All documentation are available online and for download in several formats.
Head to the PHP_CompatInfo User Guide for information or examples to get started.
The PHP_CompatInfo book is available in a selection of formats. You can download the documentation for offline reading.
|Single HTML file||Many HTML files||HTML Help file||PDF A4 file||PDF US file||EPUB file|
PHPCI is open-source software, licensed under the BSD license.
The full legal text of the BSD 3-clause license is given below.
Copyright (c) 2010-2013, Laurent Laville <email@example.com> Credits to : * Davey Shafik Original author, he introduced his proposal in 2004, that gave birth of a PEAR package named PHP_CompatInfo. * Remi Collet Contributor on many extensions and unit tests since version 2.0.0RC2 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.