diff --git a/.gitignore b/.gitignore index be73845..57872d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -.DS_Store -*.swp -Thumbs.db -.svn -._* +/vendor/ diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..8cb71e7 --- /dev/null +++ b/.php_cs @@ -0,0 +1,70 @@ +setUsingCache(true) + ->setRiskyAllowed(true) + ->setRules(array( + '@Symfony' => true, + 'array_syntax' => array('syntax' => 'long'), + 'binary_operator_spaces' => array( + 'align_double_arrow' => false, + 'align_equals' => false, + ), + 'blank_line_after_opening_tag' => true, + 'header_comment' => array('header' => $header), + 'ordered_imports' => true, + 'php_unit_construct' => true, + )) + ->setFinder( + PhpCsFixer\Finder::create()->in(__DIR__) + ) + ; +} + +Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header); + +return Symfony\CS\Config\Config::create() + ->setUsingCache(true) + ->fixers(array( + 'newline_after_open_tag', + 'ordered_use', + 'php_unit_construct', + 'long_array_syntax', + 'unalign_double_arrow', + 'unalign_equals', + )) + ->finder( + Symfony\CS\Finder\DefaultFinder::create() + ->in(__DIR__) + ) +; diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..deb52f3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: php +warnings_are_errors: false + +env: + global: + - PATH="$HOME/.composer/vendor/bin:$PATH" + +matrix: + fast_finish: true + include: + - php: 5.6 + - php: 5.6 + env: COMPOSER_FLAGS="--prefer-lowest" + - php: 7.0 + - php: 7.1 + - php: 7.2 + +sudo: false + +cache: + directories: + - $HOME/.composer/cache + +before_script: + - if [[ $TRAVIS_PHP_VERSION != hhvm && -f xdebug.ini ]]; then phpenv config-rm xdebug.ini; fi + - if [ "$GITHUB_OAUTH_TOKEN" != "" ]; then echo -e $GITHUB_OAUTH_TOKEN && composer config -g github-oauth.github.com $GITHUB_OAUTH_TOKEN; fi; + - COMPOSER_MEMORY_LIMIT=-1 composer update --prefer-dist --no-interaction $COMPOSER_FLAGS + +script: + - vendor/bin/phpunit -c phpunit.xml.dist diff --git a/README.md b/README.md index 04f8318..0317497 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # A SoftLayer API PHP client. +[![Build Status](https://travis-ci.org/softlayer/softlayer-api-php-client.svg?branch=master)](https://travis-ci.org/softlayer/softlayer-api-php-client) + ## Warning ``` @@ -19,7 +21,7 @@ Making API calls using the `\SoftLayer\SoapClient` or `\SoftLayer\XmlRpcClient` Once your method is executed you may continue using the same client if you need to connect to the same service or define another client object if you wish to work with multiple services at once. -The most up to date version of this library can be found on the SoftLayer github public repositories: [http://github.com/softlayer/](http://github.com/softlayer/) . Please post to the SoftLayer forums [Stack Overflow](https://stackoverflow.com) or open a support ticket in the SoftLayer customer portal if you have any questions regarding use of this library. If you use Stack Overflow please tag your posts with “SoftLayer” so our team can easily find your post. +The most up to date version of this library can be found on the SoftLayer github public repositories: [http://github.com/softlayer/](http://github.com/softlayer/) . Please post to the SoftLayer forums [Stack Overflow](https://stackoverflow.com) or open a support ticket in the SoftLayer customer portal if you have any questions regarding use of this library. If you use Stack Overflow please tag your posts with “SoftLayer” so our team can easily find your post. ## System Requirements diff --git a/composer.json b/composer.json index fe57a1e..54dd02f 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ } ], "require": { - "php": ">=5.3", + "php": "^5.3|^7.0", "ext-xmlrpc": "*", "ext-soap": "*" }, @@ -20,9 +20,21 @@ "SoftLayer\\": "src/" } }, + "autoload-dev": { + "psr-4": { + "SoftLayer\\Tests\\": "tests/" + } + }, "extra": { "branch-alias": { "dev-master": "1.0-dev" + }, + "config": { + "sort-packages": true } + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.13|^2.0", + "phpunit/phpunit": "^5.4.3|^6.0|^7.0" } } diff --git a/composer.lock b/composer.lock index 9ad9f9e..5fd657e 100644 --- a/composer.lock +++ b/composer.lock @@ -1,19 +1,2575 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "2bc7129c1da0c216ab8a14e03c4180de", + "content-hash": "0f52b8e0adce481cec3d6b6d2703e260", "packages": [], - "packages-dev": [], + "packages-dev": [ + { + "name": "composer/semver", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "time": "2016-08-30T16:08:34+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "dc523135366eb68f22268d069ea7749486458562" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/dc523135366eb68f22268d069ea7749486458562", + "reference": "dc523135366eb68f22268d069ea7749486458562", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2018-11-29T10:59:02+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2017-12-06T07:11:42+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.13.1", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "54814c62d5beef3ba55297b9b3186ed8b8a1b161" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/54814c62d5beef3ba55297b9b3186ed8b8a1b161", + "reference": "54814c62d5beef3ba55297b9b3186ed8b8a1b161", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.2", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || >=7.0 <7.3", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.17 || ^4.1.6", + "symfony/event-dispatcher": "^3.0 || ^4.0", + "symfony/filesystem": "^3.0 || ^4.0", + "symfony/finder": "^3.0 || ^4.0", + "symfony/options-resolver": "^3.0 || ^4.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0", + "symfony/stopwatch": "^3.0 || ^4.0" + }, + "conflict": { + "hhvm": "*" + }, + "require-dev": { + "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.1", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.1", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunitgoodpractices/traits": "^1.5.1", + "symfony/phpunit-bridge": "^4.0" + }, + "suggest": { + "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2018-10-21T00:32:10+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "time": "2018-02-15T16:58:55+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "6.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1 || ^4.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-xdebug": "^2.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.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": "2018-10-31T16:06:48+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "050bedf145a257b1ff02746c31894800e5122946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.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": "2018-09-13T20:33:42+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2018-02-01T13:07:23+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2018-10-30T05:52:18+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "7.5.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "c23d78776ad415d5506e0679723cb461d71f488f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c23d78776ad415d5506e0679723cb461d71f488f", + "reference": "c23d78776ad415d5506e0679723cb461d71f488f", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.0", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpunit/phpunit-mock-objects": "*" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-12-12T07:20:32+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "shasum": "" + }, + "require": { + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-07-12T15:12:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "366541b989927187c4ca70490a35615d3fef2dce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", + "reference": "366541b989927187c4ca70490a35615d3fef2dce", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2018-06-10T07:54:39+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/febd209a219cea7b56ad799b30ebbea34b71eb8f", + "reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2018-11-25T09:31:21+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2017-04-03T13:19:02+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2018-10-04T04:07:39+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/console", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "4dff24e5d01e713818805c1862d2e3f901ee7dd0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/4dff24e5d01e713818805c1862d2e3f901ee7dd0", + "reference": "4dff24e5d01e713818805c1862d2e3f901ee7dd0", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-11-27T07:40:44+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "921f49c3158a276d27c0d770a5a347a3b718b328" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/921f49c3158a276d27c0d770a5a347a3b718b328", + "reference": "921f49c3158a276d27c0d770a5a347a3b718b328", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-12-01T08:52:38+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "2f4c8b999b3b7cadb2a69390b01af70886753710" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/2f4c8b999b3b7cadb2a69390b01af70886753710", + "reference": "2f4c8b999b3b7cadb2a69390b01af70886753710", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "e53d477d7b5c4982d0e1bfd2298dbee63d01441d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/e53d477d7b5c4982d0e1bfd2298dbee63d01441d", + "reference": "e53d477d7b5c4982d0e1bfd2298dbee63d01441d", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba", + "reference": "a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224", + "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T06:26:08+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", + "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/process", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "2b341009ccec76837a7f46f59641b431e4d4c2b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/2b341009ccec76837a7f46f59641b431e4d4c2b0", + "reference": "2b341009ccec76837a7f46f59641b431e4d4c2b0", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2018-11-20T16:22:05+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "ec076716412274e51f8a7ea675d9515e5c311123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/ec076716412274e51f8a7ea675d9515e5c311123", + "reference": "ec076716412274e51f8a7ea675d9515e5c311123", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-12-25T11:19:39+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.3", + "php": "^5.3|^7.0", "ext-xmlrpc": "*", "ext-soap": "*" }, diff --git a/example.php b/example.php deleted file mode 100644 index 08cbc64..0000000 --- a/example.php +++ /dev/null @@ -1,139 +0,0 @@ -, [username], [API key]); - * - * API Service: The name of the API service you wish to connect to. - * id: An optional id to initialize your API service with, if you're - * interacting with a specific object. If you don't need to specify - * an id then pass null to the client. - * username: Your SoftLayer API username. - * API key: Your SoftLayer API key, - */ -$client = SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey); - -/** - * Once your client object is created you can call API methods for that service - * directly against your client object. A call may throw an exception on error, - * so it's best to try your call and catch exceptions. - * - * This example calls the getObject() method in the SoftLayer_Account API - * service. - * It retrieves basic account information, and is a great way to test your API - * account and connectivity. - */ -try { - print_r($client->getObject()); -} catch (\Exception $e) { - die($e->getMessage()); -} - -/** - * For a more complex example we’ll retrieve a support ticket with id 123456 - * along with the ticket’s updates, the user it’s assigned to, the servers - * attached to it, and the datacenter those servers are in. We’ll retrieve our - * extra information using a nested object mask. After we have the ticket we’ll - * update it with the text ‘Hello!’. - */ - -// Declare an API client to connect to the SoftLayer_Ticket API service. -$client = SoapClient::getClient('SoftLayer_Ticket', 123456, $apiUsername, $apiKey); - -// Assign an object mask to our API client: -$objectMask = new ObjectMask(); -$objectMask->updates; -$objectMask->assignedUser; -$objectMask->attachedHardware->datacenter; -$client->setObjectMask($objectMask); - -// Retrieve the ticket record. -try { - $ticket = $client->getObject(); - print_r($ticket); -} catch (\Exception $e) { - die('Unable to retrieve ticket record: ' . $e->getMessage()); -} - -// Now update the ticket. -$update = new \stdClass(); -$update->entry = 'Hello!'; - -try { - $update = $client->addUpdate($update); - echo "Updated ticket 123456. The new update's id is " . $update[0]->id . '.'; -} catch (\Exception $e) { - die('Unable to update ticket: ' . $e->getMessage()); -} diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..efc9d9a --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,27 @@ + + + + + + ./tests + + + + + + ./ + + ./tests + + + + diff --git a/src/Common/ObjectMask.php b/src/Common/ObjectMask.php index 99083fe..dd1d1b4 100644 --- a/src/Common/ObjectMask.php +++ b/src/Common/ObjectMask.php @@ -1,5 +1,6 @@ datacenter = new StdClass(); - * $objectMask->serverRoom = new StdClass(); - * $objectMask->provisionDate = new StdClass(); - * $objectMask->softwareComponents = new StdClass(); - * $objectMask->softwareComponents->passwords = new StdClass(); + * $objectMask = new \stdClass(); + * $objectMask->datacenter = new \stdClass(); + * $objectMask->serverRoom = new \stdClass(); + * $objectMask->provisionDate = new \stdClass(); + * $objectMask->softwareComponents = new \stdClass(); + * $objectMask->softwareComponents->passwords = new \stdClass(); * * Building an object mask using ObjectMask is a bit easier to * type: @@ -56,7 +57,7 @@ * making your SoftLayer API calls. * * For more on object mask usage in the SoftLayer API please see - * http://sldn.softlayer.com/article/Using_Object_Masks_in_the_SoftLayer_API . + * http://sldn.softlayer.com/article/Using_Object_Masks_in_the_SoftLayer_API. * * The most up to date version of this library can be found on the SoftLayer * github public repositories: http://github.com/softlayer/ . Please post to @@ -67,13 +68,14 @@ * @author SoftLayer Technologies, Inc. * @copyright Copyright (c) 2009 - 2010, Softlayer Technologies, Inc * @license http://sldn.softlayer.com/article/License + * * @see SoapClient::setObjectMask() * @see XmlRpcClient::setObjectMask() */ class ObjectMask { /** - * Define an object mask value + * Define an object mask value. * * @param string $var */ diff --git a/src/SoapClient.php b/src/SoapClient.php index 3dd9284..da4b336 100644 --- a/src/SoapClient.php +++ b/src/SoapClient.php @@ -1,5 +1,6 @@ - * @copyright Copyright (c) 2009 - 2010, Softlayer Technologies, Inc - * @license http://sldn.softlayer.com/article/License - * @link http://sldn.softlayer.com/article/The_SoftLayer_API The SoftLayer API - * @see AsynchronousAction + * @author SoftLayer Technologies, Inc. + * @copyright Copyright (c) 2009 - 2010, Softlayer Technologies, Inc + * @license http://sldn.softlayer.com/article/License + * + * @see http://sldn.softlayer.com/article/The_SoftLayer_API The SoftLayer API + * @see AsynchronousAction */ class SoapClient extends \SoapClient { @@ -69,7 +71,8 @@ class SoapClient extends \SoapClient * Your SoftLayer API user's authentication key. You may overide this value * when calling getClient(). * - * @link https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * @see https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * * @var string */ const API_KEY = 'set me'; @@ -91,13 +94,12 @@ class SoapClient extends \SoapClient const API_PRIVATE_ENDPOINT = 'http://api.service.softlayer.com/soap/v3/'; /** - * The namespace to use for calls to the API + * The namespace to use for calls to the API. * * $var string */ const DEFAULT_NAMESPACE = 'http://api.service.softlayer.com/soap/v3/'; - /** * The API endpoint base URL used by the client. * @@ -114,7 +116,7 @@ class SoapClient extends \SoapClient const SOAP_TIMEOUT = null; /** - * The SOAP headers to send along with a SoftLayer API call + * The SOAP headers to send along with a SoftLayer API call. * * @var array */ @@ -123,7 +125,8 @@ class SoapClient extends \SoapClient /** * The name of the SoftLayer API service you wish to query. * - * @link http://sldn.softlayer.com/reference/services A list of SoftLayer API services + * @see http://sldn.softlayer.com/reference/services A list of SoftLayer API services + * * @var string */ protected $_serviceName; @@ -176,7 +179,7 @@ class SoapClient extends \SoapClient public $oneWay; /** - * Execute a SoftLayer API method + * Execute a SoftLayer API method. * * @return object */ @@ -184,11 +187,11 @@ public function __call($functionName, $arguments = null) { // Determine if we shoud be making an asynchronous call. If so strip // "Async" from the end of the method name. - if ($this->_asyncResult == null) { + if (null === $this->_asyncResult) { $this->_asynchronous = false; $this->_asyncAction = null; - if (preg_match('/Async$/', $functionName) == 1) { + if (preg_match('/Async$/', $functionName)) { $this->_asynchronous = true; $functionName = str_replace('Async', '', $functionName); @@ -202,7 +205,7 @@ public function __call($functionName, $arguments = null) throw new \Exception('There was an error querying the SoftLayer API: ' . $e->getMessage(), 0, $e); } - if ($this->_asynchronous == true) { + if ($this->_asynchronous) { return $this->_asyncAction; } @@ -213,7 +216,7 @@ public function __call($functionName, $arguments = null) } /** - * Create a SoftLayer API SOAP Client + * Create a SoftLayer API SOAP Client. * * Retrieve a new SoapClient object for a specific SoftLayer API * service using either the class' constants API_USER and API_KEY or a @@ -221,17 +224,18 @@ public function __call($functionName, $arguments = null) * value if you wish to instantiate a particular SoftLayer API object. * * @param string $serviceName The name of the SoftLayer API service you wish to query - * @param int $id An optional object id if you're instantiating a particular SoftLayer API object. Setting an id defines this client's initialization parameter header. - * @param string $username An optional API username if you wish to bypass SoapClient's built-in username. - * @param string $username An optional API key if you wish to bypass SoapClient's built-in API key. + * @param int $id An optional object id if you're instantiating a particular SoftLayer API object. Setting an id defines this client's initialization parameter header. + * @param string $username an optional API username if you wish to bypass SoapClient's built-in username + * @param string $apiKey an optional API key if you wish to bypass SoapClient's built-in API key * @param string $endpointUrl The API endpoint base URL you wish to connect to. Set this to SoapClient::API_PRIVATE_ENDPOINT to connect via SoftLayer's private network. + * * @return SoapClient */ public static function getClient($serviceName, $id = null, $username = null, $apiKey = null, $endpointUrl = null) { $serviceName = trim($serviceName); - if ($serviceName == null) { + if ('' === $serviceName) { throw new \Exception('Please provide a SoftLayer API service name.'); } @@ -240,34 +244,34 @@ public static function getClient($serviceName, $id = null, $username = null, $ap * endpoint defined in API_PUBLIC_ENDPOINT, otherwise use the one * provided by the user. */ - if (isset($endpointUrl)) { + if (null !== $endpointUrl) { $endpointUrl = trim($endpointUrl); - if ($endpointUrl == null) { + if ('' === $endpointUrl) { throw new \Exception('Please provide a valid API endpoint.'); } - } elseif (self::API_BASE_URL != null) { + } elseif (null !== self::API_BASE_URL) { $endpointUrl = self::API_BASE_URL; } else { $endpointUrl = self::API_PUBLIC_ENDPOINT; } - if (is_null(self::SOAP_TIMEOUT)) { - $soapClient = new self($endpointUrl . $serviceName . '?wsdl'); + if (null === self::SOAP_TIMEOUT) { + $soapClient = new self($endpointUrl.$serviceName.'?wsdl'); } else { - $soapClient = new self($endpointUrl . $serviceName . '?wsdl', array('connection_timeout' => self::SOAP_TIMEOUT)); + $soapClient = new self($endpointUrl.$serviceName.'?wsdl', array('connection_timeout' => self::SOAP_TIMEOUT)); } $soapClient->_serviceName = $serviceName; $soapClient->_endpointUrl = $endpointUrl; - if ($username != null && $apiKey != null) { + if (null !== $username && null !== $apiKey) { $soapClient->setAuthentication($username, $apiKey); } else { $soapClient->setAuthentication(self::API_USER, self::API_KEY); } - if ($id !== null) { + if (null !== $id) { $soapClient->setInitParameter($id); } @@ -275,7 +279,7 @@ public static function getClient($serviceName, $id = null, $username = null, $ap } /** - * Set a SoftLayer API call header + * Set a SoftLayer API call header. * * Every header defines a customization specific to an SoftLayer API call. * Most API calls require authentication and initialization parameter @@ -283,66 +287,75 @@ public static function getClient($serviceName, $id = null, $username = null, $ap * result limits if they're supported by the API method you're calling. * * @see removeHeader() - * @param string $name The name of the header you wish to set + * + * @param string $name The name of the header you wish to set * @param object $value The object you wish to set in this header + * * @return SoapClient */ public function addHeader($name, $value) { $this->_headers[$name] = new \SoapHeader(self::DEFAULT_NAMESPACE, $name, $value); + return $this; } /** - * Remove a SoftLayer API call header + * Remove a SoftLayer API call header. * * Removing headers may cause API queries to fail. * * @see addHeader() + * * @param string $name The name of the header you wish to remove + * * @return SoapClient */ public function removeHeader($name) { unset($this->_headers[$name]); + return $this; } /** - * Set a user and key to authenticate a SoftLayer API call + * Set a user and key to authenticate a SoftLayer API call. * * Use this method if you wish to bypass the API_USER and API_KEY class * constants and set custom authentication per API call. * - * @link https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * @see https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * * @param string $username * @param string $apiKey + * * @return SoapClient */ public function setAuthentication($username, $apiKey) { $username = trim($username); - $apiKey = trim($apiKey); - if ($username == null) { + if ('' === $username) { throw new \Exception('Please provide a SoftLayer API username.'); } - if ($apiKey == null) { + $apiKey = trim($apiKey); + + if ('' === $apiKey) { throw new \Exception('Please provide a SoftLayer API key.'); } $header = new \stdClass(); $header->username = $username; - $header->apiKey = $apiKey; + $header->apiKey = $apiKey; $this->addHeader('authenticate', $header); + return $this; } - /** - * Set an initialization parameter header on a SoftLayer API call + * Set an initialization parameter header on a SoftLayer API call. * * Initialization parameters instantiate a SoftLayer API service object to * act upon during your API method call. For instance, if your account has a @@ -350,39 +363,43 @@ public function setAuthentication($username, $apiKey) * 1234 in the SoftLayer_Hardware_Server Service instructs the API to act on * server record 1234 in your method calls. * - * @link http://sldn.softlayer.com/article/Using_Initialization_Parameters_in_the_SoftLayer_API Using Initialization Parameters in the SoftLayer API - * @param int $id The ID number of the SoftLayer API object you wish to instantiate. + * @see http://sldn.softlayer.com/article/Using_Initialization_Parameters_in_the_SoftLayer_API Using Initialization Parameters in the SoftLayer API + * + * @param int $id the ID number of the SoftLayer API object you wish to instantiate + * * @return SoapClient */ public function setInitParameter($id) { $id = trim($id); - if (!is_null($id)) { + if ('' !== $id) { $initParameters = new \stdClass(); $initParameters->id = $id; - $this->addHeader($this->_serviceName . 'InitParameters', $initParameters); + $this->addHeader($this->_serviceName.'InitParameters', $initParameters); } return $this; } /** - * Set an object mask to a SoftLayer API call + * Set an object mask to a SoftLayer API call. * * Use an object mask to retrieve data related your API call's result. * Object masks are skeleton objects or strings that define nested relational * properties to retrieve along with an object's local properties. * * @see ObjectMask - * @link http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayer-API Using object masks in the SoftLayer API + * @see http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayer-API Using object masks in the SoftLayer API + * * @param object $mask The object mask you wish to define + * * @return SoapClient */ public function setObjectMask($mask) { - if (!is_null($mask)) { - $header = 'SoftLayer_ObjectMask'; + if (null !== $mask) { + $header = 'SoftLayer_ObjectMask'; if ($mask instanceof ObjectMask) { $header = sprintf('%sObjectMask', $this->_serviceName); @@ -397,50 +414,57 @@ public function setObjectMask($mask) } /** - * Set an object filter to a SoftLayer API call + * Set an object filter to a SoftLayer API call. * * Use an object filter to limit what data you get back * from the API. Very similar to objectMasks * * @see ObjectMask - * @param object $filter The object filter you wish to define + * + * @param object $objectFilter The object filter you wish to define + * * @return SoapClient */ public function setObjectFilter($objectFilter) { - if (!is_null($objectFilter)) { + if (null !== $objectFilter) { $header = sprintf('%sObjectFilter', $this->_serviceName); $this->addHeader($header, $objectFilter); } + return $this; } + /** - * Set a result limit on a SoftLayer API call + * Set a result limit on a SoftLayer API call. * * Many SoftLayer API methods return a group of results. These methods * support a way to limit the number of results retrieved from the SoftLayer * API in a way akin to an SQL LIMIT statement. * - * @link http://sldn.softlayer.com/article/Using_Result_Limits_in_the_SoftLayer_API Using Result Limits in the SoftLayer API - * @param int $limit The number of results to limit your SoftLayer API call to. - * @param int $offset An optional offset to begin your SoftLayer API call's returned result set at. + * @see http://sldn.softlayer.com/article/Using_Result_Limits_in_the_SoftLayer_API Using Result Limits in the SoftLayer API + * + * @param int $limit the number of results to limit your SoftLayer API call to + * @param int $offset an optional offset to begin your SoftLayer API call's returned result set at + * * @return SoapClient */ public function setResultLimit($limit, $offset = 0) { $resultLimit = new \stdClass(); - $resultLimit->limit = intval($limit); - $resultLimit->offset = intval($offset); + $resultLimit->limit = (int) $limit; + $resultLimit->offset = (int) $offset; $this->addHeader('resultLimit', $resultLimit); + return $this; } /** - * Process a SOAP request + * Process a SOAP request. * * We've overwritten the PHP \SoapClient's __doRequest() to allow processing - * asynchronous SOAP calls. If an asynchronous call was deected in the + * asynchronous SOAP calls. If an asynchronous call was detected in the * __call() method then send processing to the * AsynchronousAction class. Otherwise use the * \SoapClient's built-in __doRequest() method. The results of this method @@ -452,39 +476,41 @@ public function setResultLimit($limit, $offset = 0) public function __doRequest($request, $location, $action, $version, $one_way = false) { // Don't make a call if we already have an asynchronous result. - if ($this->_asyncResult != null) { + if (null !== $this->_asyncResult) { $result = $this->_asyncResult; - unset($this->_asyncResult); + $this->_asyncResult = null; return $result; } - if ($this->oneWay == true) { + if ($this->oneWay) { $one_way = true; $this->oneWay = false; } // Use either the \SoapClient or AsynchronousAction // class to handle the call. - if ($this->_asynchronous == false) { + if (!$this->_asynchronous) { $result = parent::__doRequest($request, $location, $action, $version, $one_way); return $result; - } else { - $this->_asyncAction = new AsynchronousAction($this, $this->asyncFunctionName, $request, $location, $action); - return ''; } + + $this->_asyncAction = new AsynchronousAction($this, $this->asyncFunctionName, $request, $location, $action); + + return ''; } /** * Process the results of an asynchronous call. * * The AsynchronousAction class uses - * handleAsyncResult() to return it's call resuls back to this classes' - * __call() method for post-pocessing. + * handleAsyncResult() to return it's call results back to this classes' + * __call() method for post-processing. + * + * @param string $functionName the name of the SOAP method called + * @param string $result The raw SOAP XML output from a SOAP call * - * @param string $functionName The name of the SOAP method called. - * @param string $result The raw SOAP XML output from a SOAP call * @return object */ public function handleAsyncResult($functionName, $result) diff --git a/src/SoapClient/AsynchronousAction.php b/src/SoapClient/AsynchronousAction.php index b659cd2..149b9ee 100644 --- a/src/SoapClient/AsynchronousAction.php +++ b/src/SoapClient/AsynchronousAction.php @@ -1,5 +1,6 @@ receive style of transmission. Response * time for a call is dependent on the latency between the SOAP client and SOAP @@ -51,7 +52,7 @@ * 1) The SoapClient class knows to make an asynchronous call when the * method called ends with "Async". For example, to make a standard call to the * method getObject() you would execute $client->geObject(). It's asynchronous - * counterpart is execued with the code $client->getObjectAsync(). Once the + * counterpart is executed with the code $client->getObjectAsync(). Once the * asynchronous call is made the results of your API command are sent to this * classes' socket property. * @@ -61,7 +62,7 @@ * SoapClient for processing. For example if you wish to retrieve the * results of the method getObject() execute the following statements: * - * $result = $client->getObjectAsync(); // Make the call and start geting data back. + * $result = $client->getObjectAsync(); // Make the call and start getting data back. * $result = $result->wait(); // Return the results of the API call * * To chain multiple asynchronous requests together call multiple Async requests @@ -88,7 +89,7 @@ * $vlanSpanResult = $client->setVlanSpanAsync(true); * * // The three requests are now processing in parallel. Use the wait() - * // method to retrieve the resuls of our requests. The wait time involved + * // method to retrieve the results of our requests. The wait time involved * // is roughly the same time as the longest API call. * $account = $account->wait(); * $nextInvoicePdf = $nextInvoicePdf->wait(); @@ -113,44 +114,45 @@ * @author SoftLayer Technologies, Inc. * @copyright Copyright (c) 2009 - 2010, Softlayer Technologies, Inc * @license http://sldn.softlayer.com/article/License + * * @see SoapClient */ class AsynchronousAction { /** - * The SoftLayer SOAP client making an asynchronous call + * The SoftLayer SOAP client making an asynchronous call. * * @var SoapClient */ protected $_soapClient; /** - * The name of the function we're calling + * The name of the function we're calling. * * @var string */ protected $_functionName; /** - * A socket connection to the SoftLayer SOAP API + * A socket connection to the SoftLayer SOAP API. * * @var resource */ protected $_socket; /** - * Perform an asynchgronous SoftLayer SOAP call + * Perform an asynchronous SoftLayer SOAP call. * * Create a raw socket connection to the URL specified by the * SoapClient class and send SOAP HTTP headers and request XML to * that socket. Throw exceptions if we're unable to make the socket * connection or send data to that socket. * - * @param SoapClient $soapClient The SoftLayer SOAP client making the asynchronous call. - * @param string $functionName The name of the function we're calling. - * @param string $request The full XML SOAP request we wish to make. - * @param string $location The URL of the web service we wish to call. - * @param string $action The value of the HTTP SOAPAction header in our SOAP call. + * @param SoapClient $soapClient the SoftLayer SOAP client making the asynchronous call + * @param string $functionName the name of the function we're calling + * @param string $request the full XML SOAP request we wish to make + * @param string $location the URL of the web service we wish to call + * @param string $action the value of the HTTP SOAPAction header in our SOAP call */ public function __construct($soapClient, $functionName, $request, $location, $action) { @@ -159,46 +161,46 @@ public function __construct($soapClient, $functionName, $request, $location, $ac $this->_soapClient = $soapClient; $this->_functionName = $functionName; - $protocol = $matches[1]; - $host = $matches[2]; - $endpoint = $matches[3]; + $protocol = $matches[1]; + $host = $matches[2]; + $endpoint = $matches[3]; $headers = array( - 'POST ' . $endpoint . ' HTTP/1.1', - 'Host: ' . $host, - 'User-Agent: PHP-SOAP/' . phpversion(), + 'POST '.$endpoint.' HTTP/1.1', + 'Host: '.$host, + 'User-Agent: PHP-SOAP/'.phpversion(), 'Content-Type: text/xml; charset=utf-8', - 'SOAPAction: "' . $action . '"', - 'Content-Length: ' . strlen($request), + 'SOAPAction: "'.$action.'"', + 'Content-Length: '.strlen($request), 'Connection: close', ); - if ($protocol == 'https') { - $host = 'ssl://' . $host; + if ('https' === $protocol) { + $host = 'ssl://'.$host; $port = 443; } else { $port = 80; } - $data = implode("\r\n", $headers) . "\r\n\r\n" . $request . "\r\n"; + $data = implode("\r\n", $headers)."\r\n\r\n".$request."\r\n"; $this->_socket = fsockopen($host, $port, $errorNumber, $errorMessage); - if ($this->_socket === false) { + if (false === $this->_socket) { $this->_socket = null; - throw new \Exception('Unable to make an asynchronous SoftLayer API call: ' . $errorNumber . ': ' . $errorMessage); + throw new \Exception('Unable to make an asynchronous SoftLayer API call: '.$errorNumber.': '.$errorMessage); } - if (fwrite($this->_socket, $data) === false) { + if (false === fwrite($this->_socket, $data)) { throw new \Exception('Unable to write data to an asynchronous SoftLayer API call.'); } } /** - * Process and return the results of an asyncrhonous SoftLayer API call + * Process and return the results of an asynchronous SoftLayer API call. * * Read data from our socket and process the raw SOAP result from the * SoapClient instance that made the asynchronous call. wait() - * *must* be called in order to recieve the results from your API call. + * *must* be called in order to receive the results from your API call. * * @return object */ @@ -221,7 +223,7 @@ public function wait() */ public function __destruct() { - if ($this->_socket != null) { + if ($this->_socket) { fclose($this->_socket); } } diff --git a/src/XmlRpcClient.php b/src/XmlRpcClient.php index 6a3fe84..f002bb5 100644 --- a/src/XmlRpcClient.php +++ b/src/XmlRpcClient.php @@ -1,5 +1,6 @@ - * @copyright Copyright (c) 2009 - 2010, Softlayer Technologies, Inc - * @license http://sldn.softlayer.com/article/License - * @link http://sldn.softlayer.com/article/The_SoftLayer_API The SoftLayer API + * @author SoftLayer Technologies, Inc. + * @copyright Copyright (c) 2009 - 2010, Softlayer Technologies, Inc + * @license http://sldn.softlayer.com/article/License + * + * @see http://sldn.softlayer.com/article/The_SoftLayer_API The SoftLayer API */ class XmlRpcClient { @@ -62,7 +64,8 @@ class XmlRpcClient * Your SoftLayer API user's authentication key. You may overide this value * when calling getClient(). * - * @link https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * @see https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * * @var string */ const API_KEY = 'set me'; @@ -89,7 +92,7 @@ class XmlRpcClient const API_BASE_URL = self::API_PUBLIC_ENDPOINT; /** - * The headers to send along with a SoftLayer API call + * The headers to send along with a SoftLayer API call. * * @var array */ @@ -98,7 +101,8 @@ class XmlRpcClient /** * The name of the SoftLayer API service you wish to query. * - * @link http://sldn.softlayer.com/reference/services A list of SoftLayer API services + * @see http://sldn.softlayer.com/reference/services A list of SoftLayer API services + * * @var string */ protected $_serviceName; @@ -111,7 +115,7 @@ class XmlRpcClient protected $_endpointUrl; /** - * Execute a SoftLayer API method + * Execute a SoftLayer API method. * * @return object */ @@ -131,22 +135,22 @@ public function __call($functionName, $arguments = null) 'http' => array( 'method' => 'POST', 'header' => 'Content-Type: text/xml', - 'content' => $encodedRequest - ))); + 'content' => $encodedRequest, + ), )); - $file = file_get_contents($this->_endpointUrl . $this->_serviceName, false, $context); + $file = file_get_contents($this->_endpointUrl.$this->_serviceName, false, $context); - if ($file === false) { - throw new \Exception('Unable to contact the SoftLayer API at ' . $this->_endpointUrl . $serviceName . '.'); + if (false === $file) { + throw new \Exception('Unable to contact the SoftLayer API at '.$this->_endpointUrl.$serviceName.'.'); } $result = xmlrpc_decode($file); } catch (\Exception $e) { - throw new \Exception('There was an error querying the SoftLayer API: ' . $e->getMessage()); + throw new \Exception('There was an error querying the SoftLayer API: '.$e->getMessage()); } if (is_array($result) && xmlrpc_is_fault($result)) { - throw new \Exception('There was an error querying the SoftLayer API: ' . $result['faultString']); + throw new \Exception('There was an error querying the SoftLayer API: '.$result['faultString']); } // remove the resultLimit header if they set it @@ -156,7 +160,7 @@ public function __call($functionName, $arguments = null) } /** - * Create a SoftLayer API XML-RPC Client + * Create a SoftLayer API XML-RPC Client. * * Retrieve a new XmlRpcClient object for a specific SoftLayer API * service using either the class' constants API_USER and API_KEY or a @@ -164,20 +168,18 @@ public function __call($functionName, $arguments = null) * value if you wish to instantiate a particular SoftLayer API object. * * @param string $serviceName The name of the SoftLayer API service you wish to query - * @param int $id An optional object id if you're instantiating a particular SoftLayer API object. Setting an id defines this client's initialization parameter header. - * @param string $username An optional API username if you wish to bypass XmlRpcClient's built-in username. - * @param string $username An optional API key if you wish to bypass XmlRpcClient's built-in API key. + * @param int $id An optional object id if you're instantiating a particular SoftLayer API object. Setting an id defines this client's initialization parameter header. + * @param string $username an optional API username if you wish to bypass XmlRpcClient's built-in username + * @param string $apiKey an optional API key if you wish to bypass XmlRpcClient's built-in API key * @param string $endpointUrl The API endpoint base URL you wish to connect to. Set this to XmlRpcClient::API_PRIVATE_ENDPOINT to connect via SoftLayer's private network. + * * @return XmlRpcClient */ public static function getClient($serviceName, $id = null, $username = null, $apiKey = null, $endpointUrl = null) { $serviceName = trim($serviceName); - $id = trim($id); - $username = trim($username); - $apiKey = trim($apiKey); - if ($serviceName == null) { + if ('' === $serviceName) { throw new \Exception('Please provide a SoftLayer API service name.'); } @@ -188,10 +190,10 @@ public static function getClient($serviceName, $id = null, $username = null, $ap * endpoint defined in API_PUBLIC_ENDPOINT, otherwise use the one * provided by the user. */ - if (isset($endpointUrl)) { + if (null !== $endpointUrl) { $endpointUrl = trim($endpointUrl); - if ($endpointUrl == null) { + if ('' === $endpointUrl) { throw new \Exception('Please provide a valid API endpoint.'); } @@ -202,7 +204,10 @@ public static function getClient($serviceName, $id = null, $username = null, $ap $client->_endpointUrl = self::API_PUBLIC_ENDPOINT; } - if ($username != null && $apiKey != null) { + $username = trim($username); + $apiKey = trim($apiKey); + + if ('' !== $username && '' !== $apiKey) { $client->setAuthentication($username, $apiKey); } else { $client->setAuthentication(self::API_USER, self::API_KEY); @@ -210,7 +215,9 @@ public static function getClient($serviceName, $id = null, $username = null, $ap $client->_serviceName = $serviceName; - if ($id != null) { + $id = trim($id); + + if ('' !== $id) { $client->setInitParameter($id); } @@ -218,7 +225,7 @@ public static function getClient($serviceName, $id = null, $username = null, $ap } /** - * Set a SoftLayer API call header + * Set a SoftLayer API call header. * * Every header defines a customization specific to an SoftLayer API call. * Most API calls require authentication and initialization parameter @@ -226,69 +233,79 @@ public static function getClient($serviceName, $id = null, $username = null, $ap * result limits if they're supported by the API method you're calling. * * @see removeHeader() - * @param string $name The name of the header you wish to set + * + * @param string $name The name of the header you wish to set * @param object $value The object you wish to set in this header + * * @return XmlRpcClient */ public function addHeader($name, $value) { if (is_object($value)) { - $value = (array)$value; + $value = (array) $value; } $this->_headers[$name] = $value; + return $this; } /** - * Remove a SoftLayer API call header + * Remove a SoftLayer API call header. * * Removing headers may cause API queries to fail. * * @see addHeader() + * * @param string $name The name of the header you wish to remove + * * @return XmlRpcClient */ public function removeHeader($name) { unset($this->_headers[$name]); + return $this; } /** - * Set a user and key to authenticate a SoftLayer API call + * Set a user and key to authenticate a SoftLayer API call. * * Use this method if you wish to bypass the API_USER and API_KEY class * constants and set custom authentication per API call. * - * @link https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * @see https://manage.softlayer.com/Administrative/apiKeychain API key management in the SoftLayer customer portal + * * @param string $username * @param string $apiKey + * * @return XmlRpcClient */ public function setAuthentication($username, $apiKey) { $username = trim($username); - $apiKey = trim($apiKey); - if ($username == null) { + if ('' === $username) { throw new \Exception('Please provide a SoftLayer API username.'); } - if ($apiKey == null) { + $apiKey = trim($apiKey); + + if ('' === $apiKey) { throw new \Exception('Please provide a SoftLayer API key.'); } $header = new \stdClass(); $header->username = $username; - $header->apiKey = $apiKey; + $header->apiKey = $apiKey; $this->addHeader('authenticate', $header); + return $this; } /** - * Set an initialization parameter header on a SoftLayer API call + * Set an initialization parameter header on a SoftLayer API call. * * Initialization parameters instantiate a SoftLayer API service object to * act upon during your API method call. For instance, if your account has a @@ -296,39 +313,43 @@ public function setAuthentication($username, $apiKey) * 1234 in the SoftLayer_Hardware_Server Service instructs the API to act on * server record 1234 in your method calls. * - * @link http://sldn.softlayer.com/article/Using_Initialization_Parameters_in_the_SoftLayer_API Using Initialization Parameters in the SoftLayer API - * @param int $id The ID number of the SoftLayer API object you wish to instantiate. + * @see http://sldn.softlayer.com/article/Using_Initialization_Parameters_in_the_SoftLayer_API Using Initialization Parameters in the SoftLayer API + * + * @param int $id the ID number of the SoftLayer API object you wish to instantiate + * * @return XmlRpcClient */ public function setInitParameter($id) { $id = trim($id); - if (!is_null($id)) { + if ('' !== $id) { $initParameters = new \stdClass(); $initParameters->id = $id; - $this->addHeader($this->_serviceName . 'InitParameters', $initParameters); + $this->addHeader($this->_serviceName.'InitParameters', $initParameters); } return $this; } /** - * Set an object mask to a SoftLayer API call + * Set an object mask to a SoftLayer API call. * * Use an object mask to retrieve data related your API call's result. * Object masks are skeleton objects or strings that define nested relational * properties to retrieve along with an object's local properties. * * @see ObjectMask - * @link http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayer-API Using object masks in the SoftLayer API + * @see http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayer-API Using object masks in the SoftLayer API + * * @param object $mask The object mask you wish to define + * * @return SoapClient */ public function setObjectMask($mask) { - if (!is_null($mask)) { - $header = 'ObjectMask'; + if (null !== $mask) { + $header = 'ObjectMask'; if ($mask instanceof ObjectMask) { $header = sprintf('%sObjectMask', $this->_serviceName); @@ -343,29 +364,32 @@ public function setObjectMask($mask) } /** - * Set a result limit on a SoftLayer API call + * Set a result limit on a SoftLayer API call. * * Many SoftLayer API methods return a group of results. These methods * support a way to limit the number of results retrieved from the SoftLayer * API in a way akin to an SQL LIMIT statement. * - * @link http://sldn.softlayer.com/article/Using_Result_Limits_in_the_SoftLayer_API Using Result Limits in the SoftLayer API - * @param int $limit The number of results to limit your SoftLayer API call to. - * @param int $offset An optional offset to begin your SoftLayer API call's returned result set at. + * @see http://sldn.softlayer.com/article/Using_Result_Limits_in_the_SoftLayer_API Using Result Limits in the SoftLayer API + * + * @param int $limit the number of results to limit your SoftLayer API call to + * @param int $offset an optional offset to begin your SoftLayer API call's returned result set at + * * @return XmlRpcClient */ public function setResultLimit($limit, $offset = 0) { $resultLimit = new \stdClass(); - $resultLimit->limit = intval($limit); - $resultLimit->offset = intval($offset); + $resultLimit->limit = (int) $limit; + $resultLimit->offset = (int) $offset; $this->addHeader('resultLimit', $resultLimit); + return $this; } /** - * Remove PHP xmlrpc type definition structures from a decoded request array + * Remove PHP xmlrpc type definition structures from a decoded request array. * * Certain xmlrpc types like base64 are decoded in PHP to a \stdClass with a * scalar property containing the decoded value of the xmlrpc member and an @@ -374,58 +398,58 @@ public function setResultLimit($limit, $offset = 0) * the xmlrpc value for known xmlrpc types. * * @param mixed $result The decoded xmlrpc request to process + * * @return mixed */ - private static function _convertXmlrpcTypes($result) { + private static function _convertXmlrpcTypes($result) + { if (is_array($result)) { - // Return case 1: The result is an empty array. Return the empty // array. - if (count($result) == 0) { + if (empty($result)) { return $result; - } else { - - // Return case 2: The result is a non-empty array. Loop through - // array elements and recursively translate every element. - // Return the fully translated array. - foreach ($result as $key => $value) { - $result[$key] = self::_convertXmlrpcTypes($value); - } + } - return $result; + // Return case 2: The result is a non-empty array. Loop through + // array elements and recursively translate every element. + // Return the fully translated array. + foreach ($result as $key => $value) { + $result[$key] = self::_convertXmlrpcTypes($value); } + return $result; + } + // Return case 3: The result is an xmlrpc scalar. Convert it to a normal // variable and return it. - } elseif (is_object($result) && $result->scalar != null && $result->xmlrpc_type != null) { - + if (is_object($result) && null !== $result->scalar && null !== $result->xmlrpc_type) { // Convert known xmlrpc types, otherwise unset the value. switch ($result->xmlrpc_type) { case 'base64': return $result->scalar; - break; default: return null; - break; } + } // Return case 4: Otherwise the result is a non-array and non xml-rpc // scalar variable. Return it unmolested. - } else { - return $result; - } + + return $result; } /** - * Recursively convert an array to an object + * Recursively convert an array to an object. * * Since xmlrpc_decode_result returns an array, but we want an object * result, so cast all array parts in our result set as objects. * * @param mixed $result A result or portion of a result to convert + * * @return mixed */ - private static function _convertToObject($result) { + private static function _convertToObject($result) + { return is_array($result) ? (object) array_map('\\SoftLayer\\XmlRpcClient::_convertToObject', $result) : $result; } } diff --git a/tests/Common/ObjectMaskTest.php b/tests/Common/ObjectMaskTest.php new file mode 100644 index 0000000..2eaecfe --- /dev/null +++ b/tests/Common/ObjectMaskTest.php @@ -0,0 +1,50 @@ + + */ +class ObjectMaskTest extends TestCase +{ + public function testObjectMask() + { + $objectMask = new ObjectMask(); + $objectMask->someProp; + $objectMask->someProp->nested; + + $this->assertInstanceOf('SoftLayer\Common\ObjectMask', $objectMask->someProp); + $this->assertInstanceOf('SoftLayer\Common\ObjectMask', $objectMask->someProp->nested); + } +} diff --git a/tests/SoapClientTest.php b/tests/SoapClientTest.php new file mode 100644 index 0000000..c02a733 --- /dev/null +++ b/tests/SoapClientTest.php @@ -0,0 +1,51 @@ + + */ +class SoapClientTest extends TestCase +{ + /** + * @expectedException \Exception + * @expectedExceptionMessage There was an error querying the SoftLayer API: Invalid API token. + */ + public function testSoapClientException() + { + $client = SoapClient::getClient('SoftLayer_Ticket', 123456, 'apiUsername', 'apiKey'); + + $client->getObject(); + } +}