PK pAV phpunit.xml.distnu W+A
./tests/Cilex/
PK pAVv,v v
composer.locknu W+A {
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
"hash": "028ed7b39a4c2a5ccba9e34589868ee4",
"packages": [
{
"name": "cilex/console-service-provider",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/Cilex/console-service-provider.git",
"reference": "1.0.0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Cilex/console-service-provider/zipball/1.0.0",
"reference": "1.0.0",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"pimple/pimple": "1.*@dev",
"symfony/console": "~2.1"
},
"require-dev": {
"cilex/cilex": "1.*@dev",
"silex/silex": "1.*@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-0": {
"Cilex\\Provider\\Console": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Beau Simensen",
"email": "beau@dflydev.com",
"homepage": "http://beausimensen.com"
},
{
"name": "Mike van Riel",
"email": "mike.vanriel@naenius.com"
}
],
"description": "Console Service Provider",
"keywords": [
"cilex",
"console",
"pimple",
"service-provider",
"silex"
],
"time": "2012-12-19 10:50:58"
},
{
"name": "pimple/pimple",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/fabpot/Pimple.git",
"reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fabpot/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d",
"reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-0": {
"Pimple": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
}
],
"description": "Pimple is a simple Dependency Injection Container for PHP 5.3",
"homepage": "http://pimple.sensiolabs.org",
"keywords": [
"container",
"dependency injection"
],
"time": "2013-11-22 08:30:29"
},
{
"name": "symfony/console",
"version": "v2.4.2",
"target-dir": "Symfony/Component/Console",
"source": {
"type": "git",
"url": "https://github.com/symfony/Console.git",
"reference": "940f217cbc3c8a33e5403e7c595495c4884400fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/940f217cbc3c8a33e5403e7c595495c4884400fe",
"reference": "940f217cbc3c8a33e5403e7c595495c4884400fe",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/event-dispatcher": "~2.1"
},
"suggest": {
"symfony/event-dispatcher": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Console\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Console Component",
"homepage": "http://symfony.com",
"time": "2014-02-11 13:52:09"
},
{
"name": "symfony/finder",
"version": "v2.4.2",
"target-dir": "Symfony/Component/Finder",
"source": {
"type": "git",
"url": "https://github.com/symfony/Finder.git",
"reference": "b6735d1fc16da13c4c7dddfe78366a4a098cf011"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Finder/zipball/b6735d1fc16da13c4c7dddfe78366a4a098cf011",
"reference": "b6735d1fc16da13c4c7dddfe78366a4a098cf011",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Finder\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Finder Component",
"homepage": "http://symfony.com",
"time": "2014-01-07 13:28:54"
},
{
"name": "symfony/process",
"version": "v2.4.2",
"target-dir": "Symfony/Component/Process",
"source": {
"type": "git",
"url": "https://github.com/symfony/Process.git",
"reference": "c175448bac997556f8ab972908a4e14c7291fb03"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Process/zipball/c175448bac997556f8ab972908a4e14c7291fb03",
"reference": "c175448bac997556f8ab972908a4e14c7291fb03",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Process\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Process Component",
"homepage": "http://symfony.com",
"time": "2014-02-11 13:52:09"
}
],
"packages-dev": [
{
"name": "phpunit/php-code-coverage",
"version": "1.2.17",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6ef2bf3a1c47eca07ea95f0d8a902a6340390b34",
"reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"phpunit/php-file-iterator": ">=1.3.0@stable",
"phpunit/php-text-template": ">=1.2.0@stable",
"phpunit/php-token-stream": ">=1.1.3@stable"
},
"require-dev": {
"phpunit/phpunit": "3.7.*@dev"
},
"suggest": {
"ext-dom": "*",
"ext-xdebug": ">=2.0.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
}
},
"autoload": {
"classmap": [
"PHP/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"coverage",
"testing",
"xunit"
],
"time": "2014-03-28 10:53:45"
},
{
"name": "phpunit/php-file-iterator",
"version": "1.3.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
"reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"File/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [
"filesystem",
"iterator"
],
"time": "2013-10-10 15:34:57"
},
{
"name": "phpunit/php-text-template",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
"reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"Text/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
],
"time": "2014-01-30 17:20:04"
},
{
"name": "phpunit/php-timer",
"version": "1.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"PHP/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"time": "2013-08-02 07:42:54"
},
{
"name": "phpunit/php-token-stream",
"version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
"reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": {
"classmap": [
"PHP/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Wrapper around PHP's tokenizer extension.",
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [
"tokenizer"
],
"time": "2014-03-03 05:10:30"
},
{
"name": "phpunit/phpunit",
"version": "3.7.34",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "248d6ce95e6ca7f0e3135252c0b984bbe1f52f19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/248d6ce95e6ca7f0e3135252c0b984bbe1f52f19",
"reference": "248d6ce95e6ca7f0e3135252c0b984bbe1f52f19",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.3.3",
"phpunit/php-code-coverage": "~1.2",
"phpunit/php-file-iterator": "~1.3",
"phpunit/php-text-template": "~1.1",
"phpunit/php-timer": "~1.0",
"phpunit/phpunit-mock-objects": "~1.2",
"symfony/yaml": "~2.0"
},
"require-dev": {
"pear-pear.php.net/pear": "1.9.4"
},
"suggest": {
"ext-json": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"phpunit/php-invoker": "~1.1"
},
"bin": [
"composer/bin/phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.7.x-dev"
}
},
"autoload": {
"classmap": [
"PHPUnit/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"",
"../../symfony/yaml/"
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "The PHP Unit Testing framework.",
"homepage": "http://www.phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
"time": "2014-03-28 11:04:36"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "1.2.3",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "1.2.3"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects/archive/1.2.3.zip",
"reference": "1.2.3",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"phpunit/php-text-template": ">=1.1.1@stable"
},
"suggest": {
"ext-soap": "*"
},
"type": "library",
"autoload": {
"classmap": [
"PHPUnit/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Mock Object library for PHPUnit",
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"keywords": [
"mock",
"xunit"
],
"time": "2013-01-13 10:24:48"
},
{
"name": "symfony/property-access",
"version": "v2.4.2",
"target-dir": "Symfony/Component/PropertyAccess",
"source": {
"type": "git",
"url": "https://github.com/symfony/PropertyAccess.git",
"reference": "37fe0c2dc494b47db4b0850e9dcba3a27cc45c0c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/PropertyAccess/zipball/37fe0c2dc494b47db4b0850e9dcba3a27cc45c0c",
"reference": "37fe0c2dc494b47db4b0850e9dcba3a27cc45c0c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\PropertyAccess\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony PropertyAccess Component",
"homepage": "http://symfony.com",
"keywords": [
"access",
"array",
"extraction",
"index",
"injection",
"object",
"property",
"property path",
"reflection"
],
"time": "2014-02-11 15:39:28"
},
{
"name": "symfony/translation",
"version": "v2.4.2",
"target-dir": "Symfony/Component/Translation",
"source": {
"type": "git",
"url": "https://github.com/symfony/Translation.git",
"reference": "b00fd07417e493e08488e87bcebeb9681fc7323b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Translation/zipball/b00fd07417e493e08488e87bcebeb9681fc7323b",
"reference": "b00fd07417e493e08488e87bcebeb9681fc7323b",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/config": "~2.0",
"symfony/yaml": "~2.2"
},
"suggest": {
"symfony/config": "",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Translation\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Translation Component",
"homepage": "http://symfony.com",
"time": "2014-02-03 17:15:33"
},
{
"name": "symfony/validator",
"version": "v2.4.2",
"target-dir": "Symfony/Component/Validator",
"source": {
"type": "git",
"url": "https://github.com/symfony/Validator.git",
"reference": "64d7a54f97a5f53a98864a7461822e341f9416b5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/64d7a54f97a5f53a98864a7461822e341f9416b5",
"reference": "64d7a54f97a5f53a98864a7461822e341f9416b5",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/property-access": "~2.2",
"symfony/translation": "~2.0"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/cache": "~1.0",
"symfony/config": "~2.2",
"symfony/http-foundation": "~2.1",
"symfony/intl": "~2.3",
"symfony/yaml": "~2.0"
},
"suggest": {
"doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
"doctrine/cache": "For using the default cached annotation reader",
"symfony/config": "",
"symfony/http-foundation": "",
"symfony/intl": "",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Validator\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Validator Component",
"homepage": "http://symfony.com",
"time": "2014-02-11 13:52:09"
},
{
"name": "symfony/yaml",
"version": "v2.4.2",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
"url": "https://github.com/symfony/Yaml.git",
"reference": "bb6ddaf8956139d1b8c360b4b713ed0138e876b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/bb6ddaf8956139d1b8c360b4b713ed0138e876b3",
"reference": "bb6ddaf8956139d1b8c360b4b713ed0138e876b3",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Yaml\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com",
"time": "2014-01-07 13:28:54"
}
],
"aliases": [
],
"minimum-stability": "stable",
"stability-flags": [
],
"platform": {
"php": ">=5.3.3"
},
"platform-dev": [
]
}
PK pAV LICENSEnu W+A Copyright (c) 2012 Mike van Riel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.PK pAVP .travis.ymlnu W+A language: php
php:
- 5.3
- 5.4
before_script:
- composer install
script: phpunit --coverage-text
notifications:
email:
- mike.vanriel@naenius.comPK pAV3| k .puppet/manifests/manifest.ppnu W+A group { "puppet":
ensure => "present",
}
node default {
exec { "apt-get update":
command => "/usr/bin/apt-get update"
}
package{["git", "python-setuptools", "wget", "make", "texlive-latex-recommended", "texlive-latex-extra", "texlive-fonts-recommended", "openjdk-6-jre", "php5-cli", "php5-xdebug"]:
ensure => present,
require => Exec["apt-get update"]
}
exec { "sudo easy_install -U sphinx":
command => "/usr/bin/sudo /usr/bin/easy_install -U sphinx",
require => [ Package["python-setuptools"] ],
timeout => 0
}
exec { "get-composer":
command => "/usr/bin/wget -N http://getcomposer.org/composer.phar",
require => Package["wget"],
cwd => "/vagrant"
}
exec { "composer-install":
command => "/usr/bin/php composer.phar install --dev",
require => Exec["get-composer"],
cwd => "/vagrant"
}
}PK pAV>[ bin/compilenu W+A #!/usr/bin/env php
compile();
PK pAVst
composer.jsonnu W+A {
"name": "cilex/cilex",
"description": "The PHP micro-framework for Command line tools based on the Symfony2 Components",
"keywords": ["microframework","cli"],
"homepage": "http://cilex.github.com",
"license": "MIT",
"autoload":{
"psr-0":{ "Cilex": "src/" }
},
"authors":[
{ "name": "Mike van Riel", "email": "mike.vanriel@naenius.com" }
],
"require":{
"php": ">=5.3.3",
"pimple/pimple": "~1.0",
"symfony/process": "~2.1",
"symfony/finder": "~2.1",
"cilex/console-service-provider": "1.*"
},
"require-dev":{
"symfony/validator": "~2.1",
"phpunit/phpunit": "3.7.*"
},
"suggest":{
"monolog/monolog": ">=1.0.0",
"symfony/yaml": ">=1.0.0",
"symfony/validator": ">=1.0.0"
},
"extra":{
"branch-alias": { "dev-master": "1.0-dev" }
}
}
PK pAV|W- - tests/data/config-invalid.jsonnu W+A {
"key": "value"
"missing": "comma"
}PK pAV ! tests/data/config.unknownfiletypenu W+A PK pAVvC tests/data/config.jsonnu W+A {
"key": "value"
}PK pAV?) ) tests/data/config.phpnu W+A 'value'
);
PK pAVG4
4
% tests/Cilex/Tests/ApplicationTest.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Tests;
use \Cilex\Application;
/**
* Mock class used to test the register method.
*/
class ServiceProviderMock implements \Cilex\ServiceProviderInterface
{
/**
* Mock method to satisfy interface
*
* @param \Cilex\Application $app
*
* @return void
*/
function register(\Cilex\Application $app)
{
$app['mock.param'] = false;
$app['mock'] = $this;
}
}
/**
* Application test cases.
*
* @author Mike van Riel
*/
class ApplicationTest extends \PHPUnit_Framework_TestCase
{
const NAME = 'Test';
const VERSION = '1.0.1';
/** @var \Cilex\Application */
protected $fixture = null;
/**
* Sets up the test fixture.
*/
public function setUp()
{
$this->fixture = new Application(self::NAME, self::VERSION);
}
/**
* Tests whether the constructor instantiates the correct dependencies and
* correctly sets the name on the Console's Application.
*/
public function testConstruct()
{
$this->assertInstanceOf(
'\\Symfony\\Component\\Console\\Application',
$this->fixture['console']
);
$this->assertEquals(self::NAME, $this->fixture['console']->getName());
$this->assertEquals(self::VERSION, $this->fixture['console']->getVersion());
}
/**
* Tests the command method to see if the command is properly set and the
* Cilex application is added as container.
*/
public function testCommand()
{
$this->assertFalse($this->fixture['console']->has('demo:greet'));
$this->fixture->command(new \Cilex\Command\GreetCommand());
$this->assertTrue($this->fixture['console']->has('demo:greet'));
$this->assertSame(
$this->fixture,
$this->fixture['console']->get('demo:greet')->getContainer()
);
}
/**
* Tests whether the register method applies the provided parameters to this
* application and correctly registers the ServiceProvider.
*/
public function testRegister()
{
$provider = new ServiceProviderMock();
$this->fixture->register($provider, array('mock.param' => true));
$this->assertTrue($this->fixture['mock.param']);
$this->assertSame($this->fixture['mock'], $provider);
}
}
PK pAVЅ
O O ; tests/Cilex/Tests/Provider/ValidatorServiceProviderTest.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Tests\Provider;
use Cilex\Application;
use Cilex\Provider\ValidatorServiceProvider;
/**
* ValidatorServiceProvider.
*
* Originally provided with the Silex Framework; test has been adapted for Cilex.
*
* @author Javier Lopez
* @author Mike van Riel
*/
class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/validator/Symfony/Component/Validator')) {
$this->markTestSkipped('Validator submodule was not installed.');
}
}
public function testRegister()
{
$app = new Application('Test');
$app->register(new ValidatorServiceProvider(), array(
'validator.class_path' => __DIR__.'/../../../../vendor/Symfony/Component/Validator'
));
return $app;
}
/**
* @depends testRegister
*/
public function testValidatorServiceIsAValidator($app)
{
$this->assertInstanceOf('Symfony\Component\Validator\Validator', $app['validator']);
}
}PK pAV3V!
7 tests/Cilex/Tests/Provider/ConfigServerProviderTest.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Ben Selby
*/
namespace Cilex\Tests\Provider;
use Cilex\Application;
use Cilex\Provider\ConfigServiceProvider;
/**
* Test file for ConfigServiceProvider
*
* @author Ben Selby
*/
class ConfigServiceProviderTest extends \PHPUnit_Framework_TestCase
{
/**
* Test that an exception is thrown if the config path is not present
* or valid
*
* @return void
*/
public function testRegisterWillThrowExceptionIfConfigPathIsNotThere()
{
$this->setExpectedException(
'InvalidArgumentException',
__DIR__.'/../../../data/unknownfile is not a valid path to the configuration'
);
$app = new Application('Test');
$app->register(
new ConfigServiceProvider(),
array(
'config.path' => __DIR__.'/../../../data/unknownfile'
)
);
$config = $app['config'];
}
/**
* Test that the config provider can parse a json
* configuration file
*
* @return void
*/
public function testRegisterCanParseAJsonConfigFile()
{
$app = new Application('Test');
$app->register(
new ConfigServiceProvider(),
array(
'config.path' => __DIR__.'/../../../data/config.json'
)
);
$config = $app['config'];
$this->assertEquals($config->key, 'value');
}
public function testCanParseAPhpConfigFile()
{
$app = new Application('Test');
$app->register(
new ConfigServiceProvider(),
array(
'config.path' => __DIR__.'/../../../data/config.php'
)
);
$config = $app['config'];
$this->assertEquals($config['key'], 'value');
}
/**
* Test that the config provider can throw an exception if
* the json configuration file is invalid
*
* @return void
*/
public function testRegisterThrowsExceptionInCaseOfInvalidJsonConfigFile()
{
$configPath = __DIR__.'/../../../data/config-invalid.json';
$this->setExpectedException(
'InvalidArgumentException',
'Unable to decode the configuration file: ' . $configPath
);
$app = new Application('Test');
$app->register(
new ConfigServiceProvider(),
array(
'config.path' => $configPath
)
);
$config = $app['config'];
}
/**
* Test that register will throw an exception if an unknown
* format is passed in
*
* @return void
*/
public function testRegisterThrowsExceptionIfAnUnknownFormatIsPassed()
{
$this->setExpectedException(
'InvalidArgumentException',
'Unable to load configuration; the provided file extension was not recognized. Only yml, xml or json allowed'
);
$app = new Application('Test');
$app->register(
new ConfigServiceProvider(),
array(
'config.path' => __DIR__.'/../../../data/config.unknownfiletype'
)
);
$config = $app['config'];
}
}
PK pAVT T ) tests/Cilex/Tests/Command/CommandTest.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Tests\Command;
use \Cilex\Command;
class CommandMock extends Command\Command {}
/**
* Command\Command test cases.
*
* @author Mike van Riel
*/
class CommandTest extends \PHPUnit_Framework_TestCase
{
/** @var \Cilex\Command\Command */
protected $fixture = null;
/**
* Sets up the test fixture.
*/
public function setUp()
{
$this->fixture = new CommandMock('demo:test');
}
/**
* Tests the getContainer method.
*/
public function testContainer()
{
$app = new \Cilex\Application('Test');
$app->command($this->fixture);
$this->assertSame($app, $this->fixture->getContainer());
}
/**
* Tests whether the getService method correctly retrieves an element from
* the container.
*/
public function testGetService()
{
$app = new \Cilex\Application('Test');
$app->command($this->fixture);
$this->assertInstanceOf(
'\Symfony\Component\Console\Application',
$this->fixture->getService('console')
);
}
}
PK pAVq/
F F
.gitignorenu W+A vendor
phpunit.xml
cilex.phar
.idea
composer.phar
.vagrant
docs/.buildPK pAVz example.phpnu W+A command(new \Cilex\Command\GreetCommand());
$app->run();PK pAVHD& & README.mdnu W+A Cilex, a simple Command Line Interface framework
================================================
Cilex is a simple command line application framework to develop simple tools
based on [Symfony2][1] components:
```php
command(new \Cilex\Command\GreetCommand());
$app->run();
```
Cilex works with PHP 5.3.3 or later and is heavily inspired on the [Silex][2]
web micro-framework by Fabien Potencier.
## Installation
1. `git clone` _this_ repository.
2. Download composer: `curl -s https://getcomposer.org/installer | php`
3. Install Cilex' dependencies: `php composer.phar install`
4. Create the phar: `php ./compile`
## Usage
- Download composer: `curl -s https://getcomposer.org/installer | php`
- Add to your dependencies: `php composer.phar require cilex/cilex dev-master`
- Update the dependencies
- Create a `run.php` file
```php
command(new \Cilex\Command\GreetCommand());
$app->run();
```
- `php run.php`
- enjoy a lot.
## License
Cilex is licensed under the MIT license.
[1]: http://symfony.com
[2]: http://silex.sensiolabs.org
[3]: http://cilex.github.com/get/cilex.phar
[4]: http://cilex.github.com/documentation
## FAQ
Q: How do I pass configuration into the application?
A: You can do this by adding the following line, where $configPath is the path to the configuration file you want to use:
```php
$app->register(new \Cilex\Provider\ConfigServiceProvider(), array('config.path' => $configPath));
```
The formats currently supported are: YAML, XML and JSON
PK pAV` / src/Cilex/Provider/ValidatorServiceProvider.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Symfony\Component\Validator\Validator;
use Symfony\Component\Validator\Mapping\ClassMetadataFactory;
use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader;
use Symfony\Component\Validator\ConstraintValidatorFactory;
use Symfony\Component\Validator\DefaultTranslator;
/**
* Symfony Validator component Provider.
*
* This class is an adaptation of the Silex MonologServiceProvider written by
* Fabien Potencier.
*
* @author Fabien Potencier
* @author Mike van Riel
*/
class ValidatorServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['validator'] = $app->share(
function () use ($app) {
return new Validator(
$app['validator.mapping.class_metadata_factory'],
$app['validator.validator_factory'],
$app['validator.default_translator']
);
}
);
$app['validator.mapping.class_metadata_factory'] = $app->share(
function () use ($app) {
return new ClassMetadataFactory(new StaticMethodLoader());
}
);
$app['validator.validator_factory'] = $app->share(
function () {
return new ConstraintValidatorFactory();
}
);
$app['validator.default_translator'] = $app->share(
function () {
if (!class_exists('Symfony\\Component\\Validator\\DefaultTranslator')){
return array();
}
return new DefaultTranslator();
}
);
if (isset($app['validator.class_path'])) {
$app['autoloader']->registerNamespace('Symfony\\Component\\Validator', $app['validator.class_path']);
}
}
}
PK pAVD , src/Cilex/Provider/ConfigServiceProvider.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Symfony\Component\Yaml;
class ConfigServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['config'] = $app->share(
function () use ($app) {
if (!file_exists($app['config.path'])) {
throw new \InvalidArgumentException(
$app['config.path'] . ' is not a valid path to the '
.'configuration'
);
}
$fullpath = explode('.', $app['config.path']);
switch (strtolower(end($fullpath))) {
case 'php':
$result = include($app['config.path']);
break;
case 'yml':
$parser = new Yaml\Parser();
$result = new \ArrayObject(
$parser->parse(file_get_contents($app['config.path']))
);
break;
case 'xml':
$result = simplexml_load_file($app['config.path']);
break;
case 'json':
$result = json_decode(file_get_contents($app['config.path']));
if (null == $result) {
throw new \InvalidArgumentException(
'Unable to decode the configuration file: ' . $app['config.path']
);
}
break;
default:
throw new \InvalidArgumentException(
'Unable to load configuration; the provided file extension was not recognized. '
.'Only yml, xml or json allowed'
);
break;
}
return $result;
}
);
}
}
PK pAVf\cI - src/Cilex/Provider/MonologServiceProvider.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
/**
* Monolog Provider.
*
* This class is an adaptation of the Silex MonologServiceProvider written by
* Fabien Potencier.
*
* @author Fabien Potencier
* @author Mike van Riel
*/
class MonologServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['monolog'] = $app->share(
function () use ($app) {
$log = new Logger(isset($app['monolog.name']) ? $app['monolog.name'] : 'myapp');
$app['monolog.configure']($log);
return $log;
}
);
$app['monolog.configure'] = $app->protect(
function ($log) use ($app) {
$log->pushHandler($app['monolog.handler']);
}
);
$app['monolog.handler'] = function () use ($app) {
return new StreamHandler($app['monolog.logfile'], $app['monolog.level']);
};
if (!isset($app['monolog.level'])) {
$app['monolog.level'] = function () {
return Logger::DEBUG;
};
}
if (isset($app['monolog.class_path'])) {
$app['autoloader']->registerNamespace('Monolog', $app['monolog.class_path']);
}
}
}
PK pAV]*'j j . src/Cilex/Provider/DoctrineServiceProvider.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Configuration;
use Doctrine\Common\EventManager;
/**
* Doctrine DBAL Provider.
*
* This Service Provider is an adaptation of the DoctrineServiceProvider for
* Silex written by Fabien Potencier.
*
* @author Fabien Potencier
* @author Mike van Riel
*/
class DoctrineServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['db.default_options'] = array(
'driver' => 'pdo_mysql',
'dbname' => null,
'host' => 'localhost',
'user' => 'root',
'password' => null,
);
$app['dbs.options.initializer'] = $app->protect(
function () use ($app) {
static $initialized = false;
if ($initialized) {
return;
}
$initialized = true;
if (!isset($app['dbs.options'])) {
$app['dbs.options'] = array('default' => isset($app['db.options']) ? $app['db.options'] : array());
}
$tmp = $app['dbs.options'];
foreach ($tmp as $name => &$options) {
$options = array_replace($app['db.default_options'], $options);
if (!isset($app['dbs.default'])) {
$app['dbs.default'] = $name;
}
}
$app['dbs.options'] = $tmp;
}
);
$app['dbs'] = $app->share(
function () use ($app) {
$app['dbs.options.initializer']();
$dbs = new \Pimple();
foreach ($app['dbs.options'] as $name => $options) {
if ($app['dbs.default'] === $name) {
// we use shortcuts here in case the default has been overriden
$config = $app['db.config'];
$manager = $app['db.event_manager'];
} else {
$config = $app['dbs.config'][$name];
$manager = $app['dbs.event_manager'][$name];
}
$dbs[$name] = DriverManager::getConnection($options, $config, $manager);
}
return $dbs;
}
);
$app['dbs.config'] = $app->share(
function () use ($app) {
$app['dbs.options.initializer']();
$configs = new \Pimple();
foreach ($app['dbs.options'] as $name => $options) {
$configs[$name] = new Configuration();
}
return $configs;
}
);
$app['dbs.event_manager'] = $app->share(
function () use ($app) {
$app['dbs.options.initializer']();
$managers = new \Pimple();
foreach ($app['dbs.options'] as $name => $options) {
$managers[$name] = new EventManager();
}
return $managers;
}
);
// shortcuts for the "first" DB
$app['db'] = $app->share(
function () use ($app) {
$dbs = $app['dbs'];
return $dbs[$app['dbs.default']];
}
);
$app['db.config'] = $app->share(
function () use ($app) {
$dbs = $app['dbs.config'];
return $dbs[$app['dbs.default']];
}
);
$app['db.event_manager'] = $app->share(
function () use ($app) {
$dbs = $app['dbs.event_manager'];
return $dbs[$app['dbs.default']];
}
);
if (isset($app['db.dbal.class_path'])) {
$app['autoloader']->registerNamespace('Doctrine\\DBAL', $app['db.dbal.class_path']);
}
if (isset($app['db.common.class_path'])) {
$app['autoloader']->registerNamespace('Doctrine\\Common', $app['db.common.class_path']);
}
}
}
PK pAVD src/Cilex/Application.phpnu W+A
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex;
use \Symfony\Component\Console;
use \Cilex\Provider\Console\ConsoleServiceProvider;
/**
* The Cilex framework class.
*
* @author Mike van Riel
*
* @api
*/
class Application extends \Pimple
{
/**
* Version number for Cilex
*/
const VERSION = '1.0.0';
/**
* Registers the autoloader and necessary components.
*
* @param string $name Name for this application.
* @param string|null $version Version number for this application.
*/
public function __construct($name, $version = null, array $values = array())
{
parent::__construct();
$consoleConfig = array('console.name' => $name);
if (null !== $version) {
$consoleConfig['console.version'] = $version;
}
$this->register(new ConsoleServiceProvider(), $consoleConfig);
foreach ($values as $key => $value) {
$this[$key] = $value;
}
}
/**
* Executes this application.
*
* @param bool $interactive runs in an interactive shell if true.
*
* @return void
*/
public function run($interactive = false)
{
$app = $this['console'];
if ($interactive) {
$app = new Console\Shell($app);
}
$app->run();
}
/**
* Adds a command object.
*
* If a command with the same name already exists, it will be overridden.
*
* @param \Cilex\Command\Command $command A Command object
*
* @api
*
* @return void
*/
public function command(Console\Command\Command $command)
{
$this['console']->add($command);
}
/**
* Registers a service provider.
*
* @param \Cilex\ServiceProviderInterface|\Silex\ServiceProviderInterface $provider
* A ServiceProviderInterface instance
* @param mixed[] $values
* An array of values that customizes the provider
*
* @return void
*/
public function register($provider, array $values = array())
{
if ((!$provider instanceof \Cilex\ServiceProviderInterface)
&& (!$provider instanceof \Silex\ServiceProviderInterface)
) {
throw new \InvalidArgumentException(
'Extensions should implement either Cilex or Silex\' ServiceProviderInterface'
);
}
$provider->register($this);
foreach ($values as $key => $value) {
$this[$key] = $value;
}
}
}
PK pAV4uQ Q &