Re: Re: PHP_CompatInfo 2 - roadmap to final stable version

From: Date: Sat, 26 Mar 2011 08:58:09 +0000
Subject: Re: Re: PHP_CompatInfo 2 - roadmap to final stable version
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54185@lists.php.net to get a copy of this message
Le 24/03/2011 22:50, Helgi Þormar Þorbjörnsson a écrit :
Is it easy for me to add more extensions? For example if I have my own extensions which are only used internally in a company but I want PHP_CompatInfo2 to know about them on my setups - Helgi
Hello Helgi, As promised, here are my answer about your issue. PHP_CompatInfo 2 used a base reference system that allow to get informations (interfaces, classes, functions, constants) on a series of extension. Actually, with RC3, 41 extensions are supported, but much more should be available on RC4 and of course final stable version. To know the list: use "phpci" tool with command "list-references" Example: $ phpci list-references Default behavior, is to use only extensions loaded on your platform. But of course you can change that. You need to have your own XML configuration file. Quick run: You use a file "phpcompatinfo.xml" that must be located in (cfg_dir)/PHP_CompatInfo of your PEAR installation. This file will be auto detected by phpci tool. Other run: You use a file named as you want, but you should tells to phpci tool where its located with the --configuration option. Example: $ phpci --configuration=/path/to/my_xml_config_file Next: Your XML configuration file must tell what extension to be detected. <?xml version="1.0" encoding="utf-8" ?> <phpcompatinfo
    reference="PHP5"
    report="summary"
    reportFileAppend="false"
    cacheDriver="file"
    recursive="true"
    fileExtensions="php, inc, phtml"
    consoleProgress="true"
    verbose="false"
... <references>
        <reference name="Core" />
        <reference name="standard" />
<reference name="MY_FIRST_CUSTOM_EXTENSION" /> <reference name="MY_SECOND_CUSTOM_EXTENSION" /> </references> </phpcompatinfo> CAUTION: Only one rule to follow. Extension name (specified here: reference name) must be respect (case sensitive) the name of extension IMPORTANT: In this short example, only 4 extensions will be used. So if you need other, you should have to specify under the <references> tag. Last. Of course you have to make a file named as the extension (but lowercased) Take any extension in distribution as example. SPL is a good one (due to respect of case sensitive). Don't forget in your mind that your custom extension is not know form Autoloader. So you have to load it first before any uses. Hope these explains are enough. If it's not, don't hesitate to ask before sunday evening. After I'll be in aways from any internet access during at least 3 full days. Laurent

« previous php.pear.dev (#54185) next »