From b360a56b08a7ec30f8e6dbb5f7685b45bd77fe7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Sat, 2 Feb 2019 15:27:58 +0100 Subject: [PATCH 1/4] Adding failing test with openssl_encrypt --- generator/tests/GeneratedFilesTest.php | 77 ++++++++++++++++---------- 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/generator/tests/GeneratedFilesTest.php b/generator/tests/GeneratedFilesTest.php index f4f1419b..ab9aa57e 100644 --- a/generator/tests/GeneratedFilesTest.php +++ b/generator/tests/GeneratedFilesTest.php @@ -14,16 +14,17 @@ class GeneratedFilesTest extends TestCase { public function testSprintf() { - require_once __DIR__.'/../../generated/strings.php'; - require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; - require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php'; - require_once __DIR__.'/../../generated/Exceptions/StringsException.php'; + require_once __DIR__ . '/../../generated/strings.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../generated/Exceptions/StringsException.php'; $this->assertSame('foo', sprintf('foo')); $this->assertSame('foobar', sprintf('foo%s', 'bar')); $this->assertSame('foobarbaz', sprintf('foo%s%s', 'bar', 'baz')); - set_error_handler(function() {}); + set_error_handler(function () { + }); try { $this->expectException(StringsException::class); sprintf('foo%s%s', 'bar'); @@ -34,10 +35,10 @@ public function testSprintf() public function testPregMatch() { - require_once __DIR__.'/../../generated/pcre.php'; - require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; - require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php'; - require_once __DIR__.'/../../lib/Exceptions/PcreException.php'; + require_once __DIR__ . '/../../generated/pcre.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../lib/Exceptions/PcreException.php'; $url = 'https://open.spotify.com/track/0nCqpKBrvDchO1BIvt7DTR?si=iLUKDfkLSy-IpnLA7qImnw'; @@ -49,10 +50,10 @@ public function testPregMatch() public function testObjects() { - require_once __DIR__.'/../../generated/simplexml.php'; - require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; - require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php'; - require_once __DIR__.'/../../generated/Exceptions/SimplexmlException.php'; + require_once __DIR__ . '/../../generated/simplexml.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../generated/Exceptions/SimplexmlException.php'; $xmlStr = << @@ -80,10 +81,10 @@ public function testObjects() */ public function testPregSplit() { - require_once __DIR__.'/../../generated/pcre.php'; - require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; - require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php'; - require_once __DIR__.'/../../lib/Exceptions/PcreException.php'; + require_once __DIR__ . '/../../generated/pcre.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../lib/Exceptions/PcreException.php'; $keywords = preg_split("/[\s,]+/", "hypertext language, programming", null); $this->assertSame(['hypertext', 'language', 'programming'], $keywords); @@ -95,10 +96,10 @@ public function testPregSplit() */ public function testStrtotime() { - require_once __DIR__.'/../../generated/datetime.php'; - require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; - require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php'; - require_once __DIR__.'/../../generated/Exceptions/DatetimeException.php'; + require_once __DIR__ . '/../../generated/datetime.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../generated/Exceptions/DatetimeException.php'; $this->assertSame(\strtotime('+1 day'), strtotime('+1 day')); } @@ -108,14 +109,34 @@ public function testStrtotime() */ public function testOpenSslSign() { - require_once __DIR__.'/../../generated/openssl.php'; - require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; - require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php'; - require_once __DIR__.'/../../generated/Exceptions/OpensslException.php'; + require_once __DIR__ . '/../../generated/openssl.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../generated/Exceptions/OpensslException.php'; - \openssl_sign('foo', $signature, file_get_contents(__DIR__.'/fixtures/id_rsa')); - openssl_sign('foo', $signatureSafe, file_get_contents(__DIR__.'/fixtures/id_rsa')); + \openssl_sign('foo', $signature, file_get_contents(__DIR__ . '/fixtures/id_rsa')); + openssl_sign('foo', $signatureSafe, file_get_contents(__DIR__ . '/fixtures/id_rsa')); $this->assertSame($signature, $signatureSafe); + + } + + public function testOpenSslEncrypt() + { + $result = \openssl_encrypt( + 'test', + 'aes-256-cbc', + pack('H*', 'a2e8ccd0e7985cc0b6213a55815a1034afc252980e970ca90e5202689f9473b0'), + \OPENSSL_RAW_DATA, + pack('H*', '123ce954203b7caaaa9da67f59839456')); + + $resultSafe = openssl_encrypt( + 'test', + 'aes-256-cbc', + pack('H*', 'a2e8ccd0e7985cc0b6213a55815a1034afc252980e970ca90e5202689f9473b0'), + \OPENSSL_RAW_DATA, + pack('H*', '123ce954203b7caaaa9da67f59839456')); + + $this->assertSame($result, $resultSafe); } -} +} \ No newline at end of file From 74f853cb5b926bee15a6283afbf22ff9f2d06f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Sat, 2 Feb 2019 15:38:27 +0100 Subject: [PATCH 2/4] Fixing openssl_encrypt --- generated/functionsList.php | 2 +- generated/openssl.php | 29 ------------------- generator/config/specialCasesFunctions.php | 1 + lib/special_cases.php | 33 ++++++++++++++++++++++ rector-migrate.yml | 2 +- 5 files changed, 36 insertions(+), 31 deletions(-) diff --git a/generated/functionsList.php b/generated/functionsList.php index bd23485b..bb70b677 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -602,7 +602,6 @@ 'openssl_decrypt', 'openssl_dh_compute_key', 'openssl_digest', - 'openssl_encrypt', 'openssl_open', 'openssl_pbkdf2', 'openssl_pkcs12_export_to_file', @@ -1074,4 +1073,5 @@ 'apc_fetch', 'apcu_fetch', 'preg_replace', + 'openssl_encrypt', ]; diff --git a/generated/openssl.php b/generated/openssl.php index 709cce1f..d0af987a 100644 --- a/generated/openssl.php +++ b/generated/openssl.php @@ -340,35 +340,6 @@ function openssl_digest(string $data, string $method, bool $raw_output = false): } -/** - * Encrypts given data with given method and key, returns a raw - * or base64 encoded string - * - * @param string $data The plaintext message data to be encrypted. - * @param string $method The cipher method. For a list of available cipher methods, use openssl_get_cipher_methods. - * @param string $key The key. - * @param int $options options is a bitwise disjunction of the flags - * OPENSSL_RAW_DATA and - * OPENSSL_ZERO_PADDING. - * @param string $iv A non-NULL Initialization Vector. - * @param string $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). - * @param string $aad Additional authentication data. - * @param int $tag_length The length of the authentication tag. Its value can be between 4 and 16 for GCM mode. - * @return string Returns the encrypted string on success . - * @throws OpensslException - * - */ -function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag = null, string $aad = "", int $tag_length = 16): string -{ - error_clear_last(); - $result = \openssl_encrypt($data, $method, $key, $options, $iv, $tag, $aad, $tag_length); - if ($result === false) { - throw OpensslException::createFromPhpError(); - } - return $result; -} - - /** * openssl_open opens (decrypts) * sealed_data using the private key associated with diff --git a/generator/config/specialCasesFunctions.php b/generator/config/specialCasesFunctions.php index 39d5ce13..c34ae0ef 100644 --- a/generator/config/specialCasesFunctions.php +++ b/generator/config/specialCasesFunctions.php @@ -8,4 +8,5 @@ 'apc_fetch', 'apcu_fetch', 'preg_replace', + 'openssl_encrypt', ]; diff --git a/lib/special_cases.php b/lib/special_cases.php index 54453695..d633f1f3 100644 --- a/lib/special_cases.php +++ b/lib/special_cases.php @@ -159,3 +159,36 @@ function preg_replace($pattern, $replacement, $subject, int $limit = -1, int &$c } return $result; } + +/** + * Encrypts given data with given method and key, returns a raw + * or base64 encoded string + * + * @param string $data The plaintext message data to be encrypted. + * @param string $method The cipher method. For a list of available cipher methods, use openssl_get_cipher_methods. + * @param string $key The key. + * @param int $options options is a bitwise disjunction of the flags + * OPENSSL_RAW_DATA and + * OPENSSL_ZERO_PADDING. + * @param string $iv A non-NULL Initialization Vector. + * @param string $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). + * @param string $aad Additional authentication data. + * @param int $tag_length The length of the authentication tag. Its value can be between 4 and 16 for GCM mode. + * @return string Returns the encrypted string. + * @throws OpensslException + * + */ +function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag = null, string $aad = "", int $tag_length = 16): string +{ + error_clear_last(); + // The $tag parameter is handled in a weird way by openssl_encrypt. It cannot be provided unless encoding is AEAD + if (func_num_args() <= 5) { + $result = \openssl_encrypt($data, $method, $key, $options, $iv); + } else { + $result = \openssl_encrypt($data, $method, $key, $options, $iv, $tag, $aad, $tag_length); + } + if ($result === false) { + throw OpensslException::createFromPhpError(); + } + return $result; +} diff --git a/rector-migrate.yml b/rector-migrate.yml index 24e6ed4c..0c66a388 100644 --- a/rector-migrate.yml +++ b/rector-migrate.yml @@ -603,7 +603,6 @@ services: openssl_decrypt: 'Safe\openssl_decrypt' openssl_dh_compute_key: 'Safe\openssl_dh_compute_key' openssl_digest: 'Safe\openssl_digest' - openssl_encrypt: 'Safe\openssl_encrypt' openssl_open: 'Safe\openssl_open' openssl_pbkdf2: 'Safe\openssl_pbkdf2' openssl_pkcs12_export_to_file: 'Safe\openssl_pkcs12_export_to_file' @@ -1075,3 +1074,4 @@ services: apc_fetch: 'Safe\apc_fetch' apcu_fetch: 'Safe\apcu_fetch' preg_replace: 'Safe\preg_replace' + openssl_encrypt: 'Safe\openssl_encrypt' From 2c69118bbe3bff69769db389d4299f6789c9ca1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Sat, 2 Feb 2019 15:46:56 +0100 Subject: [PATCH 3/4] Fixing PHPStan issues --- generator/composer.lock | 570 ++++++++++++++++++++++++++------------- generator/src/Method.php | 6 +- lib/special_cases.php | 3 +- 3 files changed, 392 insertions(+), 187 deletions(-) diff --git a/generator/composer.lock b/generator/composer.lock index 76562fe3..a780b445 100644 --- a/generator/composer.lock +++ b/generator/composer.lock @@ -1,23 +1,23 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "d01dc0158d9e2e1781ace6274eb92d29", "packages": [ { "name": "markbaker/complex", - "version": "1.4.6", + "version": "1.4.7", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "a78d82ae4e682c3809fc3023d1b0ce654f6ab12b" + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/a78d82ae4e682c3809fc3023d1b0ce654f6ab12b", - "reference": "a78d82ae4e682c3809fc3023d1b0ce654f6ab12b", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", "shasum": "" }, "require": { @@ -99,25 +99,96 @@ "complex", "mathematics" ], - "time": "2018-07-31T08:38:40+00:00" + "time": "2018-10-13T23:28:42+00:00" + }, + { + "name": "markbaker/matrix", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/6ea97472b5baf12119b4f31f802835b820dd6d64", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "time": "2018-11-04T22:12:12+00:00" }, { "name": "phpoffice/phpspreadsheet", - "version": "1.4.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "125f462a718956f37d81305ca0df4f17cef0f3b9" + "reference": "bf00f0cc5f55c354018f9a9ef15e6e3e1a229051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/125f462a718956f37d81305ca0df4f17cef0f3b9", - "reference": "125f462a718956f37d81305ca0df4f17cef0f3b9", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/bf00f0cc5f55c354018f9a9ef15e6e3e1a229051", + "reference": "bf00f0cc5f55c354018f9a9ef15e6e3e1a229051", "shasum": "" }, "require": { "ext-ctype": "*", "ext-dom": "*", + "ext-fileinfo": "*", "ext-gd": "*", "ext-iconv": "*", "ext-libxml": "*", @@ -128,15 +199,18 @@ "ext-xmlwriter": "*", "ext-zip": "*", "ext-zlib": "*", - "markbaker/complex": "^1.4.1", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.1", "php": "^5.6|^7.0", "psr/simple-cache": "^1.0" }, "require-dev": { + "doctrine/instantiator": "^1.0.0", "dompdf/dompdf": "^0.8.0", "friendsofphp/php-cs-fixer": "@stable", "jpgraph/jpgraph": "^4.0", "mpdf/mpdf": "^7.0.0", + "phpcompatibility/php-compatibility": "^8.0", "phpunit/phpunit": "^5.7", "squizlabs/php_codesniffer": "^3.3", "tecnickcom/tcpdf": "^6.2" @@ -145,7 +219,7 @@ "dompdf/dompdf": "Option for rendering PDF with PDF Writer", "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", "mpdf/mpdf": "Option for rendering PDF with PDF Writer", - "tecnick.com/tcpdf": "Option for rendering PDF with PDF Writer" + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" }, "type": "library", "autoload": { @@ -159,19 +233,22 @@ ], "authors": [ { - "name": "Maarten Balliauw", - "homepage": "http://blog.maartenballiauw.be" + "name": "Erik Tilt" }, { - "name": "Erik Tilt" + "name": "Adrien Crivelli" }, { - "name": "Franck Lefevre", - "homepage": "http://rootslabs.net" + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" }, { "name": "Mark Baker", - "homepage": "http://markbakeruk.net" + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" } ], "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", @@ -186,7 +263,7 @@ "xls", "xlsx" ], - "time": "2018-08-06T02:58:06+00:00" + "time": "2019-01-02T04:42:54+00:00" }, { "name": "psr/simple-cache", @@ -238,20 +315,21 @@ }, { "name": "symfony/console", - "version": "v4.1.4", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f" + "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ca80b8ced97cf07390078b29773dc384c39eee1f", - "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f", + "url": "https://api.github.com/repos/symfony/console/zipball/b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", + "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", "shasum": "" }, "require": { "php": "^7.1.3", + "symfony/contracts": "^1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -275,7 +353,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -302,20 +380,88 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:24:31+00:00" + "time": "2019-01-04T15:13:53+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" }, { "name": "symfony/finder", - "version": "v4.1.4", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068" + "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/e162f1df3102d0b7472805a5a9d5db9fcf0a8068", - "reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068", + "url": "https://api.github.com/repos/symfony/finder/zipball/9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", + "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", "shasum": "" }, "require": { @@ -324,7 +470,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -351,20 +497,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:24:31+00:00" + "time": "2019-01-03T09:07:35+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", "shasum": "" }, "require": { @@ -410,20 +556,20 @@ "portable", "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2018-09-21T13:07:52+00:00" }, { "name": "symfony/process", - "version": "v4.1.4", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843" + "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/86cdb930a6a855b0ab35fb60c1504cb36184f843", - "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843", + "url": "https://api.github.com/repos/symfony/process/zipball/ea043ab5d8ed13b467a9087d81cb876aee7f689a", + "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a", "shasum": "" }, "require": { @@ -432,7 +578,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -459,22 +605,22 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-08-03T11:13:38+00:00" + "time": "2019-01-03T14:48:52+00:00" } ], "packages-dev": [ { "name": "composer/xdebug-handler", - "version": "1.3.0", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c" + "reference": "d17708133b6c276d6e42ef887a877866b909d892" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b8e9745fb9b06ea6664d8872c4505fb16df4611c", - "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892", + "reference": "d17708133b6c276d6e42ef887a877866b909d892", "shasum": "" }, "require": { @@ -505,7 +651,7 @@ "Xdebug", "performance" ], - "time": "2018-08-31T19:07:57+00:00" + "time": "2019-01-28T20:25:53+00:00" }, { "name": "doctrine/instantiator", @@ -679,32 +825,33 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -734,13 +881,14 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2018-12-04T20:46:45+00:00" }, { "name": "jean85/pretty-package-versions", @@ -919,23 +1067,23 @@ }, { "name": "nette/di", - "version": "v2.4.13", + "version": "v2.4.15", "source": { "type": "git", "url": "https://github.com/nette/di.git", - "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca" + "reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/di/zipball/3f8f212b02d5c17feb97a7e0a39ab306f40c06ca", - "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca", + "url": "https://api.github.com/repos/nette/di/zipball/d0561b8f77e8ef2ed6d83328860e16c81a5a8649", + "reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649", "shasum": "" }, "require": { "ext-tokenizer": "*", "nette/neon": "^2.3.3 || ~3.0.0", - "nette/php-generator": "^2.6.1 || ~3.0.0", - "nette/utils": "^2.4.3 || ~3.0.0", + "nette/php-generator": "^2.6.1 || ^3.0.0", + "nette/utils": "^2.5.0 || ~3.0.0", "php": ">=5.6.0" }, "conflict": { @@ -984,7 +1132,7 @@ "nette", "static" ], - "time": "2018-06-11T08:46:01+00:00" + "time": "2019-01-30T13:26:05+00:00" }, { "name": "nette/finder", @@ -1111,21 +1259,21 @@ }, { "name": "nette/php-generator", - "version": "v3.0.5", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "ea90209c2e8a7cd087b2742ca553c047a8df5eff" + "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/ea90209c2e8a7cd087b2742ca553c047a8df5eff", - "reference": "ea90209c2e8a7cd087b2742ca553c047a8df5eff", + "url": "https://api.github.com/repos/nette/php-generator/zipball/9de4e093a130f7a1bd175198799ebc0efbac6924", + "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924", "shasum": "" }, "require": { "nette/utils": "^2.4.2 || ~3.0.0", - "php": ">=7.0" + "php": ">=7.1" }, "conflict": { "nette/nette": "<2.2" @@ -1137,7 +1285,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1161,7 +1309,7 @@ "homepage": "https://nette.org/contributors" } ], - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.2 features.", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.3 features.", "homepage": "https://nette.org", "keywords": [ "code", @@ -1169,7 +1317,7 @@ "php", "scaffolding" ], - "time": "2018-08-09T14:32:27+00:00" + "time": "2018-11-27T19:00:14+00:00" }, { "name": "nette/robot-loader", @@ -1238,16 +1386,16 @@ }, { "name": "nette/utils", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5" + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/183069866dc477fcfbac393ed486aaa6d93d19a5", - "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5", + "url": "https://api.github.com/repos/nette/utils/zipball/17b9f76f2abd0c943adfb556e56f2165460b15ce", + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce", "shasum": "" }, "require": { @@ -1316,20 +1464,20 @@ "utility", "validation" ], - "time": "2018-05-02T17:16:08+00:00" + "time": "2018-09-18T10:22:16+00:00" }, { "name": "nikic/php-parser", - "version": "v4.0.3", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d" + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd088dc940a418f09cda079a9b5c7c478890fb8d", - "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a", + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a", "shasum": "" }, "require": { @@ -1345,7 +1493,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1367,7 +1515,7 @@ "parser", "php" ], - "time": "2018-07-15T17:25:16+00:00" + "time": "2019-01-12T16:31:37+00:00" }, { "name": "ocramius/package-versions", @@ -1820,16 +1968,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "0.3", + "version": "0.3.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "ed3223362174b8067729930439e139794e9e514a" + "reference": "2cc49f47c69b023eaf05b48e6529389893b13d74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ed3223362174b8067729930439e139794e9e514a", - "reference": "ed3223362174b8067729930439e139794e9e514a", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/2cc49f47c69b023eaf05b48e6529389893b13d74", + "reference": "2cc49f47c69b023eaf05b48e6529389893b13d74", "shasum": "" }, "require": { @@ -1839,7 +1987,7 @@ "consistence/coding-standard": "^2.0.0", "jakub-onderka/php-parallel-lint": "^0.9.2", "phing/phing": "^2.16.0", - "phpstan/phpstan": "^0.10@dev", + "phpstan/phpstan": "^0.10", "phpunit/phpunit": "^6.3", "slevomat/coding-standard": "^3.3.0", "symfony/process": "^3.4 || ^4.0" @@ -1862,24 +2010,24 @@ "MIT" ], "description": "PHPDoc parser with support for nullable, intersection and generic types", - "time": "2018-06-20T17:48:01+00:00" + "time": "2019-01-14T12:26:23+00:00" }, { "name": "phpstan/phpstan", - "version": "0.10.3", + "version": "0.10.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "dc62f78c9aa6e9f7c44e8d6518f1123cd1e1b1c0" + "reference": "4f828460a0276180da76c670a0a6e592e7c38b71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc62f78c9aa6e9f7c44e8d6518f1123cd1e1b1c0", - "reference": "dc62f78c9aa6e9f7c44e8d6518f1123cd1e1b1c0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4f828460a0276180da76c670a0a6e592e7c38b71", + "reference": "4f828460a0276180da76c670a0a6e592e7c38b71", "shasum": "" }, "require": { - "composer/xdebug-handler": "^1.0", + "composer/xdebug-handler": "^1.3.0", "jean85/pretty-package-versions": "^1.0.3", "nette/bootstrap": "^2.4 || ^3.0", "nette/di": "^2.4.7 || ^3.0", @@ -1891,23 +2039,27 @@ "symfony/console": "~3.2 || ~4.0", "symfony/finder": "~3.2 || ~4.0" }, + "conflict": { + "symfony/console": "3.4.16 || 4.1.5" + }, "require-dev": { "brianium/paratest": "^2.0", - "consistence/coding-standard": "^3.3", + "consistence/coding-standard": "^3.5", "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", "ext-gd": "*", "ext-intl": "*", "ext-mysqli": "*", "ext-zip": "*", "jakub-onderka/php-parallel-lint": "^1.0", - "localheinz/composer-normalize": "~0.8.0", + "localheinz/composer-normalize": "~0.9.0", "phing/phing": "^2.16.0", "phpstan/phpstan-deprecation-rules": "^0.10.2", "phpstan/phpstan-php-parser": "^0.10", "phpstan/phpstan-phpunit": "^0.10", "phpstan/phpstan-strict-rules": "^0.10", "phpunit/phpunit": "^7.0", - "slevomat/coding-standard": "^4.6.2" + "slevomat/coding-standard": "^4.7.2", + "squizlabs/php_codesniffer": "^3.3.2" }, "bin": [ "bin/phpstan" @@ -1931,20 +2083,20 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2018-08-12T15:14:21+00:00" + "time": "2019-01-08T09:51:19+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "6.0.7", + "version": "6.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", "shasum": "" }, "require": { @@ -1955,7 +2107,7 @@ "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, @@ -1968,7 +2120,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -1994,25 +2146,28 @@ "testing", "xunit" ], - "time": "2018-06-01T07:51:50+00:00" + "time": "2018-10-31T16:06:48+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c" + "reference": "050bedf145a257b1ff02746c31894800e5122946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", "shasum": "" }, "require": { "php": "^7.1" }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, "type": "library", "extra": { "branch-alias": { @@ -2041,7 +2196,7 @@ "filesystem", "iterator" ], - "time": "2018-06-11T11:44:00+00:00" + "time": "2018-09-13T20:33:42+00:00" }, { "name": "phpunit/php-text-template", @@ -2135,16 +2290,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", "shasum": "" }, "require": { @@ -2180,20 +2335,20 @@ "keywords": [ "tokenizer" ], - "time": "2018-02-01T13:16:43+00:00" + "time": "2018-10-30T05:52:18+00:00" }, { "name": "phpunit/phpunit", - "version": "7.3.5", + "version": "7.5.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7b331efabbb628c518c408fdfcaf571156775de2" + "reference": "2cb759721e53bc05f56487f628c6b9fbb6c18746" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b331efabbb628c518c408fdfcaf571156775de2", - "reference": "7b331efabbb628c518c408fdfcaf571156775de2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2cb759721e53bc05f56487f628c6b9fbb6c18746", + "reference": "2cb759721e53bc05f56487f628c6b9fbb6c18746", "shasum": "" }, "require": { @@ -2214,11 +2369,11 @@ "phpunit/php-timer": "^2.0", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", + "sebastian/environment": "^4.0", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, "conflict": { @@ -2238,7 +2393,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -2264,7 +2419,7 @@ "testing", "xunit" ], - "time": "2018-09-08T15:14:29+00:00" + "time": "2019-02-01T05:24:07+00:00" }, { "name": "psr/http-message", @@ -2318,16 +2473,16 @@ }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -2361,7 +2516,47 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2530,28 +2725,31 @@ }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2576,7 +2774,7 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "time": "2019-02-01T05:27:49+00:00" }, { "name": "sebastian/exporter", @@ -2843,25 +3041,25 @@ }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2881,7 +3079,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2018-10-04T04:07:39+00:00" }, { "name": "sebastian/version", @@ -2928,16 +3126,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "628a481780561150481a9ec74709092b9759b3ec" + "reference": "379deb987e26c7cd103a7b387aea178baec96e48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/628a481780561150481a9ec74709092b9759b3ec", - "reference": "628a481780561150481a9ec74709092b9759b3ec", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48", + "reference": "379deb987e26c7cd103a7b387aea178baec96e48", "shasum": "" }, "require": { @@ -2975,20 +3173,20 @@ "phpcs", "standards" ], - "time": "2018-07-26T23:47:18+00:00" + "time": "2018-12-19T23:57:18+00:00" }, { "name": "symfony/config", - "version": "v4.1.4", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "76015a3cc372b14d00040ff58e18e29f69eba717" + "reference": "a7a7d0a0244cfc82f040729ccf769e6cf55a78fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/76015a3cc372b14d00040ff58e18e29f69eba717", - "reference": "76015a3cc372b14d00040ff58e18e29f69eba717", + "url": "https://api.github.com/repos/symfony/config/zipball/a7a7d0a0244cfc82f040729ccf769e6cf55a78fb", + "reference": "a7a7d0a0244cfc82f040729ccf769e6cf55a78fb", "shasum": "" }, "require": { @@ -3011,7 +3209,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3038,20 +3236,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-08-08T06:37:38+00:00" + "time": "2019-01-03T09:07:35+00:00" }, { "name": "symfony/filesystem", - "version": "v4.1.4", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e" + "reference": "c2ffd9a93f2d6c5be2f68a0aa7953cc229f871f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e", - "reference": "c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c2ffd9a93f2d6c5be2f68a0aa7953cc229f871f8", + "reference": "c2ffd9a93f2d6c5be2f68a0aa7953cc229f871f8", "shasum": "" }, "require": { @@ -3061,7 +3259,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3088,11 +3286,11 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-08-18T16:52:46+00:00" + "time": "2019-01-03T09:07:35+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -3135,7 +3333,7 @@ }, { "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "email": "backendtea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", @@ -3150,25 +3348,26 @@ }, { "name": "symfony/stopwatch", - "version": "v4.1.4", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "966c982df3cca41324253dc0c7ffe76b6076b705" + "reference": "af62b35760fc92c8dbdce659b4eebdfe0e6a0472" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/966c982df3cca41324253dc0c7ffe76b6076b705", - "reference": "966c982df3cca41324253dc0c7ffe76b6076b705", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/af62b35760fc92c8dbdce659b4eebdfe0e6a0472", + "reference": "af62b35760fc92c8dbdce659b4eebdfe0e6a0472", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/contracts": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3195,20 +3394,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:00:49+00:00" + "time": "2019-01-03T09:07:35+00:00" }, { "name": "symfony/yaml", - "version": "v4.1.4", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "b832cc289608b6d305f62149df91529a2ab3c314" + "reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b832cc289608b6d305f62149df91529a2ab3c314", - "reference": "b832cc289608b6d305f62149df91529a2ab3c314", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d0aa6c0ea484087927b49fd513383a7d36190ca6", + "reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6", "shasum": "" }, "require": { @@ -3227,7 +3426,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3254,25 +3453,25 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-08-18T16:52:46+00:00" + "time": "2019-01-03T09:07:35+00:00" }, { "name": "thecodingmachine/phpstan-strict-rules", - "version": "v0.10.3", + "version": "v0.10.8", "source": { "type": "git", "url": "https://github.com/thecodingmachine/phpstan-strict-rules.git", - "reference": "4171d4426cd6289ae9231061aa0e39a09c6e3133" + "reference": "663fad8801b24c666f3c695ca6cbbc1cb28776a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/4171d4426cd6289ae9231061aa0e39a09c6e3133", - "reference": "4171d4426cd6289ae9231061aa0e39a09c6e3133", + "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/663fad8801b24c666f3c695ca6cbbc1cb28776a9", + "reference": "663fad8801b24c666f3c695ca6cbbc1cb28776a9", "shasum": "" }, "require": { "php": "^7.1", - "phpstan/phpstan": "^0.10" + "phpstan/phpstan": "^0.10|^0.11" }, "require-dev": { "php-coveralls/php-coveralls": "^2.1", @@ -3300,7 +3499,7 @@ } ], "description": "A set of additional rules for PHPStan based on best practices followed at TheCodingMachine", - "time": "2018-07-06T12:40:23+00:00" + "time": "2019-01-18T08:10:20+00:00" }, { "name": "theseer/tokenizer", @@ -3344,20 +3543,21 @@ }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -3390,7 +3590,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], diff --git a/generator/src/Method.php b/generator/src/Method.php index c69ebfe7..3e6876a5 100644 --- a/generator/src/Method.php +++ b/generator/src/Method.php @@ -149,7 +149,11 @@ private function stripReturnFalseText(string $string): string private function removeString(string $string, string $search): string { $search = str_replace(' ', '\s+', $search); - return preg_replace('/'.$search.'/m', '', $string); + $result = preg_replace('/'.$search.'/m', '', $string); + if ($result === null) { + throw new \RuntimeException('An error occured while calling preg_replace'); + } + return $result; } private function getStringForXPath(string $xpath): string diff --git a/lib/special_cases.php b/lib/special_cases.php index d633f1f3..fdbe64a6 100644 --- a/lib/special_cases.php +++ b/lib/special_cases.php @@ -11,6 +11,7 @@ use Safe\Exceptions\ApcException; use Safe\Exceptions\ApcuException; use Safe\Exceptions\JsonException; +use Safe\Exceptions\OpensslException; use Safe\Exceptions\PcreException; /** @@ -171,7 +172,7 @@ function preg_replace($pattern, $replacement, $subject, int $limit = -1, int &$c * OPENSSL_RAW_DATA and * OPENSSL_ZERO_PADDING. * @param string $iv A non-NULL Initialization Vector. - * @param string $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). + * @param string|null $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). * @param string $aad Additional authentication data. * @param int $tag_length The length of the authentication tag. Its value can be between 4 and 16 for GCM mode. * @return string Returns the encrypted string. From a0e1e301ea142d8414ce807ab92e56987b2d9945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Sat, 2 Feb 2019 15:56:35 +0100 Subject: [PATCH 4/4] Fixing openssl_encrypt --- generated/libxml.php | 2 +- generated/shmop.php | 6 +++--- lib/special_cases.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generated/libxml.php b/generated/libxml.php index 1191dbeb..6d85cc32 100644 --- a/generated/libxml.php +++ b/generated/libxml.php @@ -7,7 +7,7 @@ /** * Retrieve last error from libxml. * - * @return object Returns a LibXMLError object if there is any error in the + * @return libXMLError Returns a LibXMLError object if there is any error in the * buffer, FALSE otherwise. * @throws LibxmlException * diff --git a/generated/shmop.php b/generated/shmop.php index 70edec16..14291a61 100644 --- a/generated/shmop.php +++ b/generated/shmop.php @@ -7,7 +7,7 @@ /** * shmop_delete is used to delete a shared memory block. * - * @param int $shmid The shared memory block resource created by + * @param resource $shmid The shared memory block resource created by * shmop_open * @throws ShmopException * @@ -25,7 +25,7 @@ function shmop_delete($shmid): void /** * shmop_read will read a string from shared memory block. * - * @param int $shmid The shared memory block identifier created by + * @param resource $shmid The shared memory block identifier created by * shmop_open * @param int $start Offset from which to start reading * @param int $count The number of bytes to read. @@ -48,7 +48,7 @@ function shmop_read($shmid, int $start, int $count): string /** * shmop_write will write a string into shared memory block. * - * @param int $shmid The shared memory block identifier created by + * @param resource $shmid The shared memory block identifier created by * shmop_open * @param string $data A string to write into shared memory block * @param int $offset Specifies where to start writing data inside the shared memory diff --git a/lib/special_cases.php b/lib/special_cases.php index fdbe64a6..97ae469f 100644 --- a/lib/special_cases.php +++ b/lib/special_cases.php @@ -172,14 +172,14 @@ function preg_replace($pattern, $replacement, $subject, int $limit = -1, int &$c * OPENSSL_RAW_DATA and * OPENSSL_ZERO_PADDING. * @param string $iv A non-NULL Initialization Vector. - * @param string|null $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). + * @param string $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). * @param string $aad Additional authentication data. * @param int $tag_length The length of the authentication tag. Its value can be between 4 and 16 for GCM mode. * @return string Returns the encrypted string. * @throws OpensslException * */ -function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag = null, string $aad = "", int $tag_length = 16): string +function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag, string $aad = "", int $tag_length = 16): string { error_clear_last(); // The $tag parameter is handled in a weird way by openssl_encrypt. It cannot be provided unless encoding is AEAD