├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── build ├── Dockerfile └── entrypoint.sh ├── composer.json ├── composer.lock ├── phpunit.xml ├── src ├── Account.php ├── Address.php ├── Api.php ├── Block.php ├── Exceptions │ ├── TransactionException.php │ └── TronErrorException.php ├── Interfaces │ └── WalletInterface.php ├── Support │ ├── Base58.php │ ├── Base58Check.php │ ├── Crypto.php │ └── Hash.php ├── Traits │ └── TronAwareTrait.php ├── Transaction.php └── Wallet.php └── tests ├── integration └── WalletTest.php └── unit ├── AddressTest.php ├── ApiTest.php ├── BlockTest.php ├── TransactionTest.php └── WalletTest.php /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | vendor 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 7.2 5 | 6 | before_script: 7 | - composer self-update 8 | - composer install --prefer-source --no-interaction --dev 9 | - composer dump-autoload 10 | 11 | script: ./vendor/bin/phpunit --configuration=./phpunit.xml --coverage-clover ./build/logs/clover.xml 12 | 13 | after_success: 14 | - travis_retry php ./vendor/bin/php-coveralls 15 | 16 | cache: 17 | directories: 18 | - $HOME/.composer/cache/files 19 | - ./vendor 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Matthias von Bargen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tron-trx-php 2 | [![Build Status](https://travis-ci.com/mattvb91/tron-trx-php.svg?branch=master)](https://travis-ci.com/mattvb91/tron-trx-php) 3 | [![Coverage Status](https://coveralls.io/repos/github/mattvb91/tron-trx-php/badge.svg?branch=master)](https://coveralls.io/github/mattvb91/tron-trx-php?branch=master) 4 | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mattvb91/tron-trx-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mattvb91/tron-trx-php/?branch=master) 5 | 6 | PHP Library for interacting with the Tron blockchain through Tron-Grid 7 | 8 | 9 | ## Overview 10 | 11 | This library aims to integrate with the Tron-Grid while removing some of the dangerous aspects of its API. 12 | One of the biggest issues currently is private keys being posted over a network to various TRON nodes while leaving the node 13 | configuration up to developers. This causes 14 | great potential for man in the middle attacks to take place and steal private keys. Even with trustworthy developers 15 | who know how to setup their networking & authentication layers mistakes do happen and fact is your private key may be 16 | getting posted over a network and being exposed. 17 | 18 | ##### This library integrates with Tron-Grid while removing some of these dangerous parts and doing them locally instead 19 | 20 | So in a nutshell. This library allows you to use the harmless endpoints such as ```/wallet/getaccountnet``` etc.. while 21 | any actions such as generating addresses/private keys or signing are all done locally without your private key getting posted over a network. 22 | 23 | ### Prerequisites 24 | 25 | Your PHP installation requires bcmath & gmp extensions to be enabled. 26 | 27 | ### Installing 28 | 29 | ``` 30 | composer require mattvb91/trontrx 31 | ``` 32 | 33 | ### Docker 34 | 35 | There is a [Dockerfile](/build/Dockerfile) available that you can use to build a working image to get started quickly. 36 | 37 | ```bash 38 | cd build 39 | docker build -t tron-trx-php . 40 | cd ../ 41 | docker run -it -v $(pwd):/app -u 1000 tron-trx-php /bin/bash 42 | composer install 43 | ./vendor/bin/phpunit 44 | 45 | ``` 46 | 47 | ## Available interface 48 | 49 | - TODO describe available interface 50 | 51 | ## Built With 52 | 53 | * [ionux/phactor](https://github.com/ionux/phactor) - PHP implementation of the elliptic curve based on secp256k1 54 | * [php-keccak](https://github.com/kornrunner/php-keccak) - Pure PHP implementation of Keccak (SHA-3) 55 | 56 | ## Versioning 57 | 58 | We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/mattvb91/tron-trx-php/tags). 59 | 60 | ## Contributors 61 | 62 | - [CryptoSpaces](https://github.com/CryptoSpaces) 63 | 64 | See also the list of [contributors](https://github.com/mattvb91/tron-trx-php/contributors) who participated in this project. 65 | 66 | ## License 67 | ``` 68 | MIT License 69 | 70 | Copyright (c) 2018 Matthias von Bargen 71 | 72 | Permission is hereby granted, free of charge, to any person obtaining a copy 73 | of this software and associated documentation files (the "Software"), to deal 74 | in the Software without restriction, including without limitation the rights 75 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 76 | copies of the Software, and to permit persons to whom the Software is 77 | furnished to do so, subject to the following conditions: 78 | 79 | The above copyright notice and this permission notice shall be included in all 80 | copies or substantial portions of the Software. 81 | 82 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 83 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 84 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 85 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 86 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 87 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 88 | SOFTWARE. 89 | ``` 90 | 91 | ## Acknowledgments 92 | 93 | * Support files from [iexbase/tron-api](https://github.com/iexbase/tron-api) 94 | -------------------------------------------------------------------------------- /build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2-alpine 2 | 3 | RUN apk --no-cache add libmcrypt-dev \ 4 | libltdl \ 5 | icu-dev \ 6 | freetype-dev \ 7 | m4 \ 8 | perl \ 9 | autoconf \ 10 | libc6-compat \ 11 | build-base \ 12 | curl \ 13 | git \ 14 | openssh \ 15 | openssl \ 16 | tini \ 17 | bash \ 18 | zlib-dev \ 19 | gmp \ 20 | gmp-dev \ 21 | && docker-php-ext-install mbstring \ 22 | zip \ 23 | bcmath \ 24 | opcache \ 25 | gmp \ 26 | && apk del icu-dev \ 27 | freetype-dev \ 28 | build-base \ 29 | zlib-dev \ 30 | gmp-dev \ 31 | autoconf \ 32 | make \ 33 | perl 34 | 35 | ENV COMPOSER_ALLOW_SUPERUSER 1 36 | ENV COMPOSER_HOME /tmp 37 | ENV COMPOSER_VERSION 1.7.3 38 | 39 | ARG HOST_USER_UID=1000 40 | ARG HOST_USER_GID=1000 41 | 42 | COPY entrypoint.sh /entrypoint.sh 43 | 44 | RUN chmod +x /entrypoint.sh \ 45 | && echo "memory_limit=-1" > "$PHP_INI_DIR/conf.d/memory-limit.ini" \ 46 | && echo "date.timezone=${PHP_TIMEZONE:-UTC}" > "$PHP_INI_DIR/conf.d/date_timezone.ini" \ 47 | && php -r " \ 48 | copy('https://getcomposer.org/installer', 'composer-setup.php'); \ 49 | if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') \ 50 | { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ 51 | && php composer-setup.php --no-ansi --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION} \ 52 | && rm composer-setup.php \ 53 | && composer --ansi --version --no-interaction \ 54 | && rm -rf /tmp/* /tmp/.htaccess \ 55 | && addgroup -g $HOST_USER_GID developers \ 56 | && adduser -D -u $HOST_USER_UID -G developers developer 57 | 58 | WORKDIR /app 59 | 60 | ENTRYPOINT ["/entrypoint.sh"] 61 | 62 | CMD ["composer"] 63 | -------------------------------------------------------------------------------- /build/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | isCommand() { 4 | for cmd in \ 5 | "about" \ 6 | "archive" \ 7 | "browse" \ 8 | "clear-cache" \ 9 | "clearcache" \ 10 | "config" \ 11 | "create-project" \ 12 | "depends" \ 13 | "diagnose" \ 14 | "dump-autoload" \ 15 | "dumpautoload" \ 16 | "exec" \ 17 | "global" \ 18 | "help" \ 19 | "home" \ 20 | "info" \ 21 | "init" \ 22 | "install" \ 23 | "licenses" \ 24 | "list" \ 25 | "outdated" \ 26 | "prohibits" \ 27 | "remove" \ 28 | "require" \ 29 | "run-script" \ 30 | "search" \ 31 | "self-update" \ 32 | "selfupdate" \ 33 | "show" \ 34 | "status" \ 35 | "suggests" \ 36 | "update" \ 37 | "validate" \ 38 | "why" \ 39 | "why-not" 40 | do 41 | if [ -z "${cmd#"$1"}" ]; then 42 | return 0 43 | fi 44 | done 45 | 46 | return 1 47 | } 48 | 49 | # check if the first argument passed in looks like a flag 50 | if [ "$(printf %c "$1")" = '-' ]; then 51 | set -- /sbin/tini -- composer "$@" 52 | # check if the first argument passed in is composer 53 | elif [ "$1" = 'composer' ]; then 54 | set -- /sbin/tini -- "$@" 55 | # check if the first argument passed in matches a known command 56 | elif isCommand "$1"; then 57 | set -- /sbin/tini -- composer "$@" 58 | fi 59 | 60 | exec "$@" 61 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mattvb91/trontrx", 3 | "description": "Library for interacting with the Tron blockchain through Tron-Grid", 4 | "type": "library", 5 | "require": { 6 | "ext-bcmath": "*", 7 | "guzzlehttp/guzzle": "^6.3", 8 | "ionux/phactor": "1.0.8", 9 | "kornrunner/keccak": "^1.0" 10 | }, 11 | "require-dev": { 12 | "phpunit/phpunit": "^7.4", 13 | "php-coveralls/php-coveralls": "^2.1" 14 | }, 15 | "autoload": { 16 | "psr-4": { 17 | "mattvb91\\TronTrx\\": "src/" 18 | } 19 | }, 20 | "authors": [ 21 | { 22 | "name": "Matthias von Bargen", 23 | "email": "matt@mavon.ie" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "6c65065dbcd3c145a980a2d3ae60fe4a", 8 | "packages": [ 9 | { 10 | "name": "guzzlehttp/guzzle", 11 | "version": "6.3.3", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/guzzle/guzzle.git", 15 | "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", 20 | "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "guzzlehttp/promises": "^1.0", 25 | "guzzlehttp/psr7": "^1.4", 26 | "php": ">=5.5" 27 | }, 28 | "require-dev": { 29 | "ext-curl": "*", 30 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", 31 | "psr/log": "^1.0" 32 | }, 33 | "suggest": { 34 | "psr/log": "Required for using the Log middleware" 35 | }, 36 | "type": "library", 37 | "extra": { 38 | "branch-alias": { 39 | "dev-master": "6.3-dev" 40 | } 41 | }, 42 | "autoload": { 43 | "files": [ 44 | "src/functions_include.php" 45 | ], 46 | "psr-4": { 47 | "GuzzleHttp\\": "src/" 48 | } 49 | }, 50 | "notification-url": "https://packagist.org/downloads/", 51 | "license": [ 52 | "MIT" 53 | ], 54 | "authors": [ 55 | { 56 | "name": "Michael Dowling", 57 | "email": "mtdowling@gmail.com", 58 | "homepage": "https://github.com/mtdowling" 59 | } 60 | ], 61 | "description": "Guzzle is a PHP HTTP client library", 62 | "homepage": "http://guzzlephp.org/", 63 | "keywords": [ 64 | "client", 65 | "curl", 66 | "framework", 67 | "http", 68 | "http client", 69 | "rest", 70 | "web service" 71 | ], 72 | "time": "2018-04-22T15:46:56+00:00" 73 | }, 74 | { 75 | "name": "guzzlehttp/promises", 76 | "version": "v1.3.1", 77 | "source": { 78 | "type": "git", 79 | "url": "https://github.com/guzzle/promises.git", 80 | "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" 81 | }, 82 | "dist": { 83 | "type": "zip", 84 | "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", 85 | "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", 86 | "shasum": "" 87 | }, 88 | "require": { 89 | "php": ">=5.5.0" 90 | }, 91 | "require-dev": { 92 | "phpunit/phpunit": "^4.0" 93 | }, 94 | "type": "library", 95 | "extra": { 96 | "branch-alias": { 97 | "dev-master": "1.4-dev" 98 | } 99 | }, 100 | "autoload": { 101 | "psr-4": { 102 | "GuzzleHttp\\Promise\\": "src/" 103 | }, 104 | "files": [ 105 | "src/functions_include.php" 106 | ] 107 | }, 108 | "notification-url": "https://packagist.org/downloads/", 109 | "license": [ 110 | "MIT" 111 | ], 112 | "authors": [ 113 | { 114 | "name": "Michael Dowling", 115 | "email": "mtdowling@gmail.com", 116 | "homepage": "https://github.com/mtdowling" 117 | } 118 | ], 119 | "description": "Guzzle promises library", 120 | "keywords": [ 121 | "promise" 122 | ], 123 | "time": "2016-12-20T10:07:11+00:00" 124 | }, 125 | { 126 | "name": "guzzlehttp/psr7", 127 | "version": "1.4.2", 128 | "source": { 129 | "type": "git", 130 | "url": "https://github.com/guzzle/psr7.git", 131 | "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" 132 | }, 133 | "dist": { 134 | "type": "zip", 135 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", 136 | "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", 137 | "shasum": "" 138 | }, 139 | "require": { 140 | "php": ">=5.4.0", 141 | "psr/http-message": "~1.0" 142 | }, 143 | "provide": { 144 | "psr/http-message-implementation": "1.0" 145 | }, 146 | "require-dev": { 147 | "phpunit/phpunit": "~4.0" 148 | }, 149 | "type": "library", 150 | "extra": { 151 | "branch-alias": { 152 | "dev-master": "1.4-dev" 153 | } 154 | }, 155 | "autoload": { 156 | "psr-4": { 157 | "GuzzleHttp\\Psr7\\": "src/" 158 | }, 159 | "files": [ 160 | "src/functions_include.php" 161 | ] 162 | }, 163 | "notification-url": "https://packagist.org/downloads/", 164 | "license": [ 165 | "MIT" 166 | ], 167 | "authors": [ 168 | { 169 | "name": "Michael Dowling", 170 | "email": "mtdowling@gmail.com", 171 | "homepage": "https://github.com/mtdowling" 172 | }, 173 | { 174 | "name": "Tobias Schultze", 175 | "homepage": "https://github.com/Tobion" 176 | } 177 | ], 178 | "description": "PSR-7 message implementation that also provides common utility methods", 179 | "keywords": [ 180 | "http", 181 | "message", 182 | "request", 183 | "response", 184 | "stream", 185 | "uri", 186 | "url" 187 | ], 188 | "time": "2017-03-20T17:10:46+00:00" 189 | }, 190 | { 191 | "name": "ionux/phactor", 192 | "version": "v1.0.8", 193 | "source": { 194 | "type": "git", 195 | "url": "https://github.com/ionux/phactor.git", 196 | "reference": "271373b65cffe75a8c28f7f8c392fe460251f4f7" 197 | }, 198 | "dist": { 199 | "type": "zip", 200 | "url": "https://api.github.com/repos/ionux/phactor/zipball/271373b65cffe75a8c28f7f8c392fe460251f4f7", 201 | "reference": "271373b65cffe75a8c28f7f8c392fe460251f4f7", 202 | "shasum": "" 203 | }, 204 | "require": { 205 | "ext-bcmath": "*", 206 | "ext-openssl": "*", 207 | "php": ">=5.6.0" 208 | }, 209 | "require-dev": { 210 | "phpunit/phpunit": "^5.7.9" 211 | }, 212 | "suggest": { 213 | "ext-gmp": "Highest performing math library and preferred for this library's Elliptic Curve calculations." 214 | }, 215 | "type": "library", 216 | "autoload": { 217 | "psr-4": { 218 | "Phactor\\": "src/" 219 | } 220 | }, 221 | "notification-url": "https://packagist.org/downloads/", 222 | "license": [ 223 | "MIT" 224 | ], 225 | "authors": [ 226 | { 227 | "name": "Rich Morgan", 228 | "email": "rich@richmorgan.me", 229 | "role": "Creator and Lead Developer" 230 | } 231 | ], 232 | "description": "Phactor is a high-performance PHP implementation of the elliptic curve math functions required to generate & verify private/public (asymmetric) EC keypairs and ECDSA signatures based on secp256k1 curve parameters. This library also includes a class to generate Service Identification Numbers (SINs) based on the published Identity Protocol v1 spec.", 233 | "homepage": "https://github.com/ionux/phactor", 234 | "keywords": [ 235 | "Algorithm", 236 | "BIP", 237 | "ECDSA", 238 | "SIN", 239 | "arbitrary", 240 | "asymmetric", 241 | "base", 242 | "base58", 243 | "bcmath", 244 | "binary", 245 | "bitcoin", 246 | "calculator", 247 | "coprime", 248 | "crypto", 249 | "cryptography", 250 | "curve", 251 | "digital", 252 | "dsa", 253 | "ec", 254 | "elliptic", 255 | "encryption", 256 | "generate", 257 | "gmp", 258 | "hex", 259 | "identification", 260 | "identity", 261 | "integer", 262 | "key", 263 | "keygen", 264 | "keypair", 265 | "keys", 266 | "library", 267 | "math", 268 | "number", 269 | "performance", 270 | "phactor", 271 | "precision", 272 | "prime", 273 | "private", 274 | "protocol", 275 | "public", 276 | "secp256k1", 277 | "service", 278 | "signature", 279 | "verify" 280 | ], 281 | "time": "2018-04-27T16:49:28+00:00" 282 | }, 283 | { 284 | "name": "kornrunner/keccak", 285 | "version": "1.0.3", 286 | "source": { 287 | "type": "git", 288 | "url": "https://github.com/kornrunner/php-keccak.git", 289 | "reference": "ad761f528f4d1e3ce378b8a0841e5f82c9973535" 290 | }, 291 | "dist": { 292 | "type": "zip", 293 | "url": "https://api.github.com/repos/kornrunner/php-keccak/zipball/ad761f528f4d1e3ce378b8a0841e5f82c9973535", 294 | "reference": "ad761f528f4d1e3ce378b8a0841e5f82c9973535", 295 | "shasum": "" 296 | }, 297 | "require": { 298 | "php": ">=7.1.0", 299 | "symfony/polyfill-mbstring": "^1.8" 300 | }, 301 | "require-dev": { 302 | "php-coveralls/php-coveralls": "^2.1", 303 | "phpunit/phpunit": "~7" 304 | }, 305 | "type": "library", 306 | "autoload": { 307 | "psr-4": { 308 | "kornrunner\\": "src" 309 | } 310 | }, 311 | "notification-url": "https://packagist.org/downloads/", 312 | "license": [ 313 | "MIT" 314 | ], 315 | "authors": [ 316 | { 317 | "name": "Boris Momcilovic", 318 | "homepage": "https://github.com/kornrunner/php-keccak" 319 | } 320 | ], 321 | "description": "Pure PHP implementation of Keccak", 322 | "keywords": [ 323 | "keccak", 324 | "sha-3", 325 | "sha3-256" 326 | ], 327 | "time": "2018-07-30T22:16:23+00:00" 328 | }, 329 | { 330 | "name": "psr/http-message", 331 | "version": "1.0.1", 332 | "source": { 333 | "type": "git", 334 | "url": "https://github.com/php-fig/http-message.git", 335 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" 336 | }, 337 | "dist": { 338 | "type": "zip", 339 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", 340 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", 341 | "shasum": "" 342 | }, 343 | "require": { 344 | "php": ">=5.3.0" 345 | }, 346 | "type": "library", 347 | "extra": { 348 | "branch-alias": { 349 | "dev-master": "1.0.x-dev" 350 | } 351 | }, 352 | "autoload": { 353 | "psr-4": { 354 | "Psr\\Http\\Message\\": "src/" 355 | } 356 | }, 357 | "notification-url": "https://packagist.org/downloads/", 358 | "license": [ 359 | "MIT" 360 | ], 361 | "authors": [ 362 | { 363 | "name": "PHP-FIG", 364 | "homepage": "http://www.php-fig.org/" 365 | } 366 | ], 367 | "description": "Common interface for HTTP messages", 368 | "homepage": "https://github.com/php-fig/http-message", 369 | "keywords": [ 370 | "http", 371 | "http-message", 372 | "psr", 373 | "psr-7", 374 | "request", 375 | "response" 376 | ], 377 | "time": "2016-08-06T14:39:51+00:00" 378 | }, 379 | { 380 | "name": "symfony/polyfill-mbstring", 381 | "version": "v1.9.0", 382 | "source": { 383 | "type": "git", 384 | "url": "https://github.com/symfony/polyfill-mbstring.git", 385 | "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" 386 | }, 387 | "dist": { 388 | "type": "zip", 389 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", 390 | "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", 391 | "shasum": "" 392 | }, 393 | "require": { 394 | "php": ">=5.3.3" 395 | }, 396 | "suggest": { 397 | "ext-mbstring": "For best performance" 398 | }, 399 | "type": "library", 400 | "extra": { 401 | "branch-alias": { 402 | "dev-master": "1.9-dev" 403 | } 404 | }, 405 | "autoload": { 406 | "psr-4": { 407 | "Symfony\\Polyfill\\Mbstring\\": "" 408 | }, 409 | "files": [ 410 | "bootstrap.php" 411 | ] 412 | }, 413 | "notification-url": "https://packagist.org/downloads/", 414 | "license": [ 415 | "MIT" 416 | ], 417 | "authors": [ 418 | { 419 | "name": "Nicolas Grekas", 420 | "email": "p@tchwork.com" 421 | }, 422 | { 423 | "name": "Symfony Community", 424 | "homepage": "https://symfony.com/contributors" 425 | } 426 | ], 427 | "description": "Symfony polyfill for the Mbstring extension", 428 | "homepage": "https://symfony.com", 429 | "keywords": [ 430 | "compatibility", 431 | "mbstring", 432 | "polyfill", 433 | "portable", 434 | "shim" 435 | ], 436 | "time": "2018-08-06T14:22:27+00:00" 437 | } 438 | ], 439 | "packages-dev": [ 440 | { 441 | "name": "doctrine/instantiator", 442 | "version": "1.1.0", 443 | "source": { 444 | "type": "git", 445 | "url": "https://github.com/doctrine/instantiator.git", 446 | "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" 447 | }, 448 | "dist": { 449 | "type": "zip", 450 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", 451 | "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", 452 | "shasum": "" 453 | }, 454 | "require": { 455 | "php": "^7.1" 456 | }, 457 | "require-dev": { 458 | "athletic/athletic": "~0.1.8", 459 | "ext-pdo": "*", 460 | "ext-phar": "*", 461 | "phpunit/phpunit": "^6.2.3", 462 | "squizlabs/php_codesniffer": "^3.0.2" 463 | }, 464 | "type": "library", 465 | "extra": { 466 | "branch-alias": { 467 | "dev-master": "1.2.x-dev" 468 | } 469 | }, 470 | "autoload": { 471 | "psr-4": { 472 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 473 | } 474 | }, 475 | "notification-url": "https://packagist.org/downloads/", 476 | "license": [ 477 | "MIT" 478 | ], 479 | "authors": [ 480 | { 481 | "name": "Marco Pivetta", 482 | "email": "ocramius@gmail.com", 483 | "homepage": "http://ocramius.github.com/" 484 | } 485 | ], 486 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 487 | "homepage": "https://github.com/doctrine/instantiator", 488 | "keywords": [ 489 | "constructor", 490 | "instantiate" 491 | ], 492 | "time": "2017-07-22T11:58:36+00:00" 493 | }, 494 | { 495 | "name": "fgrosse/phpasn1", 496 | "version": "2.0.1", 497 | "source": { 498 | "type": "git", 499 | "url": "https://github.com/fgrosse/PHPASN1.git", 500 | "reference": "0e27e71e3d0a8d5c3f1471d727fd9574d920f33c" 501 | }, 502 | "dist": { 503 | "type": "zip", 504 | "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/0e27e71e3d0a8d5c3f1471d727fd9574d920f33c", 505 | "reference": "0e27e71e3d0a8d5c3f1471d727fd9574d920f33c", 506 | "shasum": "" 507 | }, 508 | "require": { 509 | "ext-gmp": "*", 510 | "php": ">=7.0.0" 511 | }, 512 | "require-dev": { 513 | "phpunit/phpunit": "~6.3", 514 | "satooshi/php-coveralls": "dev-master" 515 | }, 516 | "suggest": { 517 | "php-curl": "For loading OID information from the web if they have not bee defined statically" 518 | }, 519 | "type": "library", 520 | "extra": { 521 | "branch-alias": { 522 | "dev-master": "2.0.x-dev" 523 | } 524 | }, 525 | "autoload": { 526 | "psr-4": { 527 | "FG\\": "lib/" 528 | } 529 | }, 530 | "notification-url": "https://packagist.org/downloads/", 531 | "license": [ 532 | "MIT" 533 | ], 534 | "authors": [ 535 | { 536 | "name": "Friedrich Große", 537 | "email": "friedrich.grosse@gmail.com", 538 | "homepage": "https://github.com/FGrosse", 539 | "role": "Author" 540 | }, 541 | { 542 | "name": "All contributors", 543 | "homepage": "https://github.com/FGrosse/PHPASN1/contributors" 544 | } 545 | ], 546 | "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.", 547 | "homepage": "https://github.com/FGrosse/PHPASN1", 548 | "keywords": [ 549 | "DER", 550 | "asn.1", 551 | "asn1", 552 | "ber", 553 | "binary", 554 | "decoding", 555 | "encoding", 556 | "x.509", 557 | "x.690", 558 | "x509", 559 | "x690" 560 | ], 561 | "time": "2017-12-17T10:21:51+00:00" 562 | }, 563 | { 564 | "name": "kornrunner/secp256k1", 565 | "version": "0.1.1", 566 | "source": { 567 | "type": "git", 568 | "url": "https://github.com/kornrunner/php-secp256k1.git", 569 | "reference": "24cc0bbac3405040e2f160f58e6fc2b6d9fe7a7c" 570 | }, 571 | "dist": { 572 | "type": "zip", 573 | "url": "https://api.github.com/repos/kornrunner/php-secp256k1/zipball/24cc0bbac3405040e2f160f58e6fc2b6d9fe7a7c", 574 | "reference": "24cc0bbac3405040e2f160f58e6fc2b6d9fe7a7c", 575 | "shasum": "" 576 | }, 577 | "require": { 578 | "mdanter/ecc": "~0.5", 579 | "php": ">=7.1" 580 | }, 581 | "require-dev": { 582 | "php-coveralls/php-coveralls": "^2.1", 583 | "phpunit/phpunit": "~7" 584 | }, 585 | "type": "library", 586 | "autoload": { 587 | "psr-4": { 588 | "kornrunner\\": "src/" 589 | } 590 | }, 591 | "notification-url": "https://packagist.org/downloads/", 592 | "license": [ 593 | "MIT" 594 | ], 595 | "authors": [ 596 | { 597 | "name": "Boris Momčilović", 598 | "email": "boris.momcilovic@gmail.com" 599 | } 600 | ], 601 | "description": "Pure PHP secp256k1", 602 | "time": "2018-07-25T13:32:20+00:00" 603 | }, 604 | { 605 | "name": "mdanter/ecc", 606 | "version": "v0.5.0", 607 | "source": { 608 | "type": "git", 609 | "url": "https://github.com/phpecc/phpecc.git", 610 | "reference": "ed5c6d496f5310de1b7071b8375fafa3559a1344" 611 | }, 612 | "dist": { 613 | "type": "zip", 614 | "url": "https://api.github.com/repos/phpecc/phpecc/zipball/ed5c6d496f5310de1b7071b8375fafa3559a1344", 615 | "reference": "ed5c6d496f5310de1b7071b8375fafa3559a1344", 616 | "shasum": "" 617 | }, 618 | "require": { 619 | "ext-gmp": "*", 620 | "fgrosse/phpasn1": "v2.0.x", 621 | "php": ">=7.0" 622 | }, 623 | "require-dev": { 624 | "phpunit/phpunit": "^6.0", 625 | "squizlabs/php_codesniffer": "~2", 626 | "symfony/yaml": "~2.6|~3.0" 627 | }, 628 | "type": "library", 629 | "autoload": { 630 | "psr-4": { 631 | "Mdanter\\Ecc\\": "src/" 632 | } 633 | }, 634 | "notification-url": "https://packagist.org/downloads/", 635 | "license": [ 636 | "MIT" 637 | ], 638 | "authors": [ 639 | { 640 | "name": "Matyas Danter", 641 | "homepage": "http://matejdanter.com/", 642 | "role": "Author" 643 | }, 644 | { 645 | "name": "Thibaud Fabre", 646 | "email": "thibaud@aztech.io", 647 | "homepage": "http://aztech.io", 648 | "role": "Maintainer" 649 | }, 650 | { 651 | "name": "Thomas Kerin", 652 | "email": "afk11@users.noreply.github.com", 653 | "role": "Maintainer" 654 | } 655 | ], 656 | "description": "PHP Elliptic Curve Cryptography library", 657 | "homepage": "https://github.com/phpecc/phpecc", 658 | "keywords": [ 659 | "Diffie", 660 | "ECDSA", 661 | "Hellman", 662 | "curve", 663 | "ecdh", 664 | "elliptic", 665 | "nistp192", 666 | "nistp224", 667 | "nistp256", 668 | "nistp384", 669 | "nistp521", 670 | "phpecc", 671 | "secp256k1", 672 | "secp256r1" 673 | ], 674 | "time": "2017-10-09T16:05:37+00:00" 675 | }, 676 | { 677 | "name": "myclabs/deep-copy", 678 | "version": "1.8.1", 679 | "source": { 680 | "type": "git", 681 | "url": "https://github.com/myclabs/DeepCopy.git", 682 | "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" 683 | }, 684 | "dist": { 685 | "type": "zip", 686 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", 687 | "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", 688 | "shasum": "" 689 | }, 690 | "require": { 691 | "php": "^7.1" 692 | }, 693 | "replace": { 694 | "myclabs/deep-copy": "self.version" 695 | }, 696 | "require-dev": { 697 | "doctrine/collections": "^1.0", 698 | "doctrine/common": "^2.6", 699 | "phpunit/phpunit": "^7.1" 700 | }, 701 | "type": "library", 702 | "autoload": { 703 | "psr-4": { 704 | "DeepCopy\\": "src/DeepCopy/" 705 | }, 706 | "files": [ 707 | "src/DeepCopy/deep_copy.php" 708 | ] 709 | }, 710 | "notification-url": "https://packagist.org/downloads/", 711 | "license": [ 712 | "MIT" 713 | ], 714 | "description": "Create deep copies (clones) of your objects", 715 | "keywords": [ 716 | "clone", 717 | "copy", 718 | "duplicate", 719 | "object", 720 | "object graph" 721 | ], 722 | "time": "2018-06-11T23:09:50+00:00" 723 | }, 724 | { 725 | "name": "phar-io/manifest", 726 | "version": "1.0.3", 727 | "source": { 728 | "type": "git", 729 | "url": "https://github.com/phar-io/manifest.git", 730 | "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" 731 | }, 732 | "dist": { 733 | "type": "zip", 734 | "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", 735 | "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", 736 | "shasum": "" 737 | }, 738 | "require": { 739 | "ext-dom": "*", 740 | "ext-phar": "*", 741 | "phar-io/version": "^2.0", 742 | "php": "^5.6 || ^7.0" 743 | }, 744 | "type": "library", 745 | "extra": { 746 | "branch-alias": { 747 | "dev-master": "1.0.x-dev" 748 | } 749 | }, 750 | "autoload": { 751 | "classmap": [ 752 | "src/" 753 | ] 754 | }, 755 | "notification-url": "https://packagist.org/downloads/", 756 | "license": [ 757 | "BSD-3-Clause" 758 | ], 759 | "authors": [ 760 | { 761 | "name": "Arne Blankerts", 762 | "email": "arne@blankerts.de", 763 | "role": "Developer" 764 | }, 765 | { 766 | "name": "Sebastian Heuer", 767 | "email": "sebastian@phpeople.de", 768 | "role": "Developer" 769 | }, 770 | { 771 | "name": "Sebastian Bergmann", 772 | "email": "sebastian@phpunit.de", 773 | "role": "Developer" 774 | } 775 | ], 776 | "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", 777 | "time": "2018-07-08T19:23:20+00:00" 778 | }, 779 | { 780 | "name": "phar-io/version", 781 | "version": "2.0.1", 782 | "source": { 783 | "type": "git", 784 | "url": "https://github.com/phar-io/version.git", 785 | "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" 786 | }, 787 | "dist": { 788 | "type": "zip", 789 | "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", 790 | "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", 791 | "shasum": "" 792 | }, 793 | "require": { 794 | "php": "^5.6 || ^7.0" 795 | }, 796 | "type": "library", 797 | "autoload": { 798 | "classmap": [ 799 | "src/" 800 | ] 801 | }, 802 | "notification-url": "https://packagist.org/downloads/", 803 | "license": [ 804 | "BSD-3-Clause" 805 | ], 806 | "authors": [ 807 | { 808 | "name": "Arne Blankerts", 809 | "email": "arne@blankerts.de", 810 | "role": "Developer" 811 | }, 812 | { 813 | "name": "Sebastian Heuer", 814 | "email": "sebastian@phpeople.de", 815 | "role": "Developer" 816 | }, 817 | { 818 | "name": "Sebastian Bergmann", 819 | "email": "sebastian@phpunit.de", 820 | "role": "Developer" 821 | } 822 | ], 823 | "description": "Library for handling version information and constraints", 824 | "time": "2018-07-08T19:19:57+00:00" 825 | }, 826 | { 827 | "name": "php-coveralls/php-coveralls", 828 | "version": "v2.1.0", 829 | "source": { 830 | "type": "git", 831 | "url": "https://github.com/php-coveralls/php-coveralls.git", 832 | "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d" 833 | }, 834 | "dist": { 835 | "type": "zip", 836 | "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3b00c229726f892bfdadeaf01ea430ffd04a939d", 837 | "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d", 838 | "shasum": "" 839 | }, 840 | "require": { 841 | "ext-json": "*", 842 | "ext-simplexml": "*", 843 | "guzzlehttp/guzzle": "^6.0", 844 | "php": "^5.5 || ^7.0", 845 | "psr/log": "^1.0", 846 | "symfony/config": "^2.1 || ^3.0 || ^4.0", 847 | "symfony/console": "^2.1 || ^3.0 || ^4.0", 848 | "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", 849 | "symfony/yaml": "^2.0 || ^3.0 || ^4.0" 850 | }, 851 | "require-dev": { 852 | "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" 853 | }, 854 | "suggest": { 855 | "symfony/http-kernel": "Allows Symfony integration" 856 | }, 857 | "bin": [ 858 | "bin/php-coveralls" 859 | ], 860 | "type": "library", 861 | "extra": { 862 | "branch-alias": { 863 | "dev-master": "2.1-dev" 864 | } 865 | }, 866 | "autoload": { 867 | "psr-4": { 868 | "PhpCoveralls\\": "src/" 869 | } 870 | }, 871 | "notification-url": "https://packagist.org/downloads/", 872 | "license": [ 873 | "MIT" 874 | ], 875 | "authors": [ 876 | { 877 | "name": "Kitamura Satoshi", 878 | "email": "with.no.parachute@gmail.com", 879 | "homepage": "https://www.facebook.com/satooshi.jp", 880 | "role": "Original creator" 881 | }, 882 | { 883 | "name": "Takashi Matsuo", 884 | "email": "tmatsuo@google.com" 885 | }, 886 | { 887 | "name": "Google Inc" 888 | }, 889 | { 890 | "name": "Dariusz Ruminski", 891 | "email": "dariusz.ruminski@gmail.com", 892 | "homepage": "https://github.com/keradus" 893 | }, 894 | { 895 | "name": "Contributors", 896 | "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" 897 | } 898 | ], 899 | "description": "PHP client library for Coveralls API", 900 | "homepage": "https://github.com/php-coveralls/php-coveralls", 901 | "keywords": [ 902 | "ci", 903 | "coverage", 904 | "github", 905 | "test" 906 | ], 907 | "time": "2018-05-22T23:11:08+00:00" 908 | }, 909 | { 910 | "name": "phpdocumentor/reflection-common", 911 | "version": "1.0.1", 912 | "source": { 913 | "type": "git", 914 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 915 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" 916 | }, 917 | "dist": { 918 | "type": "zip", 919 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 920 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 921 | "shasum": "" 922 | }, 923 | "require": { 924 | "php": ">=5.5" 925 | }, 926 | "require-dev": { 927 | "phpunit/phpunit": "^4.6" 928 | }, 929 | "type": "library", 930 | "extra": { 931 | "branch-alias": { 932 | "dev-master": "1.0.x-dev" 933 | } 934 | }, 935 | "autoload": { 936 | "psr-4": { 937 | "phpDocumentor\\Reflection\\": [ 938 | "src" 939 | ] 940 | } 941 | }, 942 | "notification-url": "https://packagist.org/downloads/", 943 | "license": [ 944 | "MIT" 945 | ], 946 | "authors": [ 947 | { 948 | "name": "Jaap van Otterdijk", 949 | "email": "opensource@ijaap.nl" 950 | } 951 | ], 952 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 953 | "homepage": "http://www.phpdoc.org", 954 | "keywords": [ 955 | "FQSEN", 956 | "phpDocumentor", 957 | "phpdoc", 958 | "reflection", 959 | "static analysis" 960 | ], 961 | "time": "2017-09-11T18:02:19+00:00" 962 | }, 963 | { 964 | "name": "phpdocumentor/reflection-docblock", 965 | "version": "4.3.0", 966 | "source": { 967 | "type": "git", 968 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 969 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08" 970 | }, 971 | "dist": { 972 | "type": "zip", 973 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", 974 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08", 975 | "shasum": "" 976 | }, 977 | "require": { 978 | "php": "^7.0", 979 | "phpdocumentor/reflection-common": "^1.0.0", 980 | "phpdocumentor/type-resolver": "^0.4.0", 981 | "webmozart/assert": "^1.0" 982 | }, 983 | "require-dev": { 984 | "doctrine/instantiator": "~1.0.5", 985 | "mockery/mockery": "^1.0", 986 | "phpunit/phpunit": "^6.4" 987 | }, 988 | "type": "library", 989 | "extra": { 990 | "branch-alias": { 991 | "dev-master": "4.x-dev" 992 | } 993 | }, 994 | "autoload": { 995 | "psr-4": { 996 | "phpDocumentor\\Reflection\\": [ 997 | "src/" 998 | ] 999 | } 1000 | }, 1001 | "notification-url": "https://packagist.org/downloads/", 1002 | "license": [ 1003 | "MIT" 1004 | ], 1005 | "authors": [ 1006 | { 1007 | "name": "Mike van Riel", 1008 | "email": "me@mikevanriel.com" 1009 | } 1010 | ], 1011 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 1012 | "time": "2017-11-30T07:14:17+00:00" 1013 | }, 1014 | { 1015 | "name": "phpdocumentor/type-resolver", 1016 | "version": "0.4.0", 1017 | "source": { 1018 | "type": "git", 1019 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 1020 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" 1021 | }, 1022 | "dist": { 1023 | "type": "zip", 1024 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", 1025 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", 1026 | "shasum": "" 1027 | }, 1028 | "require": { 1029 | "php": "^5.5 || ^7.0", 1030 | "phpdocumentor/reflection-common": "^1.0" 1031 | }, 1032 | "require-dev": { 1033 | "mockery/mockery": "^0.9.4", 1034 | "phpunit/phpunit": "^5.2||^4.8.24" 1035 | }, 1036 | "type": "library", 1037 | "extra": { 1038 | "branch-alias": { 1039 | "dev-master": "1.0.x-dev" 1040 | } 1041 | }, 1042 | "autoload": { 1043 | "psr-4": { 1044 | "phpDocumentor\\Reflection\\": [ 1045 | "src/" 1046 | ] 1047 | } 1048 | }, 1049 | "notification-url": "https://packagist.org/downloads/", 1050 | "license": [ 1051 | "MIT" 1052 | ], 1053 | "authors": [ 1054 | { 1055 | "name": "Mike van Riel", 1056 | "email": "me@mikevanriel.com" 1057 | } 1058 | ], 1059 | "time": "2017-07-14T14:27:02+00:00" 1060 | }, 1061 | { 1062 | "name": "phpspec/prophecy", 1063 | "version": "1.8.0", 1064 | "source": { 1065 | "type": "git", 1066 | "url": "https://github.com/phpspec/prophecy.git", 1067 | "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" 1068 | }, 1069 | "dist": { 1070 | "type": "zip", 1071 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", 1072 | "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", 1073 | "shasum": "" 1074 | }, 1075 | "require": { 1076 | "doctrine/instantiator": "^1.0.2", 1077 | "php": "^5.3|^7.0", 1078 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", 1079 | "sebastian/comparator": "^1.1|^2.0|^3.0", 1080 | "sebastian/recursion-context": "^1.0|^2.0|^3.0" 1081 | }, 1082 | "require-dev": { 1083 | "phpspec/phpspec": "^2.5|^3.2", 1084 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" 1085 | }, 1086 | "type": "library", 1087 | "extra": { 1088 | "branch-alias": { 1089 | "dev-master": "1.8.x-dev" 1090 | } 1091 | }, 1092 | "autoload": { 1093 | "psr-0": { 1094 | "Prophecy\\": "src/" 1095 | } 1096 | }, 1097 | "notification-url": "https://packagist.org/downloads/", 1098 | "license": [ 1099 | "MIT" 1100 | ], 1101 | "authors": [ 1102 | { 1103 | "name": "Konstantin Kudryashov", 1104 | "email": "ever.zet@gmail.com", 1105 | "homepage": "http://everzet.com" 1106 | }, 1107 | { 1108 | "name": "Marcello Duarte", 1109 | "email": "marcello.duarte@gmail.com" 1110 | } 1111 | ], 1112 | "description": "Highly opinionated mocking framework for PHP 5.3+", 1113 | "homepage": "https://github.com/phpspec/prophecy", 1114 | "keywords": [ 1115 | "Double", 1116 | "Dummy", 1117 | "fake", 1118 | "mock", 1119 | "spy", 1120 | "stub" 1121 | ], 1122 | "time": "2018-08-05T17:53:17+00:00" 1123 | }, 1124 | { 1125 | "name": "phpunit/php-code-coverage", 1126 | "version": "6.1.3", 1127 | "source": { 1128 | "type": "git", 1129 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 1130 | "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f" 1131 | }, 1132 | "dist": { 1133 | "type": "zip", 1134 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4d3ae9b21a7d7e440bd0cf65565533117976859f", 1135 | "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f", 1136 | "shasum": "" 1137 | }, 1138 | "require": { 1139 | "ext-dom": "*", 1140 | "ext-xmlwriter": "*", 1141 | "php": "^7.1", 1142 | "phpunit/php-file-iterator": "^2.0", 1143 | "phpunit/php-text-template": "^1.2.1", 1144 | "phpunit/php-token-stream": "^3.0", 1145 | "sebastian/code-unit-reverse-lookup": "^1.0.1", 1146 | "sebastian/environment": "^3.1 || ^4.0", 1147 | "sebastian/version": "^2.0.1", 1148 | "theseer/tokenizer": "^1.1" 1149 | }, 1150 | "require-dev": { 1151 | "phpunit/phpunit": "^7.0" 1152 | }, 1153 | "suggest": { 1154 | "ext-xdebug": "^2.6.0" 1155 | }, 1156 | "type": "library", 1157 | "extra": { 1158 | "branch-alias": { 1159 | "dev-master": "6.1-dev" 1160 | } 1161 | }, 1162 | "autoload": { 1163 | "classmap": [ 1164 | "src/" 1165 | ] 1166 | }, 1167 | "notification-url": "https://packagist.org/downloads/", 1168 | "license": [ 1169 | "BSD-3-Clause" 1170 | ], 1171 | "authors": [ 1172 | { 1173 | "name": "Sebastian Bergmann", 1174 | "email": "sebastian@phpunit.de", 1175 | "role": "lead" 1176 | } 1177 | ], 1178 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 1179 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 1180 | "keywords": [ 1181 | "coverage", 1182 | "testing", 1183 | "xunit" 1184 | ], 1185 | "time": "2018-10-23T05:59:32+00:00" 1186 | }, 1187 | { 1188 | "name": "phpunit/php-file-iterator", 1189 | "version": "2.0.2", 1190 | "source": { 1191 | "type": "git", 1192 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 1193 | "reference": "050bedf145a257b1ff02746c31894800e5122946" 1194 | }, 1195 | "dist": { 1196 | "type": "zip", 1197 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", 1198 | "reference": "050bedf145a257b1ff02746c31894800e5122946", 1199 | "shasum": "" 1200 | }, 1201 | "require": { 1202 | "php": "^7.1" 1203 | }, 1204 | "require-dev": { 1205 | "phpunit/phpunit": "^7.1" 1206 | }, 1207 | "type": "library", 1208 | "extra": { 1209 | "branch-alias": { 1210 | "dev-master": "2.0.x-dev" 1211 | } 1212 | }, 1213 | "autoload": { 1214 | "classmap": [ 1215 | "src/" 1216 | ] 1217 | }, 1218 | "notification-url": "https://packagist.org/downloads/", 1219 | "license": [ 1220 | "BSD-3-Clause" 1221 | ], 1222 | "authors": [ 1223 | { 1224 | "name": "Sebastian Bergmann", 1225 | "email": "sebastian@phpunit.de", 1226 | "role": "lead" 1227 | } 1228 | ], 1229 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 1230 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 1231 | "keywords": [ 1232 | "filesystem", 1233 | "iterator" 1234 | ], 1235 | "time": "2018-09-13T20:33:42+00:00" 1236 | }, 1237 | { 1238 | "name": "phpunit/php-text-template", 1239 | "version": "1.2.1", 1240 | "source": { 1241 | "type": "git", 1242 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 1243 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 1244 | }, 1245 | "dist": { 1246 | "type": "zip", 1247 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1248 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1249 | "shasum": "" 1250 | }, 1251 | "require": { 1252 | "php": ">=5.3.3" 1253 | }, 1254 | "type": "library", 1255 | "autoload": { 1256 | "classmap": [ 1257 | "src/" 1258 | ] 1259 | }, 1260 | "notification-url": "https://packagist.org/downloads/", 1261 | "license": [ 1262 | "BSD-3-Clause" 1263 | ], 1264 | "authors": [ 1265 | { 1266 | "name": "Sebastian Bergmann", 1267 | "email": "sebastian@phpunit.de", 1268 | "role": "lead" 1269 | } 1270 | ], 1271 | "description": "Simple template engine.", 1272 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 1273 | "keywords": [ 1274 | "template" 1275 | ], 1276 | "time": "2015-06-21T13:50:34+00:00" 1277 | }, 1278 | { 1279 | "name": "phpunit/php-timer", 1280 | "version": "2.0.0", 1281 | "source": { 1282 | "type": "git", 1283 | "url": "https://github.com/sebastianbergmann/php-timer.git", 1284 | "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" 1285 | }, 1286 | "dist": { 1287 | "type": "zip", 1288 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", 1289 | "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", 1290 | "shasum": "" 1291 | }, 1292 | "require": { 1293 | "php": "^7.1" 1294 | }, 1295 | "require-dev": { 1296 | "phpunit/phpunit": "^7.0" 1297 | }, 1298 | "type": "library", 1299 | "extra": { 1300 | "branch-alias": { 1301 | "dev-master": "2.0-dev" 1302 | } 1303 | }, 1304 | "autoload": { 1305 | "classmap": [ 1306 | "src/" 1307 | ] 1308 | }, 1309 | "notification-url": "https://packagist.org/downloads/", 1310 | "license": [ 1311 | "BSD-3-Clause" 1312 | ], 1313 | "authors": [ 1314 | { 1315 | "name": "Sebastian Bergmann", 1316 | "email": "sebastian@phpunit.de", 1317 | "role": "lead" 1318 | } 1319 | ], 1320 | "description": "Utility class for timing", 1321 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 1322 | "keywords": [ 1323 | "timer" 1324 | ], 1325 | "time": "2018-02-01T13:07:23+00:00" 1326 | }, 1327 | { 1328 | "name": "phpunit/php-token-stream", 1329 | "version": "3.0.1", 1330 | "source": { 1331 | "type": "git", 1332 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 1333 | "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" 1334 | }, 1335 | "dist": { 1336 | "type": "zip", 1337 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", 1338 | "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", 1339 | "shasum": "" 1340 | }, 1341 | "require": { 1342 | "ext-tokenizer": "*", 1343 | "php": "^7.1" 1344 | }, 1345 | "require-dev": { 1346 | "phpunit/phpunit": "^7.0" 1347 | }, 1348 | "type": "library", 1349 | "extra": { 1350 | "branch-alias": { 1351 | "dev-master": "3.0-dev" 1352 | } 1353 | }, 1354 | "autoload": { 1355 | "classmap": [ 1356 | "src/" 1357 | ] 1358 | }, 1359 | "notification-url": "https://packagist.org/downloads/", 1360 | "license": [ 1361 | "BSD-3-Clause" 1362 | ], 1363 | "authors": [ 1364 | { 1365 | "name": "Sebastian Bergmann", 1366 | "email": "sebastian@phpunit.de" 1367 | } 1368 | ], 1369 | "description": "Wrapper around PHP's tokenizer extension.", 1370 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 1371 | "keywords": [ 1372 | "tokenizer" 1373 | ], 1374 | "time": "2018-10-30T05:52:18+00:00" 1375 | }, 1376 | { 1377 | "name": "phpunit/phpunit", 1378 | "version": "7.4.3", 1379 | "source": { 1380 | "type": "git", 1381 | "url": "https://github.com/sebastianbergmann/phpunit.git", 1382 | "reference": "c151651fb6ed264038d486ea262e243af72e5e64" 1383 | }, 1384 | "dist": { 1385 | "type": "zip", 1386 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c151651fb6ed264038d486ea262e243af72e5e64", 1387 | "reference": "c151651fb6ed264038d486ea262e243af72e5e64", 1388 | "shasum": "" 1389 | }, 1390 | "require": { 1391 | "doctrine/instantiator": "^1.1", 1392 | "ext-dom": "*", 1393 | "ext-json": "*", 1394 | "ext-libxml": "*", 1395 | "ext-mbstring": "*", 1396 | "ext-xml": "*", 1397 | "myclabs/deep-copy": "^1.7", 1398 | "phar-io/manifest": "^1.0.2", 1399 | "phar-io/version": "^2.0", 1400 | "php": "^7.1", 1401 | "phpspec/prophecy": "^1.7", 1402 | "phpunit/php-code-coverage": "^6.0.7", 1403 | "phpunit/php-file-iterator": "^2.0.1", 1404 | "phpunit/php-text-template": "^1.2.1", 1405 | "phpunit/php-timer": "^2.0", 1406 | "sebastian/comparator": "^3.0", 1407 | "sebastian/diff": "^3.0", 1408 | "sebastian/environment": "^3.1 || ^4.0", 1409 | "sebastian/exporter": "^3.1", 1410 | "sebastian/global-state": "^2.0", 1411 | "sebastian/object-enumerator": "^3.0.3", 1412 | "sebastian/resource-operations": "^2.0", 1413 | "sebastian/version": "^2.0.1" 1414 | }, 1415 | "conflict": { 1416 | "phpunit/phpunit-mock-objects": "*" 1417 | }, 1418 | "require-dev": { 1419 | "ext-pdo": "*" 1420 | }, 1421 | "suggest": { 1422 | "ext-soap": "*", 1423 | "ext-xdebug": "*", 1424 | "phpunit/php-invoker": "^2.0" 1425 | }, 1426 | "bin": [ 1427 | "phpunit" 1428 | ], 1429 | "type": "library", 1430 | "extra": { 1431 | "branch-alias": { 1432 | "dev-master": "7.4-dev" 1433 | } 1434 | }, 1435 | "autoload": { 1436 | "classmap": [ 1437 | "src/" 1438 | ] 1439 | }, 1440 | "notification-url": "https://packagist.org/downloads/", 1441 | "license": [ 1442 | "BSD-3-Clause" 1443 | ], 1444 | "authors": [ 1445 | { 1446 | "name": "Sebastian Bergmann", 1447 | "email": "sebastian@phpunit.de", 1448 | "role": "lead" 1449 | } 1450 | ], 1451 | "description": "The PHP Unit Testing framework.", 1452 | "homepage": "https://phpunit.de/", 1453 | "keywords": [ 1454 | "phpunit", 1455 | "testing", 1456 | "xunit" 1457 | ], 1458 | "time": "2018-10-23T05:57:41+00:00" 1459 | }, 1460 | { 1461 | "name": "psr/log", 1462 | "version": "1.0.2", 1463 | "source": { 1464 | "type": "git", 1465 | "url": "https://github.com/php-fig/log.git", 1466 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" 1467 | }, 1468 | "dist": { 1469 | "type": "zip", 1470 | "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 1471 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 1472 | "shasum": "" 1473 | }, 1474 | "require": { 1475 | "php": ">=5.3.0" 1476 | }, 1477 | "type": "library", 1478 | "extra": { 1479 | "branch-alias": { 1480 | "dev-master": "1.0.x-dev" 1481 | } 1482 | }, 1483 | "autoload": { 1484 | "psr-4": { 1485 | "Psr\\Log\\": "Psr/Log/" 1486 | } 1487 | }, 1488 | "notification-url": "https://packagist.org/downloads/", 1489 | "license": [ 1490 | "MIT" 1491 | ], 1492 | "authors": [ 1493 | { 1494 | "name": "PHP-FIG", 1495 | "homepage": "http://www.php-fig.org/" 1496 | } 1497 | ], 1498 | "description": "Common interface for logging libraries", 1499 | "homepage": "https://github.com/php-fig/log", 1500 | "keywords": [ 1501 | "log", 1502 | "psr", 1503 | "psr-3" 1504 | ], 1505 | "time": "2016-10-10T12:19:37+00:00" 1506 | }, 1507 | { 1508 | "name": "sebastian/code-unit-reverse-lookup", 1509 | "version": "1.0.1", 1510 | "source": { 1511 | "type": "git", 1512 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1513 | "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" 1514 | }, 1515 | "dist": { 1516 | "type": "zip", 1517 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", 1518 | "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", 1519 | "shasum": "" 1520 | }, 1521 | "require": { 1522 | "php": "^5.6 || ^7.0" 1523 | }, 1524 | "require-dev": { 1525 | "phpunit/phpunit": "^5.7 || ^6.0" 1526 | }, 1527 | "type": "library", 1528 | "extra": { 1529 | "branch-alias": { 1530 | "dev-master": "1.0.x-dev" 1531 | } 1532 | }, 1533 | "autoload": { 1534 | "classmap": [ 1535 | "src/" 1536 | ] 1537 | }, 1538 | "notification-url": "https://packagist.org/downloads/", 1539 | "license": [ 1540 | "BSD-3-Clause" 1541 | ], 1542 | "authors": [ 1543 | { 1544 | "name": "Sebastian Bergmann", 1545 | "email": "sebastian@phpunit.de" 1546 | } 1547 | ], 1548 | "description": "Looks up which function or method a line of code belongs to", 1549 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1550 | "time": "2017-03-04T06:30:41+00:00" 1551 | }, 1552 | { 1553 | "name": "sebastian/comparator", 1554 | "version": "3.0.2", 1555 | "source": { 1556 | "type": "git", 1557 | "url": "https://github.com/sebastianbergmann/comparator.git", 1558 | "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" 1559 | }, 1560 | "dist": { 1561 | "type": "zip", 1562 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", 1563 | "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", 1564 | "shasum": "" 1565 | }, 1566 | "require": { 1567 | "php": "^7.1", 1568 | "sebastian/diff": "^3.0", 1569 | "sebastian/exporter": "^3.1" 1570 | }, 1571 | "require-dev": { 1572 | "phpunit/phpunit": "^7.1" 1573 | }, 1574 | "type": "library", 1575 | "extra": { 1576 | "branch-alias": { 1577 | "dev-master": "3.0-dev" 1578 | } 1579 | }, 1580 | "autoload": { 1581 | "classmap": [ 1582 | "src/" 1583 | ] 1584 | }, 1585 | "notification-url": "https://packagist.org/downloads/", 1586 | "license": [ 1587 | "BSD-3-Clause" 1588 | ], 1589 | "authors": [ 1590 | { 1591 | "name": "Jeff Welch", 1592 | "email": "whatthejeff@gmail.com" 1593 | }, 1594 | { 1595 | "name": "Volker Dusch", 1596 | "email": "github@wallbash.com" 1597 | }, 1598 | { 1599 | "name": "Bernhard Schussek", 1600 | "email": "bschussek@2bepublished.at" 1601 | }, 1602 | { 1603 | "name": "Sebastian Bergmann", 1604 | "email": "sebastian@phpunit.de" 1605 | } 1606 | ], 1607 | "description": "Provides the functionality to compare PHP values for equality", 1608 | "homepage": "https://github.com/sebastianbergmann/comparator", 1609 | "keywords": [ 1610 | "comparator", 1611 | "compare", 1612 | "equality" 1613 | ], 1614 | "time": "2018-07-12T15:12:46+00:00" 1615 | }, 1616 | { 1617 | "name": "sebastian/diff", 1618 | "version": "3.0.1", 1619 | "source": { 1620 | "type": "git", 1621 | "url": "https://github.com/sebastianbergmann/diff.git", 1622 | "reference": "366541b989927187c4ca70490a35615d3fef2dce" 1623 | }, 1624 | "dist": { 1625 | "type": "zip", 1626 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", 1627 | "reference": "366541b989927187c4ca70490a35615d3fef2dce", 1628 | "shasum": "" 1629 | }, 1630 | "require": { 1631 | "php": "^7.1" 1632 | }, 1633 | "require-dev": { 1634 | "phpunit/phpunit": "^7.0", 1635 | "symfony/process": "^2 || ^3.3 || ^4" 1636 | }, 1637 | "type": "library", 1638 | "extra": { 1639 | "branch-alias": { 1640 | "dev-master": "3.0-dev" 1641 | } 1642 | }, 1643 | "autoload": { 1644 | "classmap": [ 1645 | "src/" 1646 | ] 1647 | }, 1648 | "notification-url": "https://packagist.org/downloads/", 1649 | "license": [ 1650 | "BSD-3-Clause" 1651 | ], 1652 | "authors": [ 1653 | { 1654 | "name": "Kore Nordmann", 1655 | "email": "mail@kore-nordmann.de" 1656 | }, 1657 | { 1658 | "name": "Sebastian Bergmann", 1659 | "email": "sebastian@phpunit.de" 1660 | } 1661 | ], 1662 | "description": "Diff implementation", 1663 | "homepage": "https://github.com/sebastianbergmann/diff", 1664 | "keywords": [ 1665 | "diff", 1666 | "udiff", 1667 | "unidiff", 1668 | "unified diff" 1669 | ], 1670 | "time": "2018-06-10T07:54:39+00:00" 1671 | }, 1672 | { 1673 | "name": "sebastian/environment", 1674 | "version": "3.1.0", 1675 | "source": { 1676 | "type": "git", 1677 | "url": "https://github.com/sebastianbergmann/environment.git", 1678 | "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" 1679 | }, 1680 | "dist": { 1681 | "type": "zip", 1682 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", 1683 | "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", 1684 | "shasum": "" 1685 | }, 1686 | "require": { 1687 | "php": "^7.0" 1688 | }, 1689 | "require-dev": { 1690 | "phpunit/phpunit": "^6.1" 1691 | }, 1692 | "type": "library", 1693 | "extra": { 1694 | "branch-alias": { 1695 | "dev-master": "3.1.x-dev" 1696 | } 1697 | }, 1698 | "autoload": { 1699 | "classmap": [ 1700 | "src/" 1701 | ] 1702 | }, 1703 | "notification-url": "https://packagist.org/downloads/", 1704 | "license": [ 1705 | "BSD-3-Clause" 1706 | ], 1707 | "authors": [ 1708 | { 1709 | "name": "Sebastian Bergmann", 1710 | "email": "sebastian@phpunit.de" 1711 | } 1712 | ], 1713 | "description": "Provides functionality to handle HHVM/PHP environments", 1714 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1715 | "keywords": [ 1716 | "Xdebug", 1717 | "environment", 1718 | "hhvm" 1719 | ], 1720 | "time": "2017-07-01T08:51:00+00:00" 1721 | }, 1722 | { 1723 | "name": "sebastian/exporter", 1724 | "version": "3.1.0", 1725 | "source": { 1726 | "type": "git", 1727 | "url": "https://github.com/sebastianbergmann/exporter.git", 1728 | "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" 1729 | }, 1730 | "dist": { 1731 | "type": "zip", 1732 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", 1733 | "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", 1734 | "shasum": "" 1735 | }, 1736 | "require": { 1737 | "php": "^7.0", 1738 | "sebastian/recursion-context": "^3.0" 1739 | }, 1740 | "require-dev": { 1741 | "ext-mbstring": "*", 1742 | "phpunit/phpunit": "^6.0" 1743 | }, 1744 | "type": "library", 1745 | "extra": { 1746 | "branch-alias": { 1747 | "dev-master": "3.1.x-dev" 1748 | } 1749 | }, 1750 | "autoload": { 1751 | "classmap": [ 1752 | "src/" 1753 | ] 1754 | }, 1755 | "notification-url": "https://packagist.org/downloads/", 1756 | "license": [ 1757 | "BSD-3-Clause" 1758 | ], 1759 | "authors": [ 1760 | { 1761 | "name": "Jeff Welch", 1762 | "email": "whatthejeff@gmail.com" 1763 | }, 1764 | { 1765 | "name": "Volker Dusch", 1766 | "email": "github@wallbash.com" 1767 | }, 1768 | { 1769 | "name": "Bernhard Schussek", 1770 | "email": "bschussek@2bepublished.at" 1771 | }, 1772 | { 1773 | "name": "Sebastian Bergmann", 1774 | "email": "sebastian@phpunit.de" 1775 | }, 1776 | { 1777 | "name": "Adam Harvey", 1778 | "email": "aharvey@php.net" 1779 | } 1780 | ], 1781 | "description": "Provides the functionality to export PHP variables for visualization", 1782 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1783 | "keywords": [ 1784 | "export", 1785 | "exporter" 1786 | ], 1787 | "time": "2017-04-03T13:19:02+00:00" 1788 | }, 1789 | { 1790 | "name": "sebastian/global-state", 1791 | "version": "2.0.0", 1792 | "source": { 1793 | "type": "git", 1794 | "url": "https://github.com/sebastianbergmann/global-state.git", 1795 | "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" 1796 | }, 1797 | "dist": { 1798 | "type": "zip", 1799 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", 1800 | "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", 1801 | "shasum": "" 1802 | }, 1803 | "require": { 1804 | "php": "^7.0" 1805 | }, 1806 | "require-dev": { 1807 | "phpunit/phpunit": "^6.0" 1808 | }, 1809 | "suggest": { 1810 | "ext-uopz": "*" 1811 | }, 1812 | "type": "library", 1813 | "extra": { 1814 | "branch-alias": { 1815 | "dev-master": "2.0-dev" 1816 | } 1817 | }, 1818 | "autoload": { 1819 | "classmap": [ 1820 | "src/" 1821 | ] 1822 | }, 1823 | "notification-url": "https://packagist.org/downloads/", 1824 | "license": [ 1825 | "BSD-3-Clause" 1826 | ], 1827 | "authors": [ 1828 | { 1829 | "name": "Sebastian Bergmann", 1830 | "email": "sebastian@phpunit.de" 1831 | } 1832 | ], 1833 | "description": "Snapshotting of global state", 1834 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1835 | "keywords": [ 1836 | "global state" 1837 | ], 1838 | "time": "2017-04-27T15:39:26+00:00" 1839 | }, 1840 | { 1841 | "name": "sebastian/object-enumerator", 1842 | "version": "3.0.3", 1843 | "source": { 1844 | "type": "git", 1845 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 1846 | "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" 1847 | }, 1848 | "dist": { 1849 | "type": "zip", 1850 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", 1851 | "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", 1852 | "shasum": "" 1853 | }, 1854 | "require": { 1855 | "php": "^7.0", 1856 | "sebastian/object-reflector": "^1.1.1", 1857 | "sebastian/recursion-context": "^3.0" 1858 | }, 1859 | "require-dev": { 1860 | "phpunit/phpunit": "^6.0" 1861 | }, 1862 | "type": "library", 1863 | "extra": { 1864 | "branch-alias": { 1865 | "dev-master": "3.0.x-dev" 1866 | } 1867 | }, 1868 | "autoload": { 1869 | "classmap": [ 1870 | "src/" 1871 | ] 1872 | }, 1873 | "notification-url": "https://packagist.org/downloads/", 1874 | "license": [ 1875 | "BSD-3-Clause" 1876 | ], 1877 | "authors": [ 1878 | { 1879 | "name": "Sebastian Bergmann", 1880 | "email": "sebastian@phpunit.de" 1881 | } 1882 | ], 1883 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 1884 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 1885 | "time": "2017-08-03T12:35:26+00:00" 1886 | }, 1887 | { 1888 | "name": "sebastian/object-reflector", 1889 | "version": "1.1.1", 1890 | "source": { 1891 | "type": "git", 1892 | "url": "https://github.com/sebastianbergmann/object-reflector.git", 1893 | "reference": "773f97c67f28de00d397be301821b06708fca0be" 1894 | }, 1895 | "dist": { 1896 | "type": "zip", 1897 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", 1898 | "reference": "773f97c67f28de00d397be301821b06708fca0be", 1899 | "shasum": "" 1900 | }, 1901 | "require": { 1902 | "php": "^7.0" 1903 | }, 1904 | "require-dev": { 1905 | "phpunit/phpunit": "^6.0" 1906 | }, 1907 | "type": "library", 1908 | "extra": { 1909 | "branch-alias": { 1910 | "dev-master": "1.1-dev" 1911 | } 1912 | }, 1913 | "autoload": { 1914 | "classmap": [ 1915 | "src/" 1916 | ] 1917 | }, 1918 | "notification-url": "https://packagist.org/downloads/", 1919 | "license": [ 1920 | "BSD-3-Clause" 1921 | ], 1922 | "authors": [ 1923 | { 1924 | "name": "Sebastian Bergmann", 1925 | "email": "sebastian@phpunit.de" 1926 | } 1927 | ], 1928 | "description": "Allows reflection of object attributes, including inherited and non-public ones", 1929 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", 1930 | "time": "2017-03-29T09:07:27+00:00" 1931 | }, 1932 | { 1933 | "name": "sebastian/recursion-context", 1934 | "version": "3.0.0", 1935 | "source": { 1936 | "type": "git", 1937 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1938 | "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" 1939 | }, 1940 | "dist": { 1941 | "type": "zip", 1942 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", 1943 | "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", 1944 | "shasum": "" 1945 | }, 1946 | "require": { 1947 | "php": "^7.0" 1948 | }, 1949 | "require-dev": { 1950 | "phpunit/phpunit": "^6.0" 1951 | }, 1952 | "type": "library", 1953 | "extra": { 1954 | "branch-alias": { 1955 | "dev-master": "3.0.x-dev" 1956 | } 1957 | }, 1958 | "autoload": { 1959 | "classmap": [ 1960 | "src/" 1961 | ] 1962 | }, 1963 | "notification-url": "https://packagist.org/downloads/", 1964 | "license": [ 1965 | "BSD-3-Clause" 1966 | ], 1967 | "authors": [ 1968 | { 1969 | "name": "Jeff Welch", 1970 | "email": "whatthejeff@gmail.com" 1971 | }, 1972 | { 1973 | "name": "Sebastian Bergmann", 1974 | "email": "sebastian@phpunit.de" 1975 | }, 1976 | { 1977 | "name": "Adam Harvey", 1978 | "email": "aharvey@php.net" 1979 | } 1980 | ], 1981 | "description": "Provides functionality to recursively process PHP variables", 1982 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1983 | "time": "2017-03-03T06:23:57+00:00" 1984 | }, 1985 | { 1986 | "name": "sebastian/resource-operations", 1987 | "version": "2.0.1", 1988 | "source": { 1989 | "type": "git", 1990 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 1991 | "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" 1992 | }, 1993 | "dist": { 1994 | "type": "zip", 1995 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", 1996 | "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", 1997 | "shasum": "" 1998 | }, 1999 | "require": { 2000 | "php": "^7.1" 2001 | }, 2002 | "type": "library", 2003 | "extra": { 2004 | "branch-alias": { 2005 | "dev-master": "2.0-dev" 2006 | } 2007 | }, 2008 | "autoload": { 2009 | "classmap": [ 2010 | "src/" 2011 | ] 2012 | }, 2013 | "notification-url": "https://packagist.org/downloads/", 2014 | "license": [ 2015 | "BSD-3-Clause" 2016 | ], 2017 | "authors": [ 2018 | { 2019 | "name": "Sebastian Bergmann", 2020 | "email": "sebastian@phpunit.de" 2021 | } 2022 | ], 2023 | "description": "Provides a list of PHP built-in functions that operate on resources", 2024 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 2025 | "time": "2018-10-04T04:07:39+00:00" 2026 | }, 2027 | { 2028 | "name": "sebastian/version", 2029 | "version": "2.0.1", 2030 | "source": { 2031 | "type": "git", 2032 | "url": "https://github.com/sebastianbergmann/version.git", 2033 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" 2034 | }, 2035 | "dist": { 2036 | "type": "zip", 2037 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", 2038 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", 2039 | "shasum": "" 2040 | }, 2041 | "require": { 2042 | "php": ">=5.6" 2043 | }, 2044 | "type": "library", 2045 | "extra": { 2046 | "branch-alias": { 2047 | "dev-master": "2.0.x-dev" 2048 | } 2049 | }, 2050 | "autoload": { 2051 | "classmap": [ 2052 | "src/" 2053 | ] 2054 | }, 2055 | "notification-url": "https://packagist.org/downloads/", 2056 | "license": [ 2057 | "BSD-3-Clause" 2058 | ], 2059 | "authors": [ 2060 | { 2061 | "name": "Sebastian Bergmann", 2062 | "email": "sebastian@phpunit.de", 2063 | "role": "lead" 2064 | } 2065 | ], 2066 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 2067 | "homepage": "https://github.com/sebastianbergmann/version", 2068 | "time": "2016-10-03T07:35:21+00:00" 2069 | }, 2070 | { 2071 | "name": "symfony/config", 2072 | "version": "v4.1.6", 2073 | "source": { 2074 | "type": "git", 2075 | "url": "https://github.com/symfony/config.git", 2076 | "reference": "b3d4d7b567d7a49e6dfafb6d4760abc921177c96" 2077 | }, 2078 | "dist": { 2079 | "type": "zip", 2080 | "url": "https://api.github.com/repos/symfony/config/zipball/b3d4d7b567d7a49e6dfafb6d4760abc921177c96", 2081 | "reference": "b3d4d7b567d7a49e6dfafb6d4760abc921177c96", 2082 | "shasum": "" 2083 | }, 2084 | "require": { 2085 | "php": "^7.1.3", 2086 | "symfony/filesystem": "~3.4|~4.0", 2087 | "symfony/polyfill-ctype": "~1.8" 2088 | }, 2089 | "conflict": { 2090 | "symfony/finder": "<3.4" 2091 | }, 2092 | "require-dev": { 2093 | "symfony/dependency-injection": "~3.4|~4.0", 2094 | "symfony/event-dispatcher": "~3.4|~4.0", 2095 | "symfony/finder": "~3.4|~4.0", 2096 | "symfony/yaml": "~3.4|~4.0" 2097 | }, 2098 | "suggest": { 2099 | "symfony/yaml": "To use the yaml reference dumper" 2100 | }, 2101 | "type": "library", 2102 | "extra": { 2103 | "branch-alias": { 2104 | "dev-master": "4.1-dev" 2105 | } 2106 | }, 2107 | "autoload": { 2108 | "psr-4": { 2109 | "Symfony\\Component\\Config\\": "" 2110 | }, 2111 | "exclude-from-classmap": [ 2112 | "/Tests/" 2113 | ] 2114 | }, 2115 | "notification-url": "https://packagist.org/downloads/", 2116 | "license": [ 2117 | "MIT" 2118 | ], 2119 | "authors": [ 2120 | { 2121 | "name": "Fabien Potencier", 2122 | "email": "fabien@symfony.com" 2123 | }, 2124 | { 2125 | "name": "Symfony Community", 2126 | "homepage": "https://symfony.com/contributors" 2127 | } 2128 | ], 2129 | "description": "Symfony Config Component", 2130 | "homepage": "https://symfony.com", 2131 | "time": "2018-09-08T13:24:10+00:00" 2132 | }, 2133 | { 2134 | "name": "symfony/console", 2135 | "version": "v4.1.6", 2136 | "source": { 2137 | "type": "git", 2138 | "url": "https://github.com/symfony/console.git", 2139 | "reference": "dc7122fe5f6113cfaba3b3de575d31112c9aa60b" 2140 | }, 2141 | "dist": { 2142 | "type": "zip", 2143 | "url": "https://api.github.com/repos/symfony/console/zipball/dc7122fe5f6113cfaba3b3de575d31112c9aa60b", 2144 | "reference": "dc7122fe5f6113cfaba3b3de575d31112c9aa60b", 2145 | "shasum": "" 2146 | }, 2147 | "require": { 2148 | "php": "^7.1.3", 2149 | "symfony/polyfill-mbstring": "~1.0" 2150 | }, 2151 | "conflict": { 2152 | "symfony/dependency-injection": "<3.4", 2153 | "symfony/process": "<3.3" 2154 | }, 2155 | "require-dev": { 2156 | "psr/log": "~1.0", 2157 | "symfony/config": "~3.4|~4.0", 2158 | "symfony/dependency-injection": "~3.4|~4.0", 2159 | "symfony/event-dispatcher": "~3.4|~4.0", 2160 | "symfony/lock": "~3.4|~4.0", 2161 | "symfony/process": "~3.4|~4.0" 2162 | }, 2163 | "suggest": { 2164 | "psr/log-implementation": "For using the console logger", 2165 | "symfony/event-dispatcher": "", 2166 | "symfony/lock": "", 2167 | "symfony/process": "" 2168 | }, 2169 | "type": "library", 2170 | "extra": { 2171 | "branch-alias": { 2172 | "dev-master": "4.1-dev" 2173 | } 2174 | }, 2175 | "autoload": { 2176 | "psr-4": { 2177 | "Symfony\\Component\\Console\\": "" 2178 | }, 2179 | "exclude-from-classmap": [ 2180 | "/Tests/" 2181 | ] 2182 | }, 2183 | "notification-url": "https://packagist.org/downloads/", 2184 | "license": [ 2185 | "MIT" 2186 | ], 2187 | "authors": [ 2188 | { 2189 | "name": "Fabien Potencier", 2190 | "email": "fabien@symfony.com" 2191 | }, 2192 | { 2193 | "name": "Symfony Community", 2194 | "homepage": "https://symfony.com/contributors" 2195 | } 2196 | ], 2197 | "description": "Symfony Console Component", 2198 | "homepage": "https://symfony.com", 2199 | "time": "2018-10-03T08:15:46+00:00" 2200 | }, 2201 | { 2202 | "name": "symfony/filesystem", 2203 | "version": "v4.1.6", 2204 | "source": { 2205 | "type": "git", 2206 | "url": "https://github.com/symfony/filesystem.git", 2207 | "reference": "596d12b40624055c300c8b619755b748ca5cf0b5" 2208 | }, 2209 | "dist": { 2210 | "type": "zip", 2211 | "url": "https://api.github.com/repos/symfony/filesystem/zipball/596d12b40624055c300c8b619755b748ca5cf0b5", 2212 | "reference": "596d12b40624055c300c8b619755b748ca5cf0b5", 2213 | "shasum": "" 2214 | }, 2215 | "require": { 2216 | "php": "^7.1.3", 2217 | "symfony/polyfill-ctype": "~1.8" 2218 | }, 2219 | "type": "library", 2220 | "extra": { 2221 | "branch-alias": { 2222 | "dev-master": "4.1-dev" 2223 | } 2224 | }, 2225 | "autoload": { 2226 | "psr-4": { 2227 | "Symfony\\Component\\Filesystem\\": "" 2228 | }, 2229 | "exclude-from-classmap": [ 2230 | "/Tests/" 2231 | ] 2232 | }, 2233 | "notification-url": "https://packagist.org/downloads/", 2234 | "license": [ 2235 | "MIT" 2236 | ], 2237 | "authors": [ 2238 | { 2239 | "name": "Fabien Potencier", 2240 | "email": "fabien@symfony.com" 2241 | }, 2242 | { 2243 | "name": "Symfony Community", 2244 | "homepage": "https://symfony.com/contributors" 2245 | } 2246 | ], 2247 | "description": "Symfony Filesystem Component", 2248 | "homepage": "https://symfony.com", 2249 | "time": "2018-10-02T12:40:59+00:00" 2250 | }, 2251 | { 2252 | "name": "symfony/polyfill-ctype", 2253 | "version": "v1.9.0", 2254 | "source": { 2255 | "type": "git", 2256 | "url": "https://github.com/symfony/polyfill-ctype.git", 2257 | "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" 2258 | }, 2259 | "dist": { 2260 | "type": "zip", 2261 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", 2262 | "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", 2263 | "shasum": "" 2264 | }, 2265 | "require": { 2266 | "php": ">=5.3.3" 2267 | }, 2268 | "suggest": { 2269 | "ext-ctype": "For best performance" 2270 | }, 2271 | "type": "library", 2272 | "extra": { 2273 | "branch-alias": { 2274 | "dev-master": "1.9-dev" 2275 | } 2276 | }, 2277 | "autoload": { 2278 | "psr-4": { 2279 | "Symfony\\Polyfill\\Ctype\\": "" 2280 | }, 2281 | "files": [ 2282 | "bootstrap.php" 2283 | ] 2284 | }, 2285 | "notification-url": "https://packagist.org/downloads/", 2286 | "license": [ 2287 | "MIT" 2288 | ], 2289 | "authors": [ 2290 | { 2291 | "name": "Symfony Community", 2292 | "homepage": "https://symfony.com/contributors" 2293 | }, 2294 | { 2295 | "name": "Gert de Pagter", 2296 | "email": "BackEndTea@gmail.com" 2297 | } 2298 | ], 2299 | "description": "Symfony polyfill for ctype functions", 2300 | "homepage": "https://symfony.com", 2301 | "keywords": [ 2302 | "compatibility", 2303 | "ctype", 2304 | "polyfill", 2305 | "portable" 2306 | ], 2307 | "time": "2018-08-06T14:22:27+00:00" 2308 | }, 2309 | { 2310 | "name": "symfony/stopwatch", 2311 | "version": "v4.1.6", 2312 | "source": { 2313 | "type": "git", 2314 | "url": "https://github.com/symfony/stopwatch.git", 2315 | "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b" 2316 | }, 2317 | "dist": { 2318 | "type": "zip", 2319 | "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5bfc064125b73ff81229e19381ce1c34d3416f4b", 2320 | "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b", 2321 | "shasum": "" 2322 | }, 2323 | "require": { 2324 | "php": "^7.1.3" 2325 | }, 2326 | "type": "library", 2327 | "extra": { 2328 | "branch-alias": { 2329 | "dev-master": "4.1-dev" 2330 | } 2331 | }, 2332 | "autoload": { 2333 | "psr-4": { 2334 | "Symfony\\Component\\Stopwatch\\": "" 2335 | }, 2336 | "exclude-from-classmap": [ 2337 | "/Tests/" 2338 | ] 2339 | }, 2340 | "notification-url": "https://packagist.org/downloads/", 2341 | "license": [ 2342 | "MIT" 2343 | ], 2344 | "authors": [ 2345 | { 2346 | "name": "Fabien Potencier", 2347 | "email": "fabien@symfony.com" 2348 | }, 2349 | { 2350 | "name": "Symfony Community", 2351 | "homepage": "https://symfony.com/contributors" 2352 | } 2353 | ], 2354 | "description": "Symfony Stopwatch Component", 2355 | "homepage": "https://symfony.com", 2356 | "time": "2018-10-02T12:40:59+00:00" 2357 | }, 2358 | { 2359 | "name": "symfony/yaml", 2360 | "version": "v4.1.6", 2361 | "source": { 2362 | "type": "git", 2363 | "url": "https://github.com/symfony/yaml.git", 2364 | "reference": "367e689b2fdc19965be435337b50bc8adf2746c9" 2365 | }, 2366 | "dist": { 2367 | "type": "zip", 2368 | "url": "https://api.github.com/repos/symfony/yaml/zipball/367e689b2fdc19965be435337b50bc8adf2746c9", 2369 | "reference": "367e689b2fdc19965be435337b50bc8adf2746c9", 2370 | "shasum": "" 2371 | }, 2372 | "require": { 2373 | "php": "^7.1.3", 2374 | "symfony/polyfill-ctype": "~1.8" 2375 | }, 2376 | "conflict": { 2377 | "symfony/console": "<3.4" 2378 | }, 2379 | "require-dev": { 2380 | "symfony/console": "~3.4|~4.0" 2381 | }, 2382 | "suggest": { 2383 | "symfony/console": "For validating YAML files using the lint command" 2384 | }, 2385 | "type": "library", 2386 | "extra": { 2387 | "branch-alias": { 2388 | "dev-master": "4.1-dev" 2389 | } 2390 | }, 2391 | "autoload": { 2392 | "psr-4": { 2393 | "Symfony\\Component\\Yaml\\": "" 2394 | }, 2395 | "exclude-from-classmap": [ 2396 | "/Tests/" 2397 | ] 2398 | }, 2399 | "notification-url": "https://packagist.org/downloads/", 2400 | "license": [ 2401 | "MIT" 2402 | ], 2403 | "authors": [ 2404 | { 2405 | "name": "Fabien Potencier", 2406 | "email": "fabien@symfony.com" 2407 | }, 2408 | { 2409 | "name": "Symfony Community", 2410 | "homepage": "https://symfony.com/contributors" 2411 | } 2412 | ], 2413 | "description": "Symfony Yaml Component", 2414 | "homepage": "https://symfony.com", 2415 | "time": "2018-10-02T16:36:10+00:00" 2416 | }, 2417 | { 2418 | "name": "theseer/tokenizer", 2419 | "version": "1.1.0", 2420 | "source": { 2421 | "type": "git", 2422 | "url": "https://github.com/theseer/tokenizer.git", 2423 | "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" 2424 | }, 2425 | "dist": { 2426 | "type": "zip", 2427 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", 2428 | "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", 2429 | "shasum": "" 2430 | }, 2431 | "require": { 2432 | "ext-dom": "*", 2433 | "ext-tokenizer": "*", 2434 | "ext-xmlwriter": "*", 2435 | "php": "^7.0" 2436 | }, 2437 | "type": "library", 2438 | "autoload": { 2439 | "classmap": [ 2440 | "src/" 2441 | ] 2442 | }, 2443 | "notification-url": "https://packagist.org/downloads/", 2444 | "license": [ 2445 | "BSD-3-Clause" 2446 | ], 2447 | "authors": [ 2448 | { 2449 | "name": "Arne Blankerts", 2450 | "email": "arne@blankerts.de", 2451 | "role": "Developer" 2452 | } 2453 | ], 2454 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", 2455 | "time": "2017-04-07T12:08:54+00:00" 2456 | }, 2457 | { 2458 | "name": "webmozart/assert", 2459 | "version": "1.3.0", 2460 | "source": { 2461 | "type": "git", 2462 | "url": "https://github.com/webmozart/assert.git", 2463 | "reference": "0df1908962e7a3071564e857d86874dad1ef204a" 2464 | }, 2465 | "dist": { 2466 | "type": "zip", 2467 | "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", 2468 | "reference": "0df1908962e7a3071564e857d86874dad1ef204a", 2469 | "shasum": "" 2470 | }, 2471 | "require": { 2472 | "php": "^5.3.3 || ^7.0" 2473 | }, 2474 | "require-dev": { 2475 | "phpunit/phpunit": "^4.6", 2476 | "sebastian/version": "^1.0.1" 2477 | }, 2478 | "type": "library", 2479 | "extra": { 2480 | "branch-alias": { 2481 | "dev-master": "1.3-dev" 2482 | } 2483 | }, 2484 | "autoload": { 2485 | "psr-4": { 2486 | "Webmozart\\Assert\\": "src/" 2487 | } 2488 | }, 2489 | "notification-url": "https://packagist.org/downloads/", 2490 | "license": [ 2491 | "MIT" 2492 | ], 2493 | "authors": [ 2494 | { 2495 | "name": "Bernhard Schussek", 2496 | "email": "bschussek@gmail.com" 2497 | } 2498 | ], 2499 | "description": "Assertions to validate method input/output with nice error messages.", 2500 | "keywords": [ 2501 | "assert", 2502 | "check", 2503 | "validate" 2504 | ], 2505 | "time": "2018-01-29T19:49:41+00:00" 2506 | } 2507 | ], 2508 | "aliases": [], 2509 | "minimum-stability": "stable", 2510 | "stability-flags": [], 2511 | "prefer-stable": false, 2512 | "prefer-lowest": false, 2513 | "platform": { 2514 | "ext-bcmath": "*" 2515 | }, 2516 | "platform-dev": [] 2517 | } 2518 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/integration 15 | 16 | 17 | ./tests/unit 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ./src 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Account.php: -------------------------------------------------------------------------------- 1 | address = $address; 21 | $this->balance = $balance; 22 | $this->create_time = $create_time; 23 | } 24 | } -------------------------------------------------------------------------------- /src/Address.php: -------------------------------------------------------------------------------- 1 | privateKey = $privateKey; 29 | $this->address = $address; 30 | $this->hexAddress = $hexAddress; 31 | } 32 | 33 | /** 34 | * Dont rely on this. Always use Wallet::validateAddress to double check 35 | * against tronGrid. 36 | * 37 | * @return bool 38 | */ 39 | public function isValid(): bool 40 | { 41 | if (strlen($this->address) !== Address::ADDRESS_SIZE) { 42 | return false; 43 | } 44 | 45 | $address = Base58Check::decode($this->address, false, 0, false); 46 | $utf8 = hex2bin($address); 47 | 48 | if (strlen($utf8) !== 25) { 49 | return false; 50 | } 51 | 52 | if (strpos($utf8, self::ADDRESS_PREFIX_BYTE) !== 0) { 53 | return false; 54 | } 55 | 56 | $checkSum = substr($utf8, 21); 57 | $address = substr($utf8, 0, 21); 58 | 59 | $hash0 = Hash::SHA256($address); 60 | $hash1 = Hash::SHA256($hash0); 61 | $checkSum1 = substr($hash1, 0, 4); 62 | 63 | if ($checkSum === $checkSum1) { 64 | return true; 65 | } 66 | 67 | return false; 68 | } 69 | } -------------------------------------------------------------------------------- /src/Api.php: -------------------------------------------------------------------------------- 1 | _client = $client; 19 | } 20 | 21 | public function getClient(): Client 22 | { 23 | return $this->_client; 24 | } 25 | 26 | /** 27 | * Abstracts some common functionality like formatting the post data 28 | * along with error handling. 29 | * 30 | * @throws TronErrorException 31 | */ 32 | public function post(string $endpoint, array $data = [], bool $returnAssoc = false) 33 | { 34 | if (sizeof($data)) { 35 | $data = ['json' => $data]; 36 | } 37 | 38 | $stream = (string)$this->getClient()->post($endpoint, $data)->getBody(); 39 | $body = json_decode($stream, $returnAssoc); 40 | 41 | $this->checkForErrorResponse($returnAssoc, $body); 42 | 43 | return $body; 44 | } 45 | 46 | /** 47 | * Check if the response has an error and throw it. 48 | * 49 | * @param bool $returnAssoc 50 | * @param $body 51 | * @throws TronErrorException 52 | */ 53 | private function checkForErrorResponse(bool $returnAssoc, $body) 54 | { 55 | if ($returnAssoc) { 56 | if (isset($body['Error'])) { 57 | throw new TronErrorException($body['Error']); 58 | } elseif (isset($body['code']) && isset($body['message'])) { 59 | throw new TronErrorException($body['code'] . ': ' . hex2bin($body['message'])); 60 | } 61 | } 62 | 63 | if (isset($body->Error)) { 64 | throw new TronErrorException($body->Error); 65 | } elseif (isset($body->code) && isset($body->message)) { 66 | throw new TronErrorException($body->code . ': ' . hex2bin($body->message)); 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /src/Block.php: -------------------------------------------------------------------------------- 1 | blockID = $blockID; 21 | $this->block_header = $block_header; 22 | } 23 | 24 | 25 | } -------------------------------------------------------------------------------- /src/Exceptions/TransactionException.php: -------------------------------------------------------------------------------- 1 | 256) { 18 | die("Invalid Base: " . $base); 19 | } 20 | 21 | bcscale(0); 22 | $value = ""; 23 | 24 | if (!$digits) { 25 | $digits = self::digits($base); 26 | } 27 | 28 | while ($dec > $base - 1) { 29 | $rest = bcmod($dec, $base); 30 | $dec = bcdiv($dec, $base); 31 | $value = $digits[$rest] . $value; 32 | } 33 | $value = $digits[intval($dec)] . $value; 34 | 35 | return (string)$value; 36 | } 37 | 38 | public static function base2dec($value, $base, $digits = false) 39 | { 40 | if ($base < 2 || $base > 256) { 41 | die("Invalid Base: " . $base); 42 | } 43 | 44 | bcscale(0); 45 | 46 | if ($base < 37) { 47 | $value = strtolower($value); 48 | } 49 | if (!$digits) { 50 | $digits = self::digits($base); 51 | } 52 | 53 | $size = strlen($value); 54 | $dec = "0"; 55 | 56 | for ($loop = 0; $loop < $size; $loop++) { 57 | $element = strpos($digits, $value[$loop]); 58 | $power = bcpow($base, $size - $loop - 1); 59 | $dec = bcadd($dec, bcmul($element, $power)); 60 | } 61 | 62 | return (string)$dec; 63 | } 64 | 65 | public static function digits($base) 66 | { 67 | if ($base > 64) { 68 | $digits = ""; 69 | for ($loop = 0; $loop < 256; $loop++) { 70 | $digits .= chr($loop); 71 | } 72 | } else { 73 | $digits = "0123456789abcdefghijklmnopqrstuvwxyz"; 74 | $digits .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ-_"; 75 | } 76 | $digits = substr($digits, 0, $base); 77 | 78 | return (string)$digits; 79 | } 80 | 81 | public static function bin2bc($num) 82 | { 83 | return self::base2dec($num, 256); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/Support/Hash.php: -------------------------------------------------------------------------------- 1 | hexString2Address($string); 24 | } 25 | 26 | return $this->hexString2Utf8($string); 27 | } 28 | 29 | /** 30 | * Convert to Hex 31 | * 32 | * @param $str 33 | * @return string 34 | */ 35 | public function toHex($str) 36 | { 37 | if (mb_strlen($str) == 34 && mb_substr($str, 0, 1) === 'T') { 38 | return $this->address2HexString($str); 39 | }; 40 | 41 | return $this->stringUtf8toHex($str); 42 | } 43 | 44 | /** 45 | * Check the address before converting to Hex 46 | * 47 | * @param $sHexAddress 48 | * @return string 49 | */ 50 | public function address2HexString($sHexAddress) 51 | { 52 | if (strlen($sHexAddress) == 42 && mb_strpos($sHexAddress, '41') == 0) { 53 | return $sHexAddress; 54 | } 55 | return Base58Check::decode($sHexAddress, 0, 3); 56 | } 57 | 58 | /** 59 | * Check Hex address before converting to Base58 60 | * 61 | * @param $sHexString 62 | * @return string 63 | */ 64 | public function hexString2Address($sHexString) 65 | { 66 | if (strlen($sHexString) < 2 || (strlen($sHexString) & 1) != 0) { 67 | return ''; 68 | } 69 | 70 | return Base58Check::encode($sHexString, 0, false); 71 | } 72 | 73 | /** 74 | * Convert string to hex 75 | * 76 | * @param $sUtf8 77 | * @return string 78 | */ 79 | public function stringUtf8toHex($sUtf8) 80 | { 81 | return bin2hex($sUtf8); 82 | } 83 | 84 | /** 85 | * Convert hex to string 86 | * 87 | * @param $sHexString 88 | * @return string 89 | */ 90 | public function hexString2Utf8($sHexString) 91 | { 92 | return hex2bin($sHexString); 93 | } 94 | 95 | /** 96 | * Convert to great value 97 | * 98 | * @param $str 99 | * @return BigInteger 100 | */ 101 | public function toBigNumber($str) 102 | { 103 | return new BigInteger($str); 104 | } 105 | 106 | /** 107 | * Convert trx to float 108 | * 109 | * @param $amount 110 | * @return float 111 | */ 112 | public function fromTron($amount): float 113 | { 114 | return (float)bcdiv((string)$amount, (string)1e6, 8); 115 | } 116 | 117 | /** 118 | * Convert float to trx format 119 | * 120 | * @param $double 121 | * @return int 122 | */ 123 | public function toTron($double): int 124 | { 125 | return (int)bcmul((string)$double, (string)1e6, 0); 126 | } 127 | } -------------------------------------------------------------------------------- /src/Transaction.php: -------------------------------------------------------------------------------- 1 | txID = $txID; 14 | $this->raw_data = $rawData; 15 | } 16 | 17 | public function isSigned(): bool 18 | { 19 | return (bool)sizeof($this->signature); 20 | } 21 | } -------------------------------------------------------------------------------- /src/Wallet.php: -------------------------------------------------------------------------------- 1 | _api = $_api; 29 | } 30 | 31 | public function genKeyPair(): array 32 | { 33 | $key = new Key(); 34 | 35 | return $key->GenerateKeypair(); 36 | } 37 | 38 | public function getAddressHex(string $pubKeyBin): string 39 | { 40 | if (strlen($pubKeyBin) == 65) { 41 | $pubKeyBin = substr($pubKeyBin, 1); 42 | } 43 | 44 | $hash = Keccak::hash($pubKeyBin, 256); 45 | 46 | return Address::ADDRESS_PREFIX . substr($hash, 24); 47 | } 48 | 49 | public function getBase58CheckAddress(string $addressBin): string 50 | { 51 | $hash0 = Hash::SHA256($addressBin); 52 | $hash1 = Hash::SHA256($hash0); 53 | $checksum = substr($hash1, 0, 4); 54 | $checksum = $addressBin . $checksum; 55 | 56 | return Base58::encode(Crypto::bin2bc($checksum)); 57 | } 58 | 59 | public function generateAddress(): Address 60 | { 61 | $attempts = 0; 62 | $validAddress = false; 63 | 64 | do { 65 | if ($attempts++ === 5) { 66 | throw new TronErrorException('Could not generate valid key'); 67 | } 68 | 69 | $keyPair = $this->genKeyPair(); 70 | $privateKeyHex = $keyPair['private_key_hex']; 71 | $pubKeyHex = $keyPair['public_key']; 72 | 73 | //We cant use hex2bin unless the string length is even. 74 | if (strlen($pubKeyHex) % 2 !== 0) { 75 | continue; 76 | } 77 | 78 | $pubKeyBin = hex2bin($pubKeyHex); 79 | $addressHex = $this->getAddressHex($pubKeyBin); 80 | $addressBin = hex2bin($addressHex); 81 | $addressBase58 = $this->getBase58CheckAddress($addressBin); 82 | 83 | $address = new Address($addressBase58, $privateKeyHex, $addressHex); 84 | $validAddress = $this->validateAddress($address); 85 | 86 | } while (!$validAddress); 87 | 88 | return $address; 89 | } 90 | 91 | public function validateAddress(Address $address): bool 92 | { 93 | if (!$address->isValid()) { 94 | return false; 95 | } 96 | 97 | $body = $this->_api->post('/wallet/validateaddress', [ 98 | 'address' => $address->address, 99 | ]); 100 | 101 | return $body->result; 102 | } 103 | 104 | public function getAccount(Address $address): ?Account 105 | { 106 | $body = $this->_api->post('/wallet/getaccount', [ 107 | 'address' => $address->hexAddress, 108 | ]); 109 | 110 | if (isset($body->address)) { 111 | $address = new Address($body->address); 112 | return new Account($address, $body->balance, $body->create_time); 113 | } 114 | 115 | return null; 116 | } 117 | 118 | public function getAccountNet(Address $address): ?array 119 | { 120 | $data = $this->_api->post('/wallet/getaccountnet', 121 | ['address' => $address->hexAddress], 122 | true 123 | ); 124 | 125 | if (sizeof($data)) { 126 | return $data; 127 | } 128 | 129 | return null; 130 | } 131 | 132 | /** 133 | * This is open to attacks. Instead use createTransaction(), 134 | * then sign it locally, 135 | * then broadcastTransaction() 136 | * 137 | * @deprecated See exception 138 | */ 139 | final public function easyTransferByPrivate(string $private, Address $address, float $amount) 140 | { 141 | throw new \Exception('This is vulnerable to MiTM attacks. Do not use'); 142 | } 143 | 144 | public function createTransaction(Address $toAddress, Address $ownerAddress, float $amount = 0): Transaction 145 | { 146 | $body = $this->_api->post('/wallet/createtransaction', [ 147 | 'to_address' => $toAddress->hexAddress, 148 | 'owner_address' => $ownerAddress->hexAddress, 149 | 'amount' => $amount, 150 | ]); 151 | 152 | return new Transaction( 153 | $body->txID, 154 | $body->raw_data 155 | ); 156 | } 157 | 158 | /** 159 | * TODO sign locally instead of over api as this is man in the middle attack 160 | * waiting to happen by posting privateKey 161 | */ 162 | public function signTransaction(Transaction &$transaction, string $privateKey): Transaction 163 | { 164 | unset($transaction->signature); 165 | $transactionArray = json_decode(json_encode($transaction), true); 166 | 167 | $body = $this->_api->post('/wallet/gettransactionsign', [ 168 | 'transaction' => $transactionArray, 169 | 'privateKey' => $privateKey, 170 | ]); 171 | 172 | $transaction->signature = $body->signature; 173 | 174 | return $transaction; 175 | } 176 | 177 | public function broadcastTransaction(Transaction $transaction): bool 178 | { 179 | if (!$transaction->isSigned()) { 180 | throw new TransactionException('Transaction is not signed'); 181 | } 182 | 183 | $transactionArray = json_decode(json_encode($transaction), true); 184 | $body = $this->_api->post('/wallet/broadcasttransaction', $transactionArray); 185 | 186 | return $body->result ? $body->result : false; 187 | } 188 | 189 | public function getTransactionById(string $transactionID): Transaction 190 | { 191 | $body = $this->_api->post('/wallet/gettransactionbyid', [ 192 | 'value' => $transactionID, 193 | ] 194 | ); 195 | 196 | return new Transaction($body->txID, $body->raw_data); 197 | } 198 | 199 | public function getNowBlock(): Block 200 | { 201 | $body = $this->_api->post('/wallet/getnowblock'); 202 | 203 | return new Block($body->blockID, $body->block_header); 204 | } 205 | 206 | public function getBlockById(string $blockId): Block 207 | { 208 | $body = $this->_api->post('/wallet/getblockbyid', [ 209 | 'value' => $blockId, 210 | ] 211 | ); 212 | 213 | return new Block($body->blockID, $body->block_header); 214 | } 215 | 216 | // public function freezeBalance(Address $ownerAddress, float $balanceToFreeze, int $durationDays, string $resource = 'BANDWIDTH') 217 | // { 218 | // $body = $this->_api->post('/wallet/freezebalance', [ 219 | // 'owner_address' => $ownerAddress->hexAddress, 220 | // 'frozen_balance' => $balanceToFreeze, 221 | // 'frozen_duration' => $durationDays, 222 | // 'resource' => $resource, 223 | // ] 224 | // ); 225 | // 226 | // return $body; 227 | // } 228 | } 229 | -------------------------------------------------------------------------------- /tests/integration/WalletTest.php: -------------------------------------------------------------------------------- 1 | _api = new Api(new Client([ 28 | 'base_uri' => 'https://api.shasta.trongrid.io', 29 | ])); 30 | } 31 | 32 | /** 33 | * @covers \mattvb91\TronTrx\Wallet::__construct 34 | * @covers \mattvb91\TronTrx\Address::__construct 35 | * @covers \mattvb91\TronTrx\Wallet::generateAddress 36 | * @covers \mattvb91\TronTrx\Wallet::genKeyPair 37 | */ 38 | public function testGenerateAddress() 39 | { 40 | $wallet = new mattvb91\TronTrx\Wallet($this->_api); 41 | 42 | $address = $wallet->generateAddress(); 43 | $this->assertInstanceOf(Address::class, $address); 44 | 45 | return $address; 46 | } 47 | 48 | /** 49 | * @covers \mattvb91\TronTrx\Wallet::validateAddress 50 | * @covers \mattvb91\TronTrx\Address::isValid 51 | */ 52 | public function testValidatingAddress() 53 | { 54 | $wallet = new mattvb91\TronTrx\Wallet($this->_api); 55 | 56 | $address = new Address('test', '', ''); 57 | $this->assertFalse($address->isValid()); 58 | 59 | $address = new Address('1234567890123456789012345678901221', '', ''); 60 | $this->assertFalse($address->isValid()); 61 | $this->assertFalse($wallet->validateAddress($address)); 62 | 63 | for ($i = 0; $i < 3; $i++) { 64 | $address = $wallet->generateAddress(); 65 | $this->assertEquals($wallet->validateAddress($address), $address->isValid()); 66 | } 67 | } 68 | 69 | /** 70 | * @depends testGenerateAddress 71 | */ 72 | public function testSignatureHexSigning(Address $address) 73 | { 74 | $wallet = new mattvb91\TronTrx\Wallet($this->_api); 75 | 76 | $toHex = $wallet->toHex($address->address); 77 | $this->assertEquals($address->hexAddress, $toHex); 78 | $this->assertEquals($address->address, $wallet->hexString2Address($toHex)); 79 | } 80 | 81 | 82 | /** 83 | * @covers \mattvb91\TronTrx\Wallet::easyTransferByPrivate 84 | * @return Address 85 | */ 86 | public function testEasyTransferByPrivateThrowsException() 87 | { 88 | $this->expectException(Exception::class); 89 | 90 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 91 | $address = $wallet->generateAddress(); 92 | 93 | $this->assertTrue($wallet->easyTransferByPrivate( 94 | 'PRIVATE', 95 | $address, 96 | 1 97 | )); 98 | } 99 | 100 | 101 | /** 102 | * @covers \mattvb91\TronTrx\Wallet::getAccount 103 | * @covers \mattvb91\TronTrx\Account::__construct 104 | */ 105 | public function testGetAccount() 106 | { 107 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 108 | $address = $wallet->generateAddress(); 109 | $this->instantiateAddress($address); 110 | 111 | $account = $wallet->getAccount($address); 112 | 113 | $this->assertInstanceOf(Account::class, $account); 114 | 115 | return $account; 116 | } 117 | 118 | /** 119 | * @covers \mattvb91\TronTrx\Wallet::getAccount 120 | */ 121 | public function testGetAccountReturnsNullOnFail() 122 | { 123 | // Create a mock and queue two responses. 124 | $mock = new MockHandler([ 125 | new Response(200, [], json_encode([])), 126 | ]); 127 | 128 | $handler = HandlerStack::create($mock); 129 | $client = new Client(['handler' => $handler]); 130 | 131 | $api = new Api($client); 132 | $wallet = new \mattvb91\TronTrx\Wallet($api); 133 | 134 | $address = new Address('NOT_VALID', '', $wallet->toHex('NOT_VALID')); 135 | $this->assertNull($wallet->getAccount($address)); 136 | } 137 | 138 | /** 139 | * @covers \mattvb91\TronTrx\Wallet::createTransaction 140 | * @covers \mattvb91\TronTrx\Transaction::__construct 141 | */ 142 | public function testCreateTransaction() 143 | { 144 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 145 | 146 | $toAddress = $wallet->generateAddress(); 147 | $fromAddress = $wallet->generateAddress(); 148 | $this->instantiateAddress($fromAddress); 149 | 150 | $transaction = $wallet->createTransaction($toAddress, $fromAddress, self::TEST_TRANSACTION_AMOUNT); 151 | $this->assertInstanceOf(Transaction::class, $transaction); 152 | 153 | return ['transaction' => $transaction, 'address' => $fromAddress]; 154 | } 155 | 156 | /** 157 | * @covers \mattvb91\TronTrx\Wallet::signTransaction 158 | * @depends testCreateTransaction 159 | */ 160 | public function testSignTransaction(array $input) 161 | { 162 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 163 | 164 | /** @var Transaction $transaction */ 165 | $transaction = $input['transaction']; 166 | 167 | $wallet->signTransaction($transaction, $input['address']->privateKey); 168 | 169 | $this->assertTrue($transaction->isSigned()); 170 | 171 | return $transaction; 172 | } 173 | 174 | /** 175 | * @covers \mattvb91\TronTrx\Wallet::broadcastTransaction 176 | */ 177 | public function testBroadcastTransactionFailsWhenNotSigned() 178 | { 179 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 180 | 181 | $this->expectException(\Exception::class); 182 | $wallet->broadcastTransaction(new Transaction('', new stdClass())); 183 | } 184 | 185 | /** 186 | * @covers \mattvb91\TronTrx\Wallet::broadcastTransaction 187 | * @covers \mattvb91\TronTrx\Wallet::getTransactionById 188 | * @depends testSignTransaction 189 | */ 190 | public function testBroadcastTransaction(Transaction $transaction) 191 | { 192 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 193 | $hexAddress = $transaction->raw_data->contract[0]->parameter->value->owner_address; 194 | 195 | $address = new Address($wallet->fromHex($hexAddress), '', $hexAddress); 196 | 197 | $beforeTransactionAccunt = $wallet->getAccount($address); 198 | $this->assertNotNull($beforeTransactionAccunt); 199 | 200 | $this->assertTrue($wallet->broadcastTransaction($transaction)); 201 | $this->assertEquals($transaction->txID, $wallet->getTransactionById($transaction->txID)->txID); 202 | 203 | echo 'Success test transaction' . PHP_EOL; 204 | echo 'From Address: https://explorer.shasta.trongrid.io/address/' . $address->address . PHP_EOL; 205 | echo 'Transaction: https://explorer.shasta.trongrid.io/transaction/' . $transaction->txID . PHP_EOL; 206 | } 207 | 208 | /** 209 | * @covers \mattvb91\TronTrx\Wallet::getAccountNet 210 | */ 211 | public function testGetAccountNet() 212 | { 213 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 214 | $netAccountTest = $wallet->generateAddress(); 215 | 216 | $this->instantiateAddress($netAccountTest); 217 | 218 | $response = $wallet->getAccountNet($netAccountTest); 219 | $this->assertArrayHasKey('freeNetLimit', $response); 220 | $this->assertArrayHasKey('TotalNetLimit', $response); 221 | } 222 | 223 | 224 | /** 225 | * @depends testGetAccount 226 | * @covers \mattvb91\TronTrx\Wallet::getAccountNet 227 | */ 228 | public function testGetAccountNetMock(Account $account) 229 | { 230 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 231 | $this->assertNull($wallet->getAccountNet($account->address)); 232 | 233 | // Create a mock and queue two responses. 234 | $mock = new MockHandler([ 235 | new Response(200, [], json_encode([ 236 | 'freeNetLimit' => 5000, 237 | 'TotalNetLimit' => 43200000000, 238 | 'TotalNetWeight' => 5989300712, 239 | ])), 240 | ]); 241 | 242 | $handler = HandlerStack::create($mock); 243 | $client = new Client(['handler' => $handler]); 244 | 245 | $api = new Api($client); 246 | $wallet = new \mattvb91\TronTrx\Wallet($api); 247 | 248 | $this->assertNotEmpty($wallet->getAccountNet($account->address)); 249 | } 250 | 251 | /** 252 | * @covers \mattvb91\TronTrx\Wallet::getNowBlock 253 | */ 254 | public function testNowBlock() 255 | { 256 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 257 | $block = $wallet->getNowBlock(); 258 | $this->assertInstanceOf(\mattvb91\TronTrx\Block::class, $block); 259 | 260 | return $block; 261 | } 262 | 263 | /** 264 | * @covers \mattvb91\TronTrx\Wallet::getBlockById 265 | * @depends testNowBlock 266 | */ 267 | public function testBlockById(Block $block) 268 | { 269 | $wallet = new \mattvb91\TronTrx\Wallet($this->_api); 270 | $blockById = $wallet->getBlockById($block->blockID); 271 | 272 | $this->assertEquals($block, $blockById); 273 | 274 | $this->expectException(TronErrorException::class); 275 | $wallet->getBlockById('InvalidBlockId'); 276 | } 277 | 278 | public function testFreezeBalance() 279 | { 280 | //Freeze balance of 2, then check accountnet for bandwidth. 281 | // $wallet->freezeBalance($address, 1000001, 1); 282 | // $wallet->getAccountNet($address); 283 | $this->markTestSkipped(); 284 | } 285 | 286 | /** 287 | * @param Address $fromAddress 288 | */ 289 | private function instantiateAddress(Address $fromAddress) 290 | { 291 | $this->assertEquals(200, $this->_api->getClient()->post('https://www.trongrid.io/shasta/submit', [ 292 | 'form_params' => [ 293 | 'value' => $fromAddress->address, 294 | ], 295 | ])->getStatusCode()); 296 | } 297 | } 298 | -------------------------------------------------------------------------------- /tests/unit/AddressTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidArgumentException::class); 13 | new Address(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/unit/ApiTest.php: -------------------------------------------------------------------------------- 1 | assertInstanceOf(Client::class, $api->getClient()); 21 | } 22 | 23 | /** 24 | * @covers \mattvb91\TronTrx\Api::post 25 | * @covers \mattvb91\TronTrx\Api::checkForErrorResponse 26 | */ 27 | public function testPostAssocTrueFalse() 28 | { 29 | // Create a mock and queue two responses. 30 | $response = new Response(200, [], json_encode([ 31 | 'test' => true, 32 | ])); 33 | 34 | $mock = new MockHandler([ 35 | $response, 36 | $response, 37 | new Response(200, [], json_encode(['Error' => 'Error'])), 38 | ]); 39 | 40 | $handler = HandlerStack::create($mock); 41 | $client = new Client(['handler' => $handler]); 42 | 43 | $api = new Api($client); 44 | $this->assertArrayHasKey('test', $api->post('/test', ['data' => []], true)); 45 | 46 | $response = $api->post('/test'); 47 | $this->assertObjectHasAttribute('test', $response); 48 | $this->assertTrue($response->test); 49 | } 50 | 51 | /** 52 | * @covers \mattvb91\TronTrx\Api::checkForErrorResponse 53 | * @dataProvider getResponses 54 | */ 55 | public function testErrorExceptionIsThrownWithAssoc($client, $assoc) 56 | { 57 | $api = new Api($client); 58 | 59 | $this->expectException(TronErrorException::class); 60 | $api->post('/test', [], $assoc); 61 | } 62 | 63 | public function getResponses() 64 | { 65 | $errorResponse = new Response(200, [], json_encode(['Error' => 'Error'])); 66 | $codeResponse = new Response(200, [], json_encode(['code' => 'code', 'message' => bin2hex('test message')])); 67 | 68 | $mock = new MockHandler([ 69 | $errorResponse, 70 | $errorResponse, 71 | $codeResponse, 72 | $codeResponse, 73 | ]); 74 | 75 | $handler = HandlerStack::create($mock); 76 | $client = new Client(['handler' => $handler]); 77 | 78 | return [ 79 | [$client, true], 80 | [$client, false], 81 | [$client, true], 82 | [$client, false], 83 | ]; 84 | } 85 | } -------------------------------------------------------------------------------- /tests/unit/BlockTest.php: -------------------------------------------------------------------------------- 1 | expectException(Exception::class); 17 | new Block('', new stdClass()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/unit/TransactionTest.php: -------------------------------------------------------------------------------- 1 | assertFalse($transaction->isSigned()); 14 | 15 | $transaction->signature = ['wdwd']; 16 | $this->assertTrue($transaction->isSigned()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/unit/WalletTest.php: -------------------------------------------------------------------------------- 1 | getMockBuilder(\mattvb91\TronTrx\Wallet::class) 20 | ->disableOriginalConstructor() 21 | ->setMethodsExcept(['getAddressHex']) 22 | ->getMock(); 23 | 24 | $addressHex = $wallet->getAddressHex(hex2bin($publicHex)); 25 | $this->assertEquals($expectedAddressHex, $addressHex); 26 | } 27 | 28 | /** 29 | * @covers \mattvb91\TronTrx\Wallet::getBase58CheckAddress 30 | */ 31 | public function testGetBase58CheckAddress() 32 | { 33 | /** @var \mattvb91\TronTrx\Wallet $wallet */ 34 | $wallet = $this->getMockBuilder(\mattvb91\TronTrx\Wallet::class) 35 | ->disableOriginalConstructor() 36 | ->setMethodsExcept(['getBase58CheckAddress']) 37 | ->getMock(); 38 | 39 | $expectedOutput = 'TZAcZfMseztuzBRXniZH4uxBF6jXBD38N3'; 40 | $addressBase58 = $wallet->getBase58CheckAddress(hex2bin('41fe7323249972344af4dad2f4dab2fcdbf254120e')); 41 | 42 | $this->assertEquals($expectedOutput, $addressBase58); 43 | } 44 | 45 | /** 46 | * @covers \mattvb91\TronTrx\Wallet::generateAddress 47 | */ 48 | public function testAttemptLimitWillThrowException() 49 | { 50 | $this->expectException(TronErrorException::class); 51 | 52 | /** @var Wallet $wallet */ 53 | $wallet = $this->getMockBuilder(\mattvb91\TronTrx\Wallet::class) 54 | ->disableOriginalConstructor() 55 | ->setMethodsExcept(['generateAddress']) 56 | ->getMock(); 57 | 58 | 59 | $wallet->expects(self::exactly(5)) 60 | ->method('genKeyPair') 61 | ->willReturn(['private_key_hex' => 'bla', 'public_key' => 'bla']); 62 | 63 | 64 | $wallet->generateAddress(); 65 | } 66 | } 67 | --------------------------------------------------------------------------------