2acb033057
* extends BaseDumper, implements interface * put $keys into BaseDumper * WIP WIP WIP WIP * BaseDumper for utilities * interface to enforce 'dump()' * feature: * supports git * supports zip output * basic test to cover feature * add @todo for later * add vendor namespace to package name * add extension to getFilename() so we don't need to switch in there (HT, @naderman) * add extension (obviously 'zip' in ZipDumper) * create archive in destination dir (provided by __construct()) * condensed ZipDumper * moved code to BaseDumper (hopefully easier re-use) * use ProcessExecutor from BaseDumper * fix assignments in __construct() * allow injection of ProcessExecutor * fix parameters * fix regex * write in 'system temp dir' * update test case (oh look, a duplicate regex) * move working directory related to BaseDumper * add quotes * place holder for these methods * use PharData to create zip/tar when necessary * add placeholder calls * add call to package() using PharData * finish downloadHg(), downloadSvn() * put to use * make BaseDumper abstract (to force extension) * make BaseDumper implement Interface (makes for less code in the implementation) new functionality for dumping as .tar.gz tar instead of tar.gz, new abstract dumpertest class creates a local git repo instead of fetching a remote one more oo-ish version of it no constructor * refactor tests to be less linux-specific (used Composer\Util to wrap calls) * make filename only the version * various cs fixes (idention, tabs/spaces, doc blocks, etc.) * fixed a typo'd exception name * refactored downloading: * removed download*() methods * added dep on Composer\Factory to setup a DownloadManager instance * update CS with feedback from @stof * ArrayDumper doesn't extend BaseDumper anymore (hence no conflict on the interface) * move keys from BaseDumper back to ArrayDumper * interface now declares dump() to always return void Apparently I had to update the lock. CS fixes (tabs for spaces) Bugfix: sprintf() was missing. Fix docblock for @stof. ;) Pull in lock from master. Update lock one more time (hope it still merges). whitespace Revert ArrayDumper static keys |
||
---|---|---|
bin | ||
doc | ||
res | ||
src | ||
tests | ||
.gitignore | ||
.travis.yml | ||
CHANGELOG.md | ||
LICENSE | ||
PORTING_INFO | ||
README.md | ||
composer.json | ||
composer.lock | ||
phpunit.xml.dist |
README.md
Composer - Dependency Management for PHP
Composer is a dependency manager tracking local dependencies of your projects and libraries.
See https://getcomposer.org/ for more information and documentation.
Installation / Usage
-
Download the
composer.phar
executable or use the installer.$ curl -sS https://getcomposer.org/installer | php
-
Create a composer.json defining your dependencies. Note that this example is a short version for applications that are not meant to be published as packages themselves. To create libraries/packages please read the guidelines.
{ "require": { "monolog/monolog": ">=1.0.0" } }
-
Run Composer:
php composer.phar install
-
Browse for more packages on Packagist.
Installation from Source
To run tests, or develop Composer itself, you must use the sources and not the phar file as described above.
- Run
git clone https://github.com/composer/composer.git
- Download the
composer.phar
executable - Run Composer to get the dependencies:
cd composer && php ../composer.phar install
You can now run Composer by executing the bin/composer
script: php /path/to/composer/bin/composer
Global installation of Composer (manual)
Since Composer works with the current working directory it is possible to install it in a system wide way.
- Change into a directory in your path like
cd /usr/local/bin
- Get Composer
curl -sS https://getcomposer.org/installer | php
- Make the phar executable
chmod a+x composer.phar
- Change into a project directory
cd /path/to/my/project
- Use Composer as you normally would
composer.phar install
- Optionally you can rename the composer.phar to composer to make it easier
Global installation of Composer (via homebrew)
Composer is part of the homebrew-php project.
- Tap the homebrew-php repository into your brew installation if you haven't done yet:
brew tap josegonzalez/homebrew-php
- Run
brew install josegonzalez/php/composer
. - Use Composer with the
composer
command.
Updating Composer
Running php composer.phar self-update
or equivalent will update a phar
install with the latest version.
Contributing
All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.
Fork the project, create a feature branch, and send us a pull request.
To ensure a consistent code base, you should make sure the code follows the Coding Standards which we borrowed from Symfony.
If you would like to help take a look at the list of issues.
Community
Mailing lists for user support and development.
IRC channels are on irc.freenode.org: #composer for users and #composer-dev for development.
Stack Overflow has a growing collection of Composer related questions.
Requirements
PHP 5.3.2 or above (at least 5.3.4 recommended to avoid potential bugs)
Authors
Nils Adermann - naderman@naderman.de - http://twitter.com/naderman - http://www.naderman.de
Jordi Boggiano - j.boggiano@seld.be - http://twitter.com/seldaek - http://seld.be
See also the list of contributors who participated in this project.
License
Composer is licensed under the MIT License - see the LICENSE file for details
Acknowledgments
- This project's Solver started out as a PHP port of openSUSE's Libzypp satsolver.
- This project uses hiddeninput.exe to prompt for passwords on windows, sources and details can be found on the github page of the project.