{"id":21204027,"url":"https://github.com/phpbrew/onion","last_synced_at":"2026-03-14T01:47:37.375Z","repository":{"id":1888262,"uuid":"2814181","full_name":"phpbrew/Onion","owner":"phpbrew","description":"Onion, The fast approach to build/bundle PEAR/PECL packages for PHP.","archived":false,"fork":false,"pushed_at":"2024-02-16T07:13:42.000Z","size":6181,"stargazers_count":86,"open_issues_count":17,"forks_count":9,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-07-08T20:47:06.442Z","etag":null,"topics":["pear","php"],"latest_commit_sha":null,"homepage":"http://c9s.github.com/Onion/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpbrew.png","metadata":{"files":{"readme":"README.ja.md","changelog":"Changes.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-11-20T15:18:09.000Z","updated_at":"2024-11-26T00:39:58.000Z","dependencies_parsed_at":"2024-05-29T12:26:30.559Z","dependency_job_id":null,"html_url":"https://github.com/phpbrew/Onion","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/phpbrew/Onion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbrew%2FOnion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbrew%2FOnion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbrew%2FOnion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbrew%2FOnion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpbrew","download_url":"https://codeload.github.com/phpbrew/Onion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpbrew%2FOnion/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545157,"owners_count":23625403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pear","php"],"created_at":"2024-11-20T20:28:39.910Z","updated_at":"2026-03-14T01:47:32.330Z","avatar_url":"https://github.com/phpbrew.png","language":"PHP","readme":"Onion\n=====\n\nOnion, The fast approach to make/install/bundle PEAR packages for PHP.\n\nOnion is able to generate a PEAR2-compatible package.xml file from a very simple config\nfile, you can release your PEAR package very quickly!\n\nAnd through Onion, you can also install PEAR dependencies into local bundle (just like Ruby Bundler).\n\nOnion is not target to replace other package manager, its target is to make current PEAR ecosystem easier.\n\nLet's keep hard long PEAR package.xml away! :-)\n\n\u003c!--\n[![Build Status](https://secure.travis-ci.org/c9s/Onion.png)](http://travis-ci.org/c9s/Onion)\n--\u003e\n\n## Onion is for people want to..\n\n* Build PEAR package easily, quickly.\n* Install PEAR dependencies into local project directory. (like Ruby Bundler)\n\n## What People Say\n\nnrk: \n\n    its own package.ini file looks simple enough to edit and maintain.\n\n    It's been super-easy to get up and running and I haven't encountered any real\n    problems.  Onion looks good already.  \n\n2011-12-18 \u003chttps://github.com/nrk/predis/commit/104cd1eae7f3fb2bff3ccd3193c3e31b8502af56\u003e\n\n## Requirement\n\n* PHP 5.3\n* simplexml extension\n* DOMDocument extension\n* curl\n\n## The minimal spec file\n\n```ini\n[package]\nname = Onion\ndesc = package description\nversion = 0.0.1\nauthor = Yo-An Lin \u003ccornelius.howl@gmail.com\u003e\nchannel = pear.php.net\n```\n\n## A Quick tutorial for building PEAR package\n\nGet and install onion:\n\n    $ curl -s http://install.onionphp.org/ | sh\n\nPlease make sure your directory structure:\n\n    src/   # contains php source code\n    doc/   # documentation files (optional)\n    tests/ # unit testing files\n\nFill your `package.ini` file:\n\n    [package]\n    name = Onion\n    desc = package description\n    version = 0.0.1\n    channel = pear.php.net\n    author = Yo-An Lin \u003ccornelius.howl@gmail.com\u003e\n\nTo generate a package.xml 2.0 spec file for PEAR and build a PEAR package, just run:\n\n    $ onion build --pear\n\nThen Your PEAR package is out!\n\nThe `--pear` flag is optional.\n\nSee:\n\n    $ onion help build\n\n## Adding package dependencies\n\n    [package]\n    name = Onion\n    desc = package description\n    version = 0.0.1\n    author = Yo-An Lin \u003ccornelius.howl@gmail.com\u003e\n    channel = pear.php.net\n\n    [require]\n    php = 5.3\n    pearinstaller = 1.4\n    pear.php.net/PackageName = 0.0.1\n\n## Bundle\n\nInstall PEAR dependencies into vendor/ directory\n\n    $ onion install\n\n## Compile package to Phar executable/library file\n\nAn example, we use onion to compile our executable file `onion`:\n\n    $ onion compile \\\n        --executable \\\n        --classloader \\\n        --bootstrap scripts/onion.embed \\\n        --lib src \\\n        --lib ../CLIFramework/src \\\n        --lib ../GetOptionKit/src \\\n        --output onion\n\n## Available Config Tags\n\nplease checkout [doc/SPEC.md](https://github.com/c9s/Onion/blob/master/doc/SPEC-v2.md)\n\n## Version Naming\n\nversion naming standard from PEAR group: \u003chttp://pear.php.net/manual/en/rfc.version-naming.standard.php\u003e\n\n## Customize roles\n\nThere are many built-in roles so that you don't need to define it by yourself, built-in roles are:\n\n- src/   php role\n- docs/  doc role\n- tests/ test role\n- \\*.md  doc role\n\nBut you can add custom roles by yourself.\n\n```ini\n[roles]\npath/to/data = data\npath/to/library = php\npath/to/doc = doc\n```\n\n\nA more detailed example\n========================\n\n    [package]\n    name        = your package name\n    desc        = package description\n    summary     = ....                  # optional, default to Description\n    homepage    = http://your.web.com   # optional\n    license     = PHP                   # optional, default to PHP\n    version     = 0.0.1\n    version.api = 0.0.1                 # optional, default to \"version\"\n    channel     = pear.php.net          # default\n\n    ; lead developer\n    author         = Yo-An Lin \u003ccornelius.howl@gmail.com\u003e\n\n    ; other authors\n    authors[]      = Yo-An Lin \u003ccornelius.howl@gmail.com\u003e\n    authors[]      = Yo-An Lin\n\n\t ; contributors ...\n    contributors[] = ...                # optional\n    maintainers[]  = ...                # optional\n\n    [require]\n    php = '\u003e 5.3'\n    pearinstaller = '1.4.1'\n\n    ; pear package based on channel\n    pear.channel.net/package = 1.1\n\n    ; pear package based on URI\n    package = http://www.example.com/Foo-1.3.0\n    package = conflicts\n\n    extension/reflection = \n    extension/ctype = \n    extension/pcre = \n\n    [roles]\n\n    ; mapping files to role\n    your_script = bin\n\n    ; glob is supported.\n    *.md = doc\n    *.php = php\n\n    [optional remoteshell]\n    hint = Add support for Remote Shell Operations\n    channel/test = 0.1\n    channel/foo = 0.2\n    extensions[] = ssh2\n\n## Hacking\n\nMake a fork from Onion and clone it:\n\n    $ git clone git@github.com:c9s/Onion.git\n    $ cd Onion\n\nRun onion to install dependencies\n\n    $ bin/onion install\n\nTo run unit tests:\n\n    $ phpunit\n\nTo test onion command:\n\n    $ scripts/onion help\n\nTo compile onion:\n\n    $ scripts/compile.sh\n\n### PEAR Features not support yet\n\nCurrent `install` command does not support PEAR special features like:\n\n- PEAR Task: like replace content, rename ... etc\n- PECL installation\n\n## Community\n\nIf you have questions about Onion or want to help out, come and join us in the #onion-dev channel on `irc.freenode.net`.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpbrew%2Fonion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpbrew%2Fonion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpbrew%2Fonion/lists"}