2017 © Pedro Peláez
 

library composition

image

bamarni/composition

  • Friday, March 18, 2016
  • by bamarni
  • Repository
  • 6 Watchers
  • 106 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Composition Build Status

Composition provides a lightweight and generic API, that you can use to check your environment at runtime, instead of manually go checking for regex in constants, classes/functions existence, matching a version against a class constant, ..., (*1)

It only works when using Composer as package management tool., (*2)

Some examples

A single command to check your PHP environment : ``` php if (!\Composition::has('vendor/super-package', '>=2.0') { $this->markTestSkipped('The following tests require "SuperPackage" to be at least at 2.0'); }, (*3)

\Composition::has('php', '5.4.*'); \Composition::has('ext-mongo');, (*4)


Check the platform : ``` php if (\Composition::isWindows()) { // ... }

Note

This tool should mostly be used in your unit tests, and not be abused in production., (*5)

The Versions

18/03 2016

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires

18/03 2016

v1.0.0

1.0.0.0

  Sources   Download

The Requires

 

The Development Requires