Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

127 lines (107 sloc) 4.611 kB


  • system-wide install support
  • install dir option support

  • support github installation

  • bundle dependencies into ./local/ and ./onion.lock (json)
  • quite option should also disable downlaod progress

  • compile command: which compile source into phar file.

  • dist: make php package.
  • support github dependency.
  • separate CLIFramework to repository.

Compile Command

  • support setSignatureAlgorithm through openssl.pem file $phar->setSignatureAlgorithm(Phar::OPENSSL, file_get_contents('private_key_here.pem'));
  • replace @php_dir@

PEAR Channel Discover


<?xml version="1.0" encoding="UTF-8" ?>
<channel version="1.0" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
    <summary>Corneltek PEAR channel</summary>
                <baseurl type="REST1.0"></baseurl>
                <baseurl type="REST1.1"></baseurl>
                <baseurl type="REST1.2"></baseurl>
                <baseurl type="REST1.3"></baseurl>



<a xmlns="" xmlns:xsi="" xmlns:xlink="" xsi:schemaLocation="">

rest/r/{packagename}/allrelease2.xml deps.0.0.4.txt (unserialize) latest.txt v2.0.0.4.xml beta.txt (version number) stable.txt (version number)

get/CLIFramework-0.0.1.tar get/GetOptionKit-0.0.6.tgz

Package Install

  • Parse package.ini to Package object
    • build dependency arguments pure array contains type: pear, library, extension or other dependency
  • pass package object to dependency resolver dependency resolver get the dependency informations expand the dependency to package object for pear package: discover channel info and save it retrieve the name, version, dependency from channel check if the dependency already exists, if not add it to dependency pool expand the dependency to package object... expand done. use installer to install these packages from dependency pool for pear package check if current package is installed

        if it's installed
            check if upgrade is needed if dep is not locked.
        if it's not installed
            run pear package installer
                - fetch pear package from channel (get channel from channel pool).
                - extract pear pacakge.
                - parse package.xml.
                - A Simple PackageXml Parser.
                    - PackageXml Dependency Parser.
                    - PackageXml Content Installer.
                        - install-as 
                        - dir traversal
                    - Parse PackageXml to Package.
                - install content files into base library.
                - return pear lib path 
                    and installed version to installer.
    for library package
        run LibraryPackage installer
            check if the same library installed (by name or resource)
            fetch library from resource (url,git,svn or hg)
                to target baseurl
                return library path 
                    and installed revision 
                    or version to installer
  • package xml writer.

  • Resolve Package dependency

    • PearChannel Resource Handler => convert to Package object.
    • Other Resource Handler (like git or svn)
  • Dependency manager
    • Dependency Pool
  • Installer

  • Dependency Lock file generator.

  • Auto Classloader generator (PSR-0)

  • Cache channel and packages info

  • Dependency Lock file reader
Jump to Line
Something went wrong with that request. Please try again.