2017 © Pedro Peláez
 

library composer-repository-model

composer repository (aka `packages.json`) model builder component

image

phramz/composer-repository-model

composer repository (aka `packages.json`) model builder component

  • Wednesday, March 18, 2015
  • by Maximilian Reichel
  • Repository
  • 2 Watchers
  • 5 Stars
  • 150 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

php-composer-repository-model

Build Status SensioLabsInsight HHVM Status Scrutinizer Code Quality, (*1)

composer repository (aka packages.json) model builder component, (*2)

With this library you'll be able to - retrieve a packages.json from any repository (e.g. Packagist or a private Satis) reachable via HTTP - serialize or deserialize the json-data - build up an object-oriented model - browse through the model, including referenced files like includes and providers, (*3)

This library is early alpha so keep in mind that anything may change in future releases!, (*4)

Requirements

  • PHP 5.3.3 or higher

Installation

The best way to install is using Composer:, (*5)

  • either edit your composer.json any add an requirement

``` json "require": { "phramz/composer-repository-model": "dev-master" }, (*6)


- or let composer do that for you

php composer.phar require phramz/composer-repository-model, (*7)


## License This library is licensed under the MIT license. For further information see LICENSE file. ## Configuration There's no configuration at all, just use it. ## Usage ```php use Phramz\Component\ComposerRepositoryModel\Service\RepositoryService; // create an instance of the RepositoryService $service = new RepositoryService(); // fetch and parse the `packages.json` from `https://packagist.org` echo $service // [packages.json] ->buildModel( 'https://packagist.org', 'packages.json' ) // [packages.json][provider-includes] ->getProviderIncludes() // [packages.json][provider-includes][p/provider-archived$%hash%.json] ->get('p/provider-2013$%hash%.json') // [packages.json][provider-includes][p/provider-archived$0123456789.json][providers] ->getProviders() // [packages.json][provider-includes][...][providers][p/phramz/doctrine-annotation-scanner$0123456789.json] ->get("phramz/doctrine-annotation-scanner") // [packages.json][provider-includes][...][providers][...][packages] ->getPackages() // [packages.json][provider-includes][...][providers][...][packages][phramz/doctrine-annotation-scanner] ->first() // [packages.json][provider-includes][...][providers][...][packages][...][v1.0.0] ->last() // [packages.json][provider-includes][...][providers][...][packages][...][v1.0.0][source] ->getSource() // [packages.json][provider-includes][...][providers][...][packages][...][v1.0.0][source][url] ->getUrl(); // ... will output `https://github.com/phramz/doctrine-annotation-scanner.git`

Known issues

  • None, so far ...

Contributions

Pull-Requests are always welcome! If you're going to contribute please make sure that: - your PR passes the travis-build - your coding-style is PSR-2 compliant, (*8)

The Versions

18/03 2015

dev-master

9999999-dev

composer repository (aka `packages.json`) model builder component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

repository composer packagist crawler satis indexer