diff --git a/.env b/.env deleted file mode 100644 index ab334fd..0000000 --- a/.env +++ /dev/null @@ -1,3 +0,0 @@ -# Permissions -GROUP_ID=1000 -USER_ID=1000 diff --git a/.gitignore b/.gitignore index daa90eb..d85ec07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ -/.env +.env /cache /vendor +.idea +/*.xml diff --git a/.travis.yml b/.travis.yml index c17d463..69a31fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,14 @@ language: php php: - - 5.6 - - 7.0 - 7.1 - - hhvm branches: only: master install: - - if [[ $TRAVIS_PHP_VERSION = 5.6 ]]; then printf "\n" | pecl install apcu-4.0.11; fi - - if [[ $TRAVIS_PHP_VERSION = 7.* ]]; then printf "\n" | pecl install apcu; fi - - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-rm xdebug.ini; fi - - if [[ $TRAVIS_PHP_VERSION = 'hhvm' ]]; then mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d; fi + - printf "\n" | pecl install -f apcu + - phpenv config-rm xdebug.ini - phpenv config-add docker/php/config/php.ini - composer self-update - composer install --prefer-source --optimize-autoloader @@ -23,3 +18,10 @@ script: - bin/benchmark --horizontal-complexity 4 --iteration 100 - bin/benchmark --vertical-complexity 4 --iteration 100 - bin/benchmark --horizontal-complexity 4 --vertical-complexity 4 --iteration 100 + - bin/benchmark --horizontal-complexity 20 --vertical-complexity 100 --iteration 100 + - vendor/bin/phpbench run src/SerializerBenchmarks/JmsSerializerBench.php --report=aggregate --revs=10 --iterations=10 --retry-threshold=5 --dump-file=a.xml + - vendor/bin/phpbench run src/SerializerBenchmarks/IvorySerializerBench.php --report=aggregate --revs=10 --iterations=10 --retry-threshold=5 --dump-file=b.xml + - vendor/bin/phpbench run src/SerializerBenchmarks/BetterSerializerBench.php --report=aggregate --revs=10 --iterations=10 --retry-threshold=5 --dump-file=c.xml + - vendor/bin/phpbench run src/SerializerBenchmarks/SymfonyGsNormSerializerBench.php --report=aggregate --revs=1 --iterations=1 --dump-file=d.xml + - vendor/bin/phpbench run src/SerializerBenchmarks/SymfonyObjNormSerializerBench.php --report=aggregate --revs=1 --iterations=1 --dump-file=e.xml + - vendor/bin/phpbench report --file=a.xml --file=b.xml --file=c.xml --file=d.xml --file=e.xml --report=compare diff --git a/README.md b/README.md index 34c6e71..1536d1e 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,27 @@ which represents a complexity factor: $ docker-compose run --rm php bin/benchmark --vertical-complexity 4 ``` +Symfony serializer isn't included in the benchmarking process by default, because it is very slow. +If you'd like to benchmark also the Symfony serializer, you can use the `with-symfony-serializer` option: + +``` bash +$ docker-compose run --rm php bin/benchmark --with-symfony-serializer +``` + +## PhpBench integration + +All the benchmarks were also integrated with PhpBench, to provide more trustful results. You can run the benchmarks +using these commands: + +```bash +$ vendor/bin/phpbench run src/SerializerBenchmarks/JmsSerializerBench.php --report=aggregate --revs=10 --iterations=10 --retry-threshold=5 --dump-file=a.xml +$ vendor/bin/phpbench run src/SerializerBenchmarks/IvorySerializerBench.php --report=aggregate --revs=10 --iterations=10 --retry-threshold=5 --dump-file=b.xml +$ vendor/bin/phpbench run src/SerializerBenchmarks/BetterSerializerBench.php --report=aggregate --revs=10 --iterations=10 --retry-threshold=5 --dump-file=c.xml +$ vendor/bin/phpbench run src/SerializerBenchmarks/SymfonyGsNormSerializerBench.php --report=aggregate --revs=1 --iterations=1 --dump-file=d.xml +$ vendor/bin/phpbench run src/SerializerBenchmarks/SymfonyObjNormSerializerBench.php --report=aggregate --revs=1 --iterations=1 --dump-file=e.xml +$ vendor/bin/phpbench report --file=a.xml --file=b.xml --file=c.xml --file=d.xml --file=e.xml --report=compare +``` + ## Contribute We love contributors! Ivory is an open source project. If you'd like to contribute, feel free to propose a PR!. diff --git a/composer.json b/composer.json index 71fa4f9..487fedc 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,24 @@ { "require": { - "php": "^5.6|^7.0", + "php": "^7.1", "doctrine/cache": "^1.0", "egeloen/serializer": "^1.0", - "jms/serializer": "^1.0", + "jms/serializer": "^1.12", "symfony/polyfill-apcu": "^1.0", "symfony/cache": "^3.0", "symfony/console": "^3.0", "symfony/property-access": "^3.0", - "symfony/serializer": "^3.0", - "symfony/yaml": "^3.0" + "symfony/yaml": "^3.0", + "pimple/pimple": "~3.0", + "phpbench/phpbench": "^1.0@dev", + "better-serializer/better-serializer": "^0.1", + "symfony/serializer": "^v4.1" }, "autoload": { - "psr-4": { "Ivory\\Tests\\Serializer\\Benchmark\\": "src/" } + "psr-4": { + "Ivory\\Tests\\Serializer\\Benchmark\\": "src/", + "SerializerBenchmarks\\": "src/SerializerBenchmarks/" + } }, "minimum-stability": "dev" } diff --git a/composer.lock b/composer.lock index 0f38f60..d06fbf0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,35 +4,180 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "e84f44c531a2d8ad6f2cf05408f6774a", - "content-hash": "467f659322c65a701bc504198893d6d6", + "content-hash": "3b5f3e14c5402c8b6e6fab1b47fbad14", "packages": [ + { + "name": "beberlei/assert", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/beberlei/assert.git", + "reference": "fd8dc8f6de4645ccf4d1a0b38a6b8fdaf2e8b337" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/beberlei/assert/zipball/fd8dc8f6de4645ccf4d1a0b38a6b8fdaf2e8b337", + "reference": "fd8dc8f6de4645ccf4d1a0b38a6b8fdaf2e8b337", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.1.1", + "phpunit/phpunit": "^4.8.35|^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Assert\\": "lib/Assert" + }, + "files": [ + "lib/Assert/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de", + "role": "Lead Developer" + }, + { + "name": "Richard Quadling", + "email": "rquadling@gmail.com", + "role": "Collaborator" + } + ], + "description": "Thin assertion library for input validation in business models.", + "keywords": [ + "assert", + "assertion", + "validation" + ], + "time": "2017-11-30T13:25:15+00:00" + }, + { + "name": "better-serializer/better-serializer", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/better-serializer/better-serializer.git", + "reference": "9ed5f4b8143d6896cb3b3744dce52f2d3ab3686d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/better-serializer/better-serializer/zipball/9ed5f4b8143d6896cb3b3744dce52f2d3ab3686d", + "reference": "9ed5f4b8143d6896cb3b3744dce52f2d3ab3686d", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.3", + "doctrine/cache": "^v1.7", + "doctrine/instantiator": "^1.0", + "league/flysystem": "^1.0", + "marc-mabe/php-enum": "^2.3", + "php": "^7.2", + "phpdocumentor/reflection-docblock": "^4.3", + "pimple/pimple": "^3.0" + }, + "require-dev": { + "doctrine/collections": "^1.5", + "friendsofphp/php-cs-fixer": "^2.5", + "infection/infection": "^0.8", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "jms/serializer": "^1.8", + "nikic/php-parser": "^3.0", + "phpmd/phpmd": "^2.6", + "phpro/grumphp": "^v0.14", + "phpstan/phpstan": "^0.7", + "phpunit/phpunit": "^7.1", + "satooshi/php-coveralls": "~1.0", + "sebastian/phpcpd": "^4.0", + "sensiolabs/security-checker": "^4.0", + "squizlabs/php_codesniffer": "^3.2", + "symfony/var-dumper": "^v3.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "BetterSerializer\\": "src/BetterSerializer/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Martin Fris / Rastusik", + "email": "rasta@lj.sk" + } + ], + "description": "General de/serializer for vatious serialization formats.", + "time": "2018-05-27T21:47:06+00:00" + }, + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" + }, { "name": "doctrine/annotations", - "version": "dev-master", + "version": "1.7.x-dev", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "1fcf863da06d8f305fc031ee87360f087d854c8d" + "reference": "232c5da3903f788e02328b4e8486eceea0c76e58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/1fcf863da06d8f305fc031ee87360f087d854c8d", - "reference": "1fcf863da06d8f305fc031ee87360f087d854c8d", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/232c5da3903f788e02328b4e8486eceea0c76e58", + "reference": "232c5da3903f788e02328b4e8486eceea0c76e58", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": "^5.6 || ^7.0" + "php": "^7.1" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -73,7 +218,7 @@ "docblock", "parser" ], - "time": "2017-01-09 00:44:36" + "time": "2018-05-06T10:14:50+00:00" }, { "name": "doctrine/cache", @@ -81,28 +226,35 @@ "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "e64d917c29fd8bb4ac13e122ec6de9721c4cf0e7" + "reference": "e3fcea0d1af20ec7e236e37efaca378071adbae0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/e64d917c29fd8bb4ac13e122ec6de9721c4cf0e7", - "reference": "e64d917c29fd8bb4ac13e122ec6de9721c4cf0e7", + "url": "https://api.github.com/repos/doctrine/cache/zipball/e3fcea0d1af20ec7e236e37efaca378071adbae0", + "reference": "e3fcea0d1af20ec7e236e37efaca378071adbae0", "shasum": "" }, "require": { - "php": "~5.6|~7.0" + "php": "~7.1" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "phpunit/phpunit": "^5.7", - "predis/predis": "~1.0" + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^1.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^6.3", + "predis/predis": "~1.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -142,7 +294,7 @@ "cache", "caching" ], - "time": "2017-01-20 09:27:09" + "time": "2017-12-18T07:23:23+00:00" }, { "name": "doctrine/instantiator", @@ -150,28 +302,29 @@ "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "68099b02b60bbf3b088ff5cb67bf506770ef9cac" + "reference": "870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/68099b02b60bbf3b088ff5cb67bf506770ef9cac", - "reference": "68099b02b60bbf3b088ff5cb67bf506770ef9cac", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d", + "reference": "870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^4.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-shim": "^0.9.2", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -196,7 +349,7 @@ "constructor", "instantiate" ], - "time": "2017-01-23 09:23:06" + "time": "2018-03-05T09:41:42+00:00" }, { "name": "doctrine/lexer", @@ -204,17 +357,20 @@ "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + "reference": "c0970c7889bfd33504c4fa54f35451c27897381d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c0970c7889bfd33504c4fa54f35451c27897381d", + "reference": "c0970c7889bfd33504c4fa54f35451c27897381d", "shasum": "" }, "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "^4.5" + }, "type": "library", "extra": { "branch-alias": { @@ -222,8 +378,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } }, "notification-url": "https://packagist.org/downloads/", @@ -250,7 +406,7 @@ "lexer", "parser" ], - "time": "2014-09-09 13:34:57" + "time": "2018-05-14T15:49:16+00:00" }, { "name": "egeloen/serializer", @@ -258,34 +414,36 @@ "source": { "type": "git", "url": "https://github.com/egeloen/ivory-serializer.git", - "reference": "7bb7230279fd36250702b4acfd39a046b3b7b789" + "reference": "e1b21223bb014f8ca62b30d10b33a986f2a2c334" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egeloen/ivory-serializer/zipball/7bb7230279fd36250702b4acfd39a046b3b7b789", - "reference": "7bb7230279fd36250702b4acfd39a046b3b7b789", + "url": "https://api.github.com/repos/egeloen/ivory-serializer/zipball/e1b21223bb014f8ca62b30d10b33a986f2a2c334", + "reference": "e1b21223bb014f8ca62b30d10b33a986f2a2c334", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0", "doctrine/lexer": "^1.0", "php": "^5.6|^7.0", - "symfony/options-resolver": "^2.8|^3.0" + "symfony/options-resolver": "^2.7|^3.0" }, "require-dev": { - "doctrine/annotations": "^1.0", + "doctrine/annotations": "^1.2", "ext-dom": "*", "ext-json": "*", "ext-simplexml": "*", - "friendsofphp/php-cs-fixer": "^1.11", + "friendsofphp/php-cs-fixer": "^2.0", "nikic/php-parser": "^1.4", "phpdocumentor/reflection": "^3.0", "phpunit/phpunit": "^5.4", + "phpunit/phpunit-mock-objects": "^3.2.3", "psr/cache": "^1.0", - "symfony/event-dispatcher": "^2.8|^3.0", - "symfony/property-access": "^2.8|^3.0", - "symfony/property-info": "^2.8|^3.0", - "symfony/yaml": "^2.6|^3.0" + "symfony/event-dispatcher": "^2.7|^3.0", + "symfony/phpunit-bridge": "^2.7|^3.0", + "symfony/property-access": "^2.7|^3.0", + "symfony/property-info": "^2.7|^3.0", + "symfony/yaml": "^2.7|^3.0" }, "suggest": { "doctrine/annotations": "Allow you to use the mapping annotations.", @@ -323,7 +481,7 @@ "keywords": [ "serializer" ], - "time": "2017-01-25 22:39:44" + "time": "2017-02-27T21:35:23+00:00" }, { "name": "jms/metadata", @@ -374,7 +532,7 @@ "xml", "yaml" ], - "time": "2016-12-05 10:18:33" + "time": "2016-12-05T10:18:33+00:00" }, { "name": "jms/parser-lib", @@ -409,20 +567,20 @@ "Apache2" ], "description": "A library for easily creating recursive-descent parsers.", - "time": "2014-07-08 16:40:41" + "time": "2014-07-08T16:40:41+00:00" }, { "name": "jms/serializer", - "version": "1.5.0-RC1", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "30d0b79fa6c6839eb8ab73b1b7a7a7bcea35b34a" + "reference": "1ea5e0ba68b6b38c327eb3adf5888ac74b587e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/30d0b79fa6c6839eb8ab73b1b7a7a7bcea35b34a", - "reference": "30d0b79fa6c6839eb8ab73b1b7a7a7bcea35b34a", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/1ea5e0ba68b6b38c327eb3adf5888ac74b587e9c", + "reference": "1ea5e0ba68b6b38c327eb3adf5888ac74b587e9c", "shasum": "" }, "require": { @@ -430,7 +588,7 @@ "doctrine/instantiator": "^1.0.3", "jms/metadata": "~1.1", "jms/parser-lib": "1.*", - "php": ">=5.5.0", + "php": "^5.5|^7.0", "phpcollection/phpcollection": "~0.1", "phpoption/phpoption": "^1.1" }, @@ -444,6 +602,8 @@ "jackalope/jackalope-doctrine-dbal": "^1.1.5", "phpunit/phpunit": "^4.8|^5.0", "propel/propel1": "~1.7", + "psr/container": "^1.0", + "symfony/dependency-injection": "^2.7|^3.3|^4.0", "symfony/expression-language": "^2.6|^3.0", "symfony/filesystem": "^2.1", "symfony/form": "~2.1|^3.0", @@ -453,12 +613,14 @@ "twig/twig": "~1.12|~2.0" }, "suggest": { + "doctrine/cache": "Required if you like to use cache functionality.", + "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", "symfony/yaml": "Required if you'd like to serialize data to YAML format." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-1.x": "1.11-dev" } }, "autoload": { @@ -468,9 +630,13 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache2" + "MIT" ], "authors": [ + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + }, { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" @@ -485,36 +651,59 @@ "serialization", "xml" ], - "time": "2017-01-19 14:33:19" + "time": "2018-05-25T17:01:33+00:00" }, { - "name": "paragonie/random_compat", - "version": "v2.0.4", + "name": "league/flysystem", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e" + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "6a73c6922a52495caa0d59cc214e8e10ac930af3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", - "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/6a73c6922a52495caa0d59cc214e8e10ac930af3", + "reference": "6a73c6922a52495caa0d59cc214e8e10ac930af3", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "ext-fileinfo": "*", + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7" }, "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { - "files": [ - "lib/random.php" - ] + "psr-4": { + "League\\Flysystem\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -522,144 +711,259 @@ ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "Frank de Jonge", + "email": "info@frenky.net" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "Filesystem abstraction: Many filesystems, one API.", "keywords": [ - "csprng", - "pseudorandom", - "random" - ], - "time": "2016-11-07 23:38:38" + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2018-05-24T08:51:26+00:00" }, { - "name": "phpcollection/phpcollection", - "version": "0.5.0", + "name": "lstrojny/functional-php", + "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6" + "url": "https://github.com/lstrojny/functional-php.git", + "reference": "c0c15f048355d0a7ab17914022ec1f901fe5144a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", - "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", + "url": "https://api.github.com/repos/lstrojny/functional-php/zipball/c0c15f048355d0a7ab17914022ec1f901fe5144a", + "reference": "c0c15f048355d0a7ab17914022ec1f901fe5144a", "shasum": "" }, "require": { - "phpoption/phpoption": "1.*" + "php": "~7" + }, + "require-dev": { + "phpunit/phpunit": "~6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.4-dev" + "dev-master": "1.2-dev" } }, "autoload": { - "psr-0": { - "PhpCollection": "src/" - } + "psr-4": { + "Functional\\": "src/Functional" + }, + "files": [ + "src/Functional/Average.php", + "src/Functional/Capture.php", + "src/Functional/ConstFunction.php", + "src/Functional/CompareOn.php", + "src/Functional/CompareObjectHashOn.php", + "src/Functional/Compose.php", + "src/Functional/Concat.php", + "src/Functional/Contains.php", + "src/Functional/Curry.php", + "src/Functional/CurryN.php", + "src/Functional/Difference.php", + "src/Functional/DropFirst.php", + "src/Functional/DropLast.php", + "src/Functional/Each.php", + "src/Functional/Equal.php", + "src/Functional/ErrorToException.php", + "src/Functional/Every.php", + "src/Functional/False.php", + "src/Functional/Falsy.php", + "src/Functional/Filter.php", + "src/Functional/First.php", + "src/Functional/FirstIndexOf.php", + "src/Functional/FlatMap.php", + "src/Functional/Flatten.php", + "src/Functional/Flip.php", + "src/Functional/GreaterThan.php", + "src/Functional/GreaterThanOrEqual.php", + "src/Functional/Group.php", + "src/Functional/Head.php", + "src/Functional/Id.php", + "src/Functional/IfElse.php", + "src/Functional/Identical.php", + "src/Functional/IndexesOf.php", + "src/Functional/Intersperse.php", + "src/Functional/Invoke.php", + "src/Functional/InvokeFirst.php", + "src/Functional/InvokeIf.php", + "src/Functional/InvokeLast.php", + "src/Functional/Invoker.php", + "src/Functional/Last.php", + "src/Functional/LastIndexOf.php", + "src/Functional/LessThan.php", + "src/Functional/LessThanOrEqual.php", + "src/Functional/LexicographicCompare.php", + "src/Functional/Map.php", + "src/Functional/Match.php", + "src/Functional/Maximum.php", + "src/Functional/Memoize.php", + "src/Functional/Minimum.php", + "src/Functional/None.php", + "src/Functional/Not.php", + "src/Functional/PartialAny.php", + "src/Functional/PartialLeft.php", + "src/Functional/PartialMethod.php", + "src/Functional/PartialRight.php", + "src/Functional/Partition.php", + "src/Functional/Pick.php", + "src/Functional/Pluck.php", + "src/Functional/Poll.php", + "src/Functional/Product.php", + "src/Functional/Ratio.php", + "src/Functional/ReduceLeft.php", + "src/Functional/ReduceRight.php", + "src/Functional/Reindex.php", + "src/Functional/Reject.php", + "src/Functional/Retry.php", + "src/Functional/Select.php", + "src/Functional/SequenceConstant.php", + "src/Functional/SequenceExponential.php", + "src/Functional/SequenceLinear.php", + "src/Functional/Some.php", + "src/Functional/Sort.php", + "src/Functional/Sum.php", + "src/Functional/SuppressError.php", + "src/Functional/Tail.php", + "src/Functional/TailRecursion.php", + "src/Functional/True.php", + "src/Functional/Truthy.php", + "src/Functional/Unique.php", + "src/Functional/With.php", + "src/Functional/Zip.php", + "src/Functional/ZipAll.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache2" + "MIT" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Lars Strojny", + "email": "lstrojny@php.net", + "homepage": "http://usrportage.de" + }, + { + "name": "Max Beutel", + "email": "nash12@gmail.com" } ], - "description": "General-Purpose Collection Library for PHP", + "description": "Functional primitives for PHP", "keywords": [ - "collection", - "list", - "map", - "sequence", - "set" + "functional" ], - "time": "2015-05-17 12:39:23" + "time": "2017-05-08T10:17:44+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.5.0", + "name": "marc-mabe/php-enum", + "version": "2.x-dev", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + "url": "https://github.com/marc-mabe/php-enum.git", + "reference": "9803f7ffa5ad8e275c083b0accce5b7de3f90f98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/9803f7ffa5ad8e275c083b0accce5b7de3f90f98", + "reference": "9803f7ffa5ad8e275c083b0accce5b7de3f90f98", "shasum": "" }, "require": { - "php": ">=5.3.0" + "ext-reflection": "*", + "php": ">=5.3" }, "require-dev": { - "phpunit/phpunit": "4.7.*" + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "php": "PHP>=5.4 will be required for using trait EnumSerializableTrait" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "3.0-dev", + "dev-2.x": "2.3-dev", + "dev-1.x": "1.3-dev" } }, "autoload": { - "psr-0": { - "PhpOption\\": "src/" + "psr-4": { + "MabeEnum\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache2" + "BSD-3-Clause" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Marc Bennewitz", + "email": "dev@mabe.berlin", + "homepage": "http://mabe.berlin/", + "role": "Lead" } ], - "description": "Option Type for PHP", + "description": "Simple and fast implementation of enumerations with native PHP 5.3 and upper", + "homepage": "https://github.com/marc-mabe/php-enum", "keywords": [ - "language", - "option", - "php", - "type" - ], - "time": "2015-07-25 16:39:46" + "enum", + "enum-map", + "enum-set", + "enumeration", + "enummap", + "enumset", + "type-hint", + "typehint" + ], + "time": "2017-07-02T11:49:04+00:00" }, { - "name": "psr/cache", - "version": "dev-master", + "name": "paragonie/random_compat", + "version": "v2.0.11", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47" + "url": "https://github.com/paragonie/random_compat.git", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/78c5a01ddbf11cf731f1338a4f5aba23b14d5b47", - "reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.2.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, + "type": "library", "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } + "files": [ + "lib/random.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -667,44 +971,45 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" } ], - "description": "Common interface for caching libraries", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ - "cache", - "psr", - "psr-6" + "csprng", + "pseudorandom", + "random" ], - "time": "2016-10-13 14:48:10" + "time": "2017-09-27T21:40:39+00:00" }, { - "name": "psr/log", - "version": "dev-master", + "name": "phpbench/container", + "version": "1.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "url": "https://github.com/phpbench/container.git", + "reference": "8cd29cf58104e68b4d5cc2af5703e6235e41e7b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/phpbench/container/zipball/8cd29cf58104e68b4d5cc2af5703e6235e41e7b9", + "reference": "8cd29cf58104e68b4d5cc2af5703e6235e41e7b9", "shasum": "" }, "require": { - "php": ">=5.3.0" + "container-interop/container-interop": "^1.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "PhpBench\\DependencyInjection\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -713,45 +1018,43 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Daniel Leech", + "email": "daniel@dantleech.com" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10 12:19:37" + "description": "Simple, configurable, service container.", + "time": "2017-07-18T12:10:10+00:00" }, { - "name": "psr/simple-cache", - "version": "dev-master", + "name": "phpbench/dom", + "version": "0.2.0", "source": { "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" + "url": "https://github.com/phpbench/dom.git", + "reference": "b135378dd0004c05ba5446aeddaf0b83339c1c4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "url": "https://api.github.com/repos/phpbench/dom/zipball/b135378dd0004c05ba5446aeddaf0b83339c1c4c", + "reference": "b135378dd0004c05ba5446aeddaf0b83339c1c4c", "shasum": "" }, "require": { - "php": ">=5.3.0" + "ext-dom": "*", + "php": "^5.4|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { - "Psr\\SimpleCache\\": "src/" + "PhpBench\\Dom\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -760,57 +1063,666 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Daniel Leech", + "email": "daniel@dantleech.com" } ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-01-02 13:31:39" + "description": "DOM wrapper to simplify working with the PHP DOM implementation", + "time": "2016-02-27T12:15:56+00:00" + }, + { + "name": "phpbench/phpbench", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpbench/phpbench.git", + "reference": "ce48bdfc05e766a54bd748515336f2d8a6bdd91d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/ce48bdfc05e766a54bd748515336f2d8a6bdd91d", + "reference": "ce48bdfc05e766a54bd748515336f2d8a6bdd91d", + "shasum": "" + }, + "require": { + "beberlei/assert": "^2.4", + "doctrine/annotations": "^1.2.7", + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "lstrojny/functional-php": "1.0|^1.2.3", + "php": "^7.0", + "phpbench/container": "~1.0", + "phpbench/dom": "~0.2.0", + "seld/jsonlint": "^1.0", + "symfony/console": "^2.6|^3.0|^4.0", + "symfony/debug": "^2.4|^3.0|^4.0", + "symfony/filesystem": "^2.4|^3.0|^4.0", + "symfony/finder": "^2.4|^3.0|^4.0", + "symfony/options-resolver": "^2.6|^3.0|^4.0", + "symfony/process": "^2.1|^3.0|^4.0", + "webmozart/path-util": "^2.3" + }, + "require-dev": { + "doctrine/dbal": "^2.4", + "liip/rmt": "^1.2", + "padraic/phar-updater": "^1.0", + "phpstan/phpstan": "^0.8.5", + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-curl": "For (web) reports extension", + "ext-xdebug": "For XDebug profiling extension." + }, + "bin": [ + "bin/phpbench" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpBench\\": "lib/", + "PhpBench\\Extensions\\Dbal\\": "extensions/dbal/lib/", + "PhpBench\\Extensions\\XDebug\\": "extensions/xdebug/lib/", + "PhpBench\\Extensions\\Reports\\": "extensions/reports/lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Leech", + "email": "daniel@dantleech.com" + } + ], + "description": "PHP Benchmarking Framework", + "time": "2018-01-03T09:11:51+00:00" + }, + { + "name": "phpcollection/phpcollection", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-collection.git", + "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", + "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", + "shasum": "" + }, + "require": { + "phpoption/phpoption": "1.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-0": { + "PhpCollection": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "General-Purpose Collection Library for PHP", + "keywords": [ + "collection", + "list", + "map", + "sequence", + "set" + ], + "time": "2015-05-17T12:39:23+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "PhpOption\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "time": "2015-07-25T16:39:46+00:00" + }, + { + "name": "pimple/pimple", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "b5e5c1809fc323428715aa6a66ddca180e0adc0f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/b5e5c1809fc323428715aa6a66ddca180e0adc0f", + "reference": "b5e5c1809fc323428715aa6a66ddca180e0adc0f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2017-08-23T11:42:00+00:00" + }, + { + "name": "psr/cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/78c5a01ddbf11cf731f1338a4f5aba23b14d5b47", + "reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-10-13T14:48:10+00:00" + }, + { + "name": "psr/container", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "2cc4a01788191489dc7459446ba832fa79a216a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/2cc4a01788191489dc7459446ba832fa79a216a7", + "reference": "2cc4a01788191489dc7459446ba832fa79a216a7", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-06-28T15:35:32+00:00" + }, + { + "name": "psr/log", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "psr/simple-cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "seld/jsonlint", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "9b355654ea99460397b89c132b5c1087b6bf4473" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9b355654ea99460397b89c132b5c1087b6bf4473", + "reference": "9b355654ea99460397b89c132b5c1087b6bf4473", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2018-01-03T12:13:57+00:00" }, { "name": "symfony/cache", - "version": "dev-master", + "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "4e0ef50c1925edff3ab2d0925656fdfeb1930390" + "reference": "5725378078bc4e1fe3c3414e9cc0e63d7de47fff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/4e0ef50c1925edff3ab2d0925656fdfeb1930390", - "reference": "4e0ef50c1925edff3ab2d0925656fdfeb1930390", + "url": "https://api.github.com/repos/symfony/cache/zipball/5725378078bc4e1fe3c3414e9cc0e63d7de47fff", + "reference": "5725378078bc4e1fe3c3414e9cc0e63d7de47fff", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/cache": "~1.0", "psr/log": "~1.0", - "psr/simple-cache": "^1.0" + "psr/simple-cache": "^1.0", + "symfony/polyfill-apcu": "~1.1" + }, + "conflict": { + "symfony/var-dumper": "<3.3" }, "provide": { "psr/cache-implementation": "1.0", "psr/simple-cache-implementation": "1.0" }, "require-dev": { - "cache/integration-tests": "^0.15.0", + "cache/integration-tests": "dev-master", "doctrine/cache": "~1.6", "doctrine/dbal": "~2.4", "predis/predis": "~1.0" }, - "suggest": { - "symfony/polyfill-apcu": "For using ApcuAdapter on HHVM" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -841,45 +1753,49 @@ "caching", "psr6" ], - "time": "2017-01-23 14:02:05" + "time": "2018-01-03T17:14:19+00:00" }, { "name": "symfony/console", - "version": "dev-master", + "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "4dab8f5b2d6dbfb8ec808bd3d9d89dfa0eba5c42" + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4dab8f5b2d6dbfb8ec808bd3d9d89dfa0eba5c42", - "reference": "4dab8f5b2d6dbfb8ec808bd3d9d89dfa0eba5c42", + "url": "https://api.github.com/repos/symfony/console/zipball/8394c8ef121949e8f858f13bc1e34f05169e4e7d", + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, "require-dev": { "psr/log": "~1.0", - "symfony/dependency-injection": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -906,7 +1822,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-01-23 22:46:36" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/debug", @@ -914,28 +1830,28 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "55f724564dacda257840179a09e0edf3c9da7311" + "reference": "d6bc1c9e625a76fbe07087c6004455d58ad3a900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/55f724564dacda257840179a09e0edf3c9da7311", - "reference": "55f724564dacda257840179a09e0edf3c9da7311", + "url": "https://api.github.com/repos/symfony/debug/zipball/d6bc1c9e625a76fbe07087c6004455d58ad3a900", + "reference": "d6bc1c9e625a76fbe07087c6004455d58ad3a900", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -962,7 +1878,105 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-01-24 09:54:11" + "time": "2018-01-03T17:15:33+00:00" + }, + { + "name": "symfony/filesystem", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "94281d227ea7a154eb23c618d06c9c2ee76c1e59" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/94281d227ea7a154eb23c618d06c9c2ee76c1e59", + "reference": "94281d227ea7a154eb23c618d06c9c2ee76c1e59", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:38:11+00:00" + }, + { + "name": "symfony/finder", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "c1f37edd31fc56312f5912e4322b2a16f5e12ef3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/c1f37edd31fc56312f5912e4322b2a16f5e12ef3", + "reference": "c1f37edd31fc56312f5912e4322b2a16f5e12ef3", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2018-05-16T14:42:13+00:00" }, { "name": "symfony/inflector", @@ -970,21 +1984,21 @@ "source": { "type": "git", "url": "https://github.com/symfony/inflector.git", - "reference": "e16e5588af1e9b1956554333e742e2da41f787ea" + "reference": "242a9dd0c961e787bc40a02309315167b5f479bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/inflector/zipball/e16e5588af1e9b1956554333e742e2da41f787ea", - "reference": "e16e5588af1e9b1956554333e742e2da41f787ea", + "url": "https://api.github.com/repos/symfony/inflector/zipball/242a9dd0c961e787bc40a02309315167b5f479bc", + "reference": "242a9dd0c961e787bc40a02309315167b5f479bc", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1019,29 +2033,29 @@ "symfony", "words" ], - "time": "2017-01-02 20:33:09" + "time": "2018-01-03T17:15:33+00:00" }, { "name": "symfony/options-resolver", - "version": "dev-master", + "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "3833c7ac7e3862ee1ba393c8d0be533bd90586d4" + "reference": "f31f4d3ce4eaf7597abc41bd5ba53d634c2fdb0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/3833c7ac7e3862ee1ba393c8d0be533bd90586d4", - "reference": "3833c7ac7e3862ee1ba393c8d0be533bd90586d4", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/f31f4d3ce4eaf7597abc41bd5ba53d634c2fdb0e", + "reference": "f31f4d3ce4eaf7597abc41bd5ba53d634c2fdb0e", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1073,7 +2087,7 @@ "configuration", "options" ], - "time": "2017-01-02 20:33:09" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/polyfill-apcu", @@ -1081,12 +2095,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-apcu.git", - "reference": "5d4474f447403c3348e37b70acc2b95475b7befa" + "reference": "04f62674339602def515bff4bc6901fc1d4951e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/5d4474f447403c3348e37b70acc2b95475b7befa", - "reference": "5d4474f447403c3348e37b70acc2b95475b7befa", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/04f62674339602def515bff4bc6901fc1d4951e8", + "reference": "04f62674339602def515bff4bc6901fc1d4951e8", "shasum": "" }, "require": { @@ -1095,10 +2109,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.6-dev" } }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Apcu\\": "" + }, "files": [ "bootstrap.php" ] @@ -1126,7 +2143,65 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-10-11T12:05:26+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "9d31bef82d2e9b033f335d60b96611757f98c605" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/9d31bef82d2e9b033f335d60b96611757f98c605", + "reference": "9d31bef82d2e9b033f335d60b96611757f98c605", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-05-17T18:32:56+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -1134,12 +2209,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + "reference": "750a2b259dd68436e3b918a4241e80b023a80663" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/750a2b259dd68436e3b918a4241e80b023a80663", + "reference": "750a2b259dd68436e3b918a4241e80b023a80663", "shasum": "" }, "require": { @@ -1151,7 +2226,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1185,7 +2260,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-12-17T16:08:10+00:00" }, { "name": "symfony/polyfill-php70", @@ -1193,12 +2268,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2" + "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", - "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff", + "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff", "shasum": "" }, "require": { @@ -1208,7 +2283,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1244,29 +2319,78 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-10-11T12:05:26+00:00" }, { - "name": "symfony/property-access", + "name": "symfony/process", "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "4f10286a128df6b60b3706752e11f6227fcac844" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/4f10286a128df6b60b3706752e11f6227fcac844", + "reference": "4f10286a128df6b60b3706752e11f6227fcac844", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2018-05-16T14:42:13+00:00" + }, + { + "name": "symfony/property-access", + "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "f409701b2a905e09637cdb681042ad6a98805440" + "reference": "a6e8c778b220dfd5cd5f5dcb09f87ee232dd608a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/f409701b2a905e09637cdb681042ad6a98805440", - "reference": "f409701b2a905e09637cdb681042ad6a98805440", + "url": "https://api.github.com/repos/symfony/property-access/zipball/a6e8c778b220dfd5cd5f5dcb09f87ee232dd608a", + "reference": "a6e8c778b220dfd5cd5f5dcb09f87ee232dd608a", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/inflector": "~3.1", + "php": "^5.5.9|>=7.0.8", + "symfony/inflector": "~3.1|~4.0", "symfony/polyfill-php70": "~1.0" }, "require-dev": { - "symfony/cache": "~3.1" + "symfony/cache": "~3.1|~4.0" }, "suggest": { "psr/cache-implementation": "To cache access methods." @@ -1274,7 +2398,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1312,7 +2436,7 @@ "property path", "reflection" ], - "time": "2017-01-06 15:22:02" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/serializer", @@ -1320,32 +2444,37 @@ "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "85db52d97031153d9fac44b3d63a4318d58899fa" + "reference": "2cd0f38962526c1b58ecb9454cc377140d44d596" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/85db52d97031153d9fac44b3d63a4318d58899fa", - "reference": "85db52d97031153d9fac44b3d63a4318d58899fa", + "url": "https://api.github.com/repos/symfony/serializer/zipball/2cd0f38962526c1b58ecb9454cc377140d44d596", + "reference": "2cd0f38962526c1b58ecb9454cc377140d44d596", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4", - "symfony/property-info": "<3.1", - "symfony/yaml": "<3.1" + "phpdocumentor/type-resolver": "<0.2.1", + "symfony/dependency-injection": "<3.4", + "symfony/property-access": "<3.4", + "symfony/property-info": "<3.4", + "symfony/yaml": "<3.4" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", - "phpdocumentor/reflection-docblock": "~3.0", - "symfony/cache": "~3.1", - "symfony/config": "~2.8|~3.0", - "symfony/http-foundation": "~2.8|~3.0", - "symfony/property-access": "~2.8|~3.0", - "symfony/property-info": "~3.1", - "symfony/yaml": "~3.1" + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "symfony/cache": "~3.4|~4.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/http-foundation": "~3.4|~4.0", + "symfony/property-access": "~3.4|~4.0", + "symfony/property-info": "~3.4|~4.0", + "symfony/validator": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", @@ -1360,7 +2489,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1387,27 +2516,30 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "time": "2017-01-24 12:59:20" + "time": "2018-05-31T10:18:23+00:00" }, { "name": "symfony/yaml", - "version": "dev-master", + "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "7928849b226f065dae93ec0e8be3b829f73ba67b" + "reference": "25c192f25721a74084272671f658797d9e0e0146" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/7928849b226f065dae93ec0e8be3b829f73ba67b", - "reference": "7928849b226f065dae93ec0e8be3b829f73ba67b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/25c192f25721a74084272671f658797d9e0e0146", + "reference": "25c192f25721a74084272671f658797d9e0e0146", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "~3.4|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -1415,7 +2547,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1442,17 +2574,115 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-01-21 17:10:26" + "time": "2018-01-03T07:37:34+00:00" + }, + { + "name": "webmozart/assert", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "1fc2d96ee97d5052f44662563587a0213895343d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/1fc2d96ee97d5052f44662563587a0213895343d", + "reference": "1fc2d96ee97d5052f44662563587a0213895343d", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-05-26T14:16:30+00:00" + }, + { + "name": "webmozart/path-util", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "95a8f7ad150c2a3773ff3c3d04f557a24c99cfd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/95a8f7ad150c2a3773ff3c3d04f557a24c99cfd2", + "reference": "95a8f7ad150c2a3773ff3c3d04f557a24c99cfd2", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "time": "2016-08-15T15:31:42+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "phpbench/phpbench": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^5.6|^7.0" + "php": "^7.1" }, "platform-dev": [] } diff --git a/docker-compose.yml b/docker-compose.yml index cab80bd..811f309 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: env_file: - .env volumes: - - ~/.composer:/var/www/.composer - - .:/var/www/html + - ~/.composer:/var/www/.composer:cached + - .:/var/www/html:cached hhvm: <<: *php build: docker/hhvm diff --git a/phpbench.json b/phpbench.json new file mode 100644 index 0000000..e68ab14 --- /dev/null +++ b/phpbench.json @@ -0,0 +1,3 @@ +{ + "bootstrap": "vendor/autoload.php" +} diff --git a/src/AbstractBenchmark.php b/src/AbstractBenchmark.php index 18d1adf..11efae4 100644 --- a/src/AbstractBenchmark.php +++ b/src/AbstractBenchmark.php @@ -2,87 +2,64 @@ namespace Ivory\Tests\Serializer\Benchmark; -use Ivory\Tests\Serializer\Benchmark\Model\Category; -use Ivory\Tests\Serializer\Benchmark\Model\Comment; use Ivory\Tests\Serializer\Benchmark\Model\Forum; -use Ivory\Tests\Serializer\Benchmark\Model\Thread; +use Ivory\Tests\Serializer\Benchmark\Runner\DataGenerator; /** * @author GeLo */ abstract class AbstractBenchmark implements BenchmarkInterface { - public function setUp() - { - } /** - * @return string + * @const string */ - protected function getFormat() + protected const NAME = 'override_me'; + + /** + * @var DataGenerator + */ + private $dataGenerator; + + /** + * AbstractBenchmark constructor. + */ + public function __construct() { - return 'json'; + $this->dataGenerator = new DataGenerator(); } /** - * @param int $horizontalComplexity - * @param int $verticalComplexity * - * @return Forum */ - protected function getData($horizontalComplexity = 1, $verticalComplexity = 1) + public function setUp() { - $forum = new Forum(1, 'Great name!'); - $forum->setCategory($this->createCategory($verticalComplexity)); - - for ($i = 0; $i < $horizontalComplexity * 2; ++$i) { - $forum->addThread($this->createThread($i, $horizontalComplexity)); - } - - return $forum; } /** - * @param int $verticalComplexity - * - * @return Category + * @return string */ - private function createCategory($verticalComplexity = 1) + public function getName(): string { - $original = $category = new Category(1); - - for ($i = 0; $i < $verticalComplexity * 2; ++$i) { - $category->setParent($parent = new Category($i + 1)); - $category = $parent; - } - - return $original; + return static::NAME; } /** - * @param int $index - * @param int $horizontalComplexity - * - * @return Thread + * @return string */ - private function createThread($index, $horizontalComplexity = 1) + protected function getFormat() { - $thread = new Thread($index, 'Great thread '.$index.'!', 'Great description '.$index, $index / 100); - - for ($i = 0; $i < $horizontalComplexity * 5; ++$i) { - $thread->addComment($this->createComment($index * $i + $i)); - } - - return $thread; + return 'json'; } /** - * @param int $index + * @param int $horizontalComplexity + * @param int $verticalComplexity * - * @return Comment + * @return Forum */ - private function createComment($index) + protected function getData(int $horizontalComplexity = 1, int $verticalComplexity = 1): Forum { - return new Comment($index, 'Great comment '.$index.'!'); + return $this->dataGenerator->getData($horizontalComplexity, $verticalComplexity); } } diff --git a/src/BenchmarkInterface.php b/src/BenchmarkInterface.php index f1552f8..ef88b84 100644 --- a/src/BenchmarkInterface.php +++ b/src/BenchmarkInterface.php @@ -9,6 +9,11 @@ interface BenchmarkInterface { public function setUp(); + /** + * @return string + */ + public function getName(): string; + /** * @param int $horizontalComplexity * @param int $verticalComplexity diff --git a/src/BsBenchmark.php b/src/BsBenchmark.php new file mode 100644 index 0000000..d88583e --- /dev/null +++ b/src/BsBenchmark.php @@ -0,0 +1,51 @@ + + */ +class BsBenchmark extends AbstractBenchmark +{ + + /** + * @const string + */ + protected const NAME = 'BetterSerializer'; + + /** + * @var Serializer + */ + private $serializer; + + /** + * {@inheritdoc} + */ + public function setUp() + { + $builder = new Builder(); + + if (extension_loaded('apcu') && ini_get('apc.enabled')) { + $builder->enableApcuCache(); + } else { + $builder->enableFilesystemCache(dirname(__DIR__, 1) . '/cache/better-serializer'); + } + + $this->serializer = $builder->createSerializer(); + } + + /** + * {@inheritdoc} + */ + public function execute($horizontalComplexity = 1, $verticalComplexity = 1) + { + return $this->serializer->serialize( + $this->getData($horizontalComplexity, $verticalComplexity), + SerializationType::byValue($this->getFormat()) + ); + } +} diff --git a/src/Command/BenchmarkCommand.php b/src/Command/BenchmarkCommand.php index 9e27bf6..50ca816 100644 --- a/src/Command/BenchmarkCommand.php +++ b/src/Command/BenchmarkCommand.php @@ -2,15 +2,19 @@ namespace Ivory\Tests\Serializer\Benchmark\Command; +use Ivory\Tests\Serializer\Benchmark\BsBenchmark; use Ivory\Tests\Serializer\Benchmark\IvoryBenchmark; use Ivory\Tests\Serializer\Benchmark\JmsBenchmark; use Ivory\Tests\Serializer\Benchmark\Result\BenchmarkResultInterface; +use Ivory\Tests\Serializer\Benchmark\Result\ResultsAggregate; use Ivory\Tests\Serializer\Benchmark\Runner\BenchmarkRunner; use Ivory\Tests\Serializer\Benchmark\SymfonyGetSetNormalizerBenchmark; use Ivory\Tests\Serializer\Benchmark\SymfonyObjectNormalizerBenchmark; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** @@ -42,7 +46,8 @@ protected function configure() ->setName('benchmark') ->addOption('iteration', 'i', InputArgument::OPTIONAL, 'Number of iteration(s)', 1) ->addOption('horizontal-complexity', 'hc', InputArgument::OPTIONAL, 'Horizontal data complexity', 1) - ->addOption('vertical-complexity', 'vc', InputArgument::OPTIONAL, 'Vertical data complexity', 1); + ->addOption('vertical-complexity', 'vc', InputArgument::OPTIONAL, 'Vertical data complexity', 1) + ->addOption('with-symfony-serializer', 'wss', InputOption::VALUE_NONE, 'Also run with Symfony serializer'); } /** @@ -52,29 +57,35 @@ protected function execute(InputInterface $input, OutputInterface $output) { $benchmarks = [ new IvoryBenchmark(), - new SymfonyObjectNormalizerBenchmark(), - new SymfonyGetSetNormalizerBenchmark(), new JmsBenchmark(), + new BsBenchmark(), ]; + $withSymfony = $input->getOption('with-symfony-serializer'); + + if ($withSymfony) { + $benchmarks[] = new SymfonyObjectNormalizerBenchmark(); + $benchmarks[] = new SymfonyGetSetNormalizerBenchmark(); + } + $iteration = $input->getOption('iteration'); $horizontalComplexity = $input->getOption('horizontal-complexity'); $verticalComplexity = $input->getOption('vertical-complexity'); + $results = new ResultsAggregate(); + foreach ($benchmarks as $benchmark) { - $this->output( - $this->runner->run($benchmark, $iteration, $horizontalComplexity, $verticalComplexity), - $output - ); + $results->addResult($this->runner->run($benchmark, $iteration, $horizontalComplexity, $verticalComplexity)); + $output->writeln($benchmark->getName() . ': Done!'); } - } - /** - * @param BenchmarkResultInterface $result - * @param OutputInterface $output - */ - private function output(BenchmarkResultInterface $result, OutputInterface $output) - { - $output->writeln(get_class($result->getBenchmark()).' | '.$result->getTime()); + $output->writeln(''); + + $table = new Table($output); + $table + ->setHeaders(['Serializer', 'Duration (sec)', 'Factor']) + ->setRows($results->getResultRows()) + ; + $table->render(); } } diff --git a/src/IvoryBenchmark.php b/src/IvoryBenchmark.php index 94fa0bc..e26ef99 100644 --- a/src/IvoryBenchmark.php +++ b/src/IvoryBenchmark.php @@ -16,6 +16,12 @@ */ class IvoryBenchmark extends AbstractBenchmark { + + /** + * @const string + */ + protected const NAME = 'Ivory'; + /** * @var Serializer */ diff --git a/src/JmsBenchmark.php b/src/JmsBenchmark.php index f2f816b..369852d 100644 --- a/src/JmsBenchmark.php +++ b/src/JmsBenchmark.php @@ -10,6 +10,12 @@ */ class JmsBenchmark extends AbstractBenchmark { + + /** + * @const string + */ + protected const NAME = 'JMS'; + /** * @var Serializer */ diff --git a/src/Result/BenchmarkResult.php b/src/Result/BenchmarkResult.php index b2aa49f..62cb825 100644 --- a/src/Result/BenchmarkResult.php +++ b/src/Result/BenchmarkResult.php @@ -10,9 +10,9 @@ class BenchmarkResult implements BenchmarkResultInterface { /** - * @var BenchmarkInterface + * @var string */ - private $benchmark; + private $name; /** * @var int @@ -20,27 +20,27 @@ class BenchmarkResult implements BenchmarkResultInterface private $time; /** - * @param BenchmarkInterface $benchmark + * @param string $name * @param int $time */ - public function __construct(BenchmarkInterface $benchmark, $time) + public function __construct(string $name, $time) { - $this->benchmark = $benchmark; + $this->name = $name; $this->time = $time; } /** - * @return BenchmarkInterface + * @return string */ - public function getBenchmark() + public function getName(): string { - return $this->benchmark; + return $this->name; } /** - * {@inheritdoc} + * @return float */ - public function getTime() + public function getTime(): float { return $this->time; } diff --git a/src/Result/BenchmarkResultInterface.php b/src/Result/BenchmarkResultInterface.php index 985deb4..cd4dec7 100644 --- a/src/Result/BenchmarkResultInterface.php +++ b/src/Result/BenchmarkResultInterface.php @@ -10,12 +10,12 @@ interface BenchmarkResultInterface { /** - * @return BenchmarkInterface + * @return string */ - public function getBenchmark(); + public function getName(): string; /** - * @return int + * @return float */ - public function getTime(); + public function getTime(): float; } diff --git a/src/Result/BenchmarkResults.php b/src/Result/BenchmarkResults.php index 55fcb80..7b200ed 100644 --- a/src/Result/BenchmarkResults.php +++ b/src/Result/BenchmarkResults.php @@ -28,23 +28,23 @@ public function __construct(array $results) /** * @return BenchmarkResultInterface[] */ - public function getResults() + public function getResults(): array { return $this->results; } /** - * {@inheritdoc} + * @return string */ - public function getBenchmark() + public function getName(): string { - return reset($this->results)->getBenchmark(); + return reset($this->results)->getName(); } /** - * {@inheritdoc} + * @return float */ - public function getTime() + public function getTime(): float { if ($this->time !== null) { return $this->time; diff --git a/src/Result/ResultsAggregate.php b/src/Result/ResultsAggregate.php new file mode 100644 index 0000000..de88eb4 --- /dev/null +++ b/src/Result/ResultsAggregate.php @@ -0,0 +1,54 @@ + + */ + +namespace Ivory\Tests\Serializer\Benchmark\Result; + +/** + * Class ResultsAggregate + * @author mfris + * @package Ivory\Tests\Serializer\Benchmark\Result + */ +final class ResultsAggregate +{ + + /** + * @var BenchmarkResultInterface[] + */ + private $results = []; + + /** + * @param BenchmarkResultInterface $result + */ + public function addResult(BenchmarkResultInterface $result): void + { + $this->results[] = $result; + } + + /** + * @return array + */ + public function getResultRows(): array + { + usort($this->results, function(BenchmarkResultInterface $a, BenchmarkResultInterface $b) { + return $a->getTime() <=> $b->getTime(); + }); + + $fastestTime = $this->results[0]->getTime(); + + $rows = []; + + foreach ($this->results as $result) { + $rows[] = [ + $result->getName(), + sprintf('%.6fs', $result->getTime()), + sprintf('%.2fx', $result->getTime() / $fastestTime), + ]; + } + + return $rows; + } +} diff --git a/src/Runner/BenchmarkRunner.php b/src/Runner/BenchmarkRunner.php index 5cbbdf0..96e1a6d 100644 --- a/src/Runner/BenchmarkRunner.php +++ b/src/Runner/BenchmarkRunner.php @@ -55,6 +55,6 @@ private function doRun(BenchmarkInterface $benchmark, $horizontalComplexity = 1, $benchmark->execute($horizontalComplexity, $verticalComplexity); $finishTime = microtime(true); - return new BenchmarkResult($benchmark, $finishTime - $startTime); + return new BenchmarkResult($benchmark->getName(), $finishTime - $startTime); } } diff --git a/src/Runner/DataGenerator.php b/src/Runner/DataGenerator.php new file mode 100644 index 0000000..6fc4704 --- /dev/null +++ b/src/Runner/DataGenerator.php @@ -0,0 +1,84 @@ + + */ + +namespace Ivory\Tests\Serializer\Benchmark\Runner; + +use Ivory\Tests\Serializer\Benchmark\Model\Category; +use Ivory\Tests\Serializer\Benchmark\Model\Comment; +use Ivory\Tests\Serializer\Benchmark\Model\Forum; +use Ivory\Tests\Serializer\Benchmark\Model\Thread; + +/** + * Class DataGenerator + * @author mfris + * @package Ivory\Tests\Serializer\Benchmark\Runner + */ +final class DataGenerator +{ + + /** + * @param int $horizontalComplexity + * @param int $verticalComplexity + * + * @return Forum + */ + public function getData(int $horizontalComplexity = 1, int $verticalComplexity = 1): Forum + { + $forum = new Forum(1, 'Great name!'); + $forum->setCategory($this->createCategory($verticalComplexity)); + + for ($i = 0; $i < $horizontalComplexity * 2; ++$i) { + $forum->addThread($this->createThread($i, $horizontalComplexity)); + } + + return $forum; + } + + /** + * @param int $verticalComplexity + * + * @return Category + */ + private function createCategory(int $verticalComplexity = 1): Category + { + $original = $category = new Category(1); + + for ($i = 0; $i < $verticalComplexity * 2; ++$i) { + $category->setParent($parent = new Category($i + 1)); + $category = $parent; + } + + return $original; + } + + /** + * @param int $index + * @param int $horizontalComplexity + * + * @return Thread + */ + private function createThread($index, $horizontalComplexity = 1): Thread + { + $thread = new Thread($index, 'Great thread '.$index.'!', 'Great description '.$index, $index / 100); + + for ($i = 0; $i < $horizontalComplexity * 5; ++$i) { + $thread->addComment($this->createComment($index * $i + $i)); + } + + return $thread; + } + + /** + * @param int $index + * + * @return Comment + */ + private function createComment($index): Comment + { + return new Comment($index, 'Great comment '.$index.'!'); + } +} diff --git a/src/SerializerBenchmarks/AbstractBench.php b/src/SerializerBenchmarks/AbstractBench.php new file mode 100644 index 0000000..3704fb0 --- /dev/null +++ b/src/SerializerBenchmarks/AbstractBench.php @@ -0,0 +1,109 @@ + + */ + +namespace SerializerBenchmarks; + +use Ivory\Tests\Serializer\Benchmark\Runner\DataGenerator; +use PhpBench\Benchmark\Metadata\Annotations\BeforeMethods; +use PhpBench\Benchmark\Metadata\Annotations\ParamProviders; + +/** + * Class AbstractBench + * @author mfris + * @package Benchmarks + * @BeforeMethods({"init"}) + */ +abstract class AbstractBench +{ + + /** + * @var DataGenerator + */ + private $dataGenerator; + + /** + * @var mixed + */ + private $data; + + /** + * AbstractBench constructor. + */ + public function __construct() + { + $this->dataGenerator = new DataGenerator(); + } + + /** + * @return array + */ + public function provideData(): array + { + return [ + [ + 'horizontal' => 1, + 'vertical' => 1, + ], + [ + 'horizontal' => 2, + 'vertical' => 2, + ], + [ + 'horizontal' => 10, + 'vertical' => 10, + ], + [ + 'horizontal' => 20, + 'vertical' => 20, + ], + [ + 'horizontal' => 50, + 'vertical' => 50, + ], + [ + 'horizontal' => 100, + 'vertical' => 100, + ], + [ + 'horizontal' => 100, + 'vertical' => 200, + ], + ]; + } + + /** + * + */ + abstract public function init(): void; + + /** + * @param array $params + * @ParamProviders({"provideData"}) + */ + abstract public function bench(array $params): void; + + /** + * @return DataGenerator + */ + protected function getDataGenerator(): DataGenerator + { + return $this->dataGenerator; + } + + /** + * @param array $params + * @return mixed + */ + protected function getData(array $params) + { + if ($this->data === null) { + $this->data = $this->dataGenerator->getData($params['horizontal'], $params['vertical']); + } + + return $this->data; + } +} diff --git a/src/SerializerBenchmarks/BetterSerializerBench.php b/src/SerializerBenchmarks/BetterSerializerBench.php new file mode 100644 index 0000000..4ae3646 --- /dev/null +++ b/src/SerializerBenchmarks/BetterSerializerBench.php @@ -0,0 +1,58 @@ + + */ + +namespace SerializerBenchmarks; + +use BetterSerializer\Builder; +use BetterSerializer\Common\SerializationType; +use BetterSerializer\Serializer; +use PhpBench\Benchmark\Metadata\Annotations\ParamProviders; +use PhpBench\Benchmark\Metadata\Annotations\Warmup; +use Pimple\Exception\UnknownIdentifierException; +use LogicException; +use ReflectionException; +use RuntimeException; + +/** + * Class BetterSerializerBench + * @author mfris + */ +final class BetterSerializerBench extends AbstractBench +{ + + /** + * @var Serializer + */ + private $serializer; + + /** + * @throws RuntimeException|UnknownIdentifierException + */ + public function init(): void + { + $builder = new Builder(); + + if (extension_loaded('apcu') && ini_get('apc.enabled')) { + $builder->enableApcuCache(); + } else { + $builder->enableFilesystemCache(dirname(__DIR__, 2) . '/cache/better-serializer'); + } + + $this->serializer = $builder->createSerializer(); + } + + /** + * @param array $params + * @ParamProviders({"provideData"}) + * @Warmup(1) + * @throws LogicException|ReflectionException|RuntimeException + */ + public function bench(array $params): void + { + $this->serializer->serialize($this->getData($params), SerializationType::JSON()); + } +} diff --git a/src/SerializerBenchmarks/IvorySerializerBench.php b/src/SerializerBenchmarks/IvorySerializerBench.php new file mode 100644 index 0000000..9091e0d --- /dev/null +++ b/src/SerializerBenchmarks/IvorySerializerBench.php @@ -0,0 +1,63 @@ + + */ + +namespace SerializerBenchmarks; + +use Doctrine\Common\Annotations\AnnotationRegistry; +use Ivory\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Ivory\Serializer\Mapping\Factory\ClassMetadataFactory; +use Ivory\Serializer\Navigator\Navigator; +use Ivory\Serializer\Registry\TypeRegistry; +use Ivory\Serializer\Serializer; +use Ivory\Serializer\Type\ObjectType; +use Ivory\Serializer\Type\Type; +use PhpBench\Benchmark\Metadata\Annotations\ParamProviders; +use PhpBench\Benchmark\Metadata\Annotations\Warmup; +use Symfony\Component\Cache\Adapter\ApcuAdapter; + +/** + * Class JmsSerializerBench + * @author mfris + * @package SerializerBenchmarks + */ +final class IvorySerializerBench extends AbstractBench +{ + + /** + * @var Serializer + */ + private $serializer; + + /** + * + */ + public function init(): void + { + $loader = require __DIR__.'/../../vendor/autoload.php'; + AnnotationRegistry::registerLoader([$loader, 'loadClass']); + $classMetadataFactory = new CacheClassMetadataFactory( + ClassMetadataFactory::create(), + new ApcuAdapter('IvoryMetadata') + ); + + $typeRegistry = TypeRegistry::create([ + Type::OBJECT => new ObjectType($classMetadataFactory), + ]); + + $this->serializer = new Serializer(new Navigator($typeRegistry)); + } + + /** + * @param array $params + * @ParamProviders({"provideData"}) + * @Warmup(1) + */ + public function bench(array $params): void + { + $this->serializer->serialize($this->getData($params), 'json'); + } +} diff --git a/src/SerializerBenchmarks/JmsSerializerBench.php b/src/SerializerBenchmarks/JmsSerializerBench.php new file mode 100644 index 0000000..9b3c4a3 --- /dev/null +++ b/src/SerializerBenchmarks/JmsSerializerBench.php @@ -0,0 +1,47 @@ + + */ + +namespace SerializerBenchmarks; + +use JMS\Serializer\Serializer; +use JMS\Serializer\SerializerBuilder; +use PhpBench\Benchmark\Metadata\Annotations\ParamProviders; +use PhpBench\Benchmark\Metadata\Annotations\Warmup; + +/** + * Class JmsSerializerBench + * @author mfris + * @package SerializerBenchmarks + */ +final class JmsSerializerBench extends AbstractBench +{ + + /** + * @var Serializer + */ + private $serializer; + + /** + * + */ + public function init(): void + { + $this->serializer = SerializerBuilder::create() + ->setCacheDir(__DIR__.'/../../cache/Jms') + ->build(); + } + + /** + * @param array $params + * @ParamProviders({"provideData"}) + * @Warmup(1) + */ + public function bench(array $params): void + { + $this->serializer->serialize($this->getData($params), 'json'); + } +} diff --git a/src/SerializerBenchmarks/SymfonyGsNormSerializerBench.php b/src/SerializerBenchmarks/SymfonyGsNormSerializerBench.php new file mode 100644 index 0000000..3628b9c --- /dev/null +++ b/src/SerializerBenchmarks/SymfonyGsNormSerializerBench.php @@ -0,0 +1,81 @@ + + */ + +namespace SerializerBenchmarks; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Annotations\AnnotationRegistry; +use PhpBench\Benchmark\Metadata\Annotations\ParamProviders; +use PhpBench\Benchmark\Metadata\Annotations\Warmup; +use PhpBench\Serializer\XmlEncoder; +use Symfony\Component\Cache\Adapter\ApcuAdapter; +use Symfony\Component\Serializer\Encoder\JsonEncoder; +use Symfony\Component\Serializer\Encoder\YamlEncoder; +use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; +use Symfony\Component\Serializer\Serializer; + +/** + * Class JmsSerializerBench + * @author mfris + * @package SerializerBenchmarks + */ +final class SymfonyGsNormSerializerBench extends AbstractBench +{ + + /** + * @var Serializer + */ + private $serializer; + + /** + * + */ + public function init(): void + { + $loader = require __DIR__.'/../../vendor/autoload.php'; + AnnotationRegistry::registerLoader([$loader, 'loadClass']); + $classMetadataFactory = new CacheClassMetadataFactory( + new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())), + new ApcuAdapter('SymfonyMetadata') + ); + + $this->serializer = new Serializer( + [new GetSetMethodNormalizer($classMetadataFactory)], + [new JsonEncoder(), new XmlEncoder(), new YamlEncoder()] + ); + } + + /** + * @param array $params + * @ParamProviders({"provideData"}) + * @Warmup(1) + */ + public function bench(array $params): void + { + $this->serializer->serialize($this->getData($params), 'json'); + } + + /** + * @return array + */ + public function provideData(): array + { + return [ + [ + 'vertical' => 1, + 'horizontal' => 1, + ], + [ + 'vertical' => 2, + 'horizontal' => 2, + ], + ]; + } +} diff --git a/src/SerializerBenchmarks/SymfonyObjNormSerializerBench.php b/src/SerializerBenchmarks/SymfonyObjNormSerializerBench.php new file mode 100644 index 0000000..eb079a2 --- /dev/null +++ b/src/SerializerBenchmarks/SymfonyObjNormSerializerBench.php @@ -0,0 +1,86 @@ + + */ + +namespace SerializerBenchmarks; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Annotations\AnnotationRegistry; +use PhpBench\Benchmark\Metadata\Annotations\ParamProviders; +use PhpBench\Benchmark\Metadata\Annotations\Warmup; +use PhpBench\Serializer\XmlEncoder; +use Symfony\Component\Cache\Adapter\ApcuAdapter; +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\Serializer\Encoder\JsonEncoder; +use Symfony\Component\Serializer\Encoder\YamlEncoder; +use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; + +/** + * Class JmsSerializerBench + * @author mfris + * @package SerializerBenchmarks + */ +final class SymfonyObjNormSerializerBench extends AbstractBench +{ + + /** + * @var Serializer + */ + private $serializer; + + /** + * + */ + public function init(): void + { + $loader = require __DIR__.'/../../vendor/autoload.php'; + AnnotationRegistry::registerLoader([$loader, 'loadClass']); + $classMetadataFactory = new CacheClassMetadataFactory( + new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())), + new ApcuAdapter('SymfonyMetadata') + ); + + $propertyAccessor = PropertyAccess::createPropertyAccessorBuilder() + ->setCacheItemPool(new ApcuAdapter('SymfonyPropertyAccessor')) + ->getPropertyAccessor(); + + $this->serializer = new Serializer( + [new ObjectNormalizer($classMetadataFactory, null, $propertyAccessor)], + [new JsonEncoder(), new XmlEncoder(), new YamlEncoder()] + ); + } + + /** + * @param array $params + * @ParamProviders({"provideData"}) + * @Warmup(1) + */ + public function bench(array $params): void + { + $this->serializer->serialize($this->getData($params), 'json'); + } + + /** + * @return array + */ + public function provideData(): array + { + return [ + [ + 'vertical' => 1, + 'horizontal' => 1, + ], + [ + 'vertical' => 2, + 'horizontal' => 2, + ], + ]; + } +} diff --git a/src/SymfonyGetSetNormalizerBenchmark.php b/src/SymfonyGetSetNormalizerBenchmark.php index 7485ea8..a8d4818 100644 --- a/src/SymfonyGetSetNormalizerBenchmark.php +++ b/src/SymfonyGetSetNormalizerBenchmark.php @@ -18,6 +18,12 @@ */ class SymfonyGetSetNormalizerBenchmark extends AbstractBenchmark { + + /** + * @const string + */ + protected const NAME = 'Symfony - GetNormalizer'; + /** * @var Serializer */ @@ -25,6 +31,9 @@ class SymfonyGetSetNormalizerBenchmark extends AbstractBenchmark /** * {@inheritdoc} + * @throws \Doctrine\Common\Annotations\AnnotationException + * @throws \InvalidArgumentException + * @throws \Symfony\Component\Serializer\Exception\RuntimeException */ public function setUp() { diff --git a/src/SymfonyObjectNormalizerBenchmark.php b/src/SymfonyObjectNormalizerBenchmark.php index 57442a4..d177323 100644 --- a/src/SymfonyObjectNormalizerBenchmark.php +++ b/src/SymfonyObjectNormalizerBenchmark.php @@ -19,6 +19,12 @@ */ class SymfonyObjectNormalizerBenchmark extends AbstractBenchmark { + + /** + * @const string + */ + protected const NAME = 'Symfony - ObjectNormalizer'; + /** * @var Serializer */ @@ -26,6 +32,9 @@ class SymfonyObjectNormalizerBenchmark extends AbstractBenchmark /** * {@inheritdoc} + * @throws \Doctrine\Common\Annotations\AnnotationException + * @throws \InvalidArgumentException + * @throws \Symfony\Component\Serializer\Exception\RuntimeException */ public function setUp() { @@ -46,6 +55,7 @@ public function setUp() /** * {@inheritdoc} + * @throws */ public function execute($horizontalComplexity = 1, $verticalComplexity = 1) {