From 556e0cebf435ab3a737c9434747b1db810609a36 Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 10:57:18 +0100 Subject: [PATCH 01/46] Added basic .gitignore with sensible defaults --- .gitignore | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac608c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,118 @@ +# Custom added rules +/bin/ + +# Created by https://www.toptal.com/developers/gitignore/api/composer,phpunit,phpstorm+all +# Edit at https://www.toptal.com/developers/gitignore?templates=composer,phpunit,phpstorm+all + +### Composer ### +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + +### PhpStorm+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### PhpStorm+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### PHPUnit ### +# Covers PHPUnit +# Reference: https://phpunit.de/ + +# Generated files +.phpunit.result.cache +.phpunit.cache + +# PHPUnit +/app/phpunit.xml +/phpunit.xml + +# Build data +/build/ + +# End of https://www.toptal.com/developers/gitignore/api/composer,phpunit,phpstorm+all \ No newline at end of file From 2cc6ac1e7559937133fd3b544e547de218d5364f Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 11:12:57 +0100 Subject: [PATCH 02/46] Updated: README.md --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f94905d..a948def 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,25 @@ -

PHP SDK

- +
+ Pay NL SDK +

PHP SDK

+
Use this SDK to implement Pay. into your PHP integration. -
#### Requirements -> PHP 7.4 or PHP 8+ +> PHP 8.3+ JSON extension installed CURL extension installed - -
+ +#### Installation If requirements are met, go ahead with the [installation and set-up](https://github.com/paynl/php-sdk/wiki/Install) of the SDK! -
+#### Usage To get you started, you should check these [Samples](https://github.com/paynl/SDK-PHP/blob/main/samples). -
+ +#### Documentation For more detailed information, have a look at the [Wiki](https://github.com/paynl/php-sdk/wiki/) page. From 864c5defa0fa428e4b7f9b1058464959eb837bfc Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 11:20:38 +0100 Subject: [PATCH 03/46] Updated: Composer packages / use composer default bin dir / https only --- composer.json | 26 +- composer.lock | 4311 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4323 insertions(+), 14 deletions(-) create mode 100644 composer.lock diff --git a/composer.json b/composer.json index 216fe0d..851929c 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,11 @@ "version": "0.1.0", "type": "library", "require": { - "php": "^7.4|^8.0", + "php": "^8.3", "ext-curl": "*", "ext-json": "*", - "psr/container": "^1.0", - "psr/http-message": "~1.0" + "psr/container": "^2", + "psr/http-message": "^2" }, "license": "MIT", "support": { @@ -22,13 +22,13 @@ ], "require-dev": { "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.3", - "phpmd/phpmd": "^2.7", - "phpstan/phpstan": "1.10.4", - "phpunit/phpunit": "^10", + "guzzlehttp/guzzle": "^7", + "phpmd/phpmd": "^2", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^11", "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.4", - "symfony/var-dumper": "^4.3" + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^7" }, "autoload": { "psr-4": { @@ -50,8 +50,6 @@ "repositories": [ ], "config": { - "bin-dir": "bin", - "secure-http": false, "optimize-autoloader": true, "sort-packages": true, "discard-changes": true @@ -65,9 +63,9 @@ "@phpmd", "@phpcs" ], - "phpstan": "bin/phpstan analyse", - "phpmd": "bin/phpmd src,samples text phpmd.xml", - "phpcs": "bin/phpcs" + "phpstan": "vendor/bin/phpstan analyse", + "phpmd": "vendor/bin/phpmd src,samples text phpmd.xml", + "phpcs": "vendor/bin/phpcs" }, "archive": { "exclude": [ diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..a213884 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4311 @@ +{ + "_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#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "59524dd712be7d3d4e3113dd446f6a9e", + "packages": [ + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://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" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2024-07-24T11:22:20+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2024-10-17T10:06:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2024-07-18T11:15:46+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.12.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-11-08T17:47:46+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.3.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + }, + "time": "2024-10-08T18:51:32+00:00" + }, + { + "name": "pdepend/pdepend", + "version": "2.16.2", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/f942b208dc2a0868454d01b29f0c75bbcfc6ed58", + "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58", + "shasum": "" + }, + "require": { + "php": ">=5.3.7", + "symfony/config": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/polyfill-mbstring": "^1.19" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0|^1.2.3", + "gregwar/rst": "^1.0", + "squizlabs/php_codesniffer": "^2.0.0" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PDepend\\": "src/main/php/PDepend" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Official version of pdepend to be handled with Composer", + "keywords": [ + "PHP Depend", + "PHP_Depend", + "dev", + "pdepend" + ], + "support": { + "issues": "https://github.com/pdepend/pdepend/issues", + "source": "https://github.com/pdepend/pdepend/tree/2.16.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend", + "type": "tidelift" + } + ], + "time": "2023-12-17T18:09:59+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpmd/phpmd", + "version": "2.15.0", + "source": { + "type": "git", + "url": "https://github.com/phpmd/phpmd.git", + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/74a1f56e33afad4128b886e334093e98e1b5e7c0", + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0", + "shasum": "" + }, + "require": { + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", + "ext-xml": "*", + "pdepend/pdepend": "^2.16.1", + "php": ">=5.3.9" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0 || ^1.3.2", + "ext-json": "*", + "ext-simplexml": "*", + "gregwar/rst": "^1.0", + "mikey179/vfsstream": "^1.6.8", + "squizlabs/php_codesniffer": "^2.9.2 || ^3.7.2" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Manuel Pichler", + "email": "github@manuel-pichler.de", + "homepage": "https://github.com/manuelpichler", + "role": "Project Founder" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" + }, + { + "name": "Other contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", + "role": "Contributors" + } + ], + "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", + "homepage": "https://phpmd.org/", + "keywords": [ + "dev", + "mess detection", + "mess detector", + "pdepend", + "phpmd", + "pmd" + ], + "support": { + "irc": "irc://irc.freenode.org/phpmd", + "issues": "https://github.com/phpmd/phpmd/issues", + "source": "https://github.com/phpmd/phpmd/tree/2.15.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", + "type": "tidelift" + } + ], + "time": "2023-12-11T08:22:20+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2024-11-28T22:19:37+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "11.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.3.1", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^11.4.1" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T06:21:38+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-27T05:02:59+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:07:44+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:08:43+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:09:35+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "11.5.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0569902506a6c0878930b87ea79ec3b50ea563f7", + "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.12.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.7", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.1", + "sebastian/comparator": "^6.2.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.0" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-12-06T05:57:38+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "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.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "roave/security-advisories", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Roave/SecurityAdvisories.git", + "reference": "dcb2bdb48e1d9b0b5b1c333b61f49772aee879ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/dcb2bdb48e1d9b0b5b1c333b61f49772aee879ff", + "reference": "dcb2bdb48e1d9b0b5b1c333b61f49772aee879ff", + "shasum": "" + }, + "conflict": { + "3f/pygmentize": "<1.2", + "admidio/admidio": "<4.3.12", + "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", + "aheinze/cockpit": "<2.2", + "aimeos/ai-admin-graphql": ">=2022.04.1,<2022.10.10|>=2023.04.1,<2023.10.6|>=2024.04.1,<2024.07.2", + "aimeos/ai-admin-jsonadm": "<2020.10.13|>=2021.04.1,<2021.10.6|>=2022.04.1,<2022.10.3|>=2023.04.1,<2023.10.4|==2024.04.1", + "aimeos/ai-client-html": ">=2020.04.1,<2020.10.27|>=2021.04.1,<2021.10.22|>=2022.04.1,<2022.10.13|>=2023.04.1,<2023.10.15|>=2024.04.1,<2024.04.7", + "aimeos/ai-controller-frontend": "<2020.10.15|>=2021.04.1,<2021.10.8|>=2022.04.1,<2022.10.8|>=2023.04.1,<2023.10.9|==2024.04.1", + "aimeos/aimeos-core": ">=2022.04.1,<2022.10.17|>=2023.04.1,<2023.10.17|>=2024.04.1,<2024.04.7", + "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5", + "airesvsg/acf-to-rest-api": "<=3.1", + "akaunting/akaunting": "<2.1.13", + "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", + "alextselegidis/easyappointments": "<1.5", + "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", + "amazing/media2click": ">=1,<1.3.3", + "ameos/ameos_tarteaucitron": "<1.2.23", + "amphp/artax": "<1.0.6|>=2,<2.0.6", + "amphp/http": "<=1.7.2|>=2,<=2.1", + "amphp/http-client": ">=4,<4.4", + "anchorcms/anchor-cms": "<=0.12.7", + "andreapollastri/cipi": "<=3.1.15", + "andrewhaine/silverstripe-form-capture": ">=0.2,<=0.2.3|>=1,<1.0.2|>=2,<2.2.5", + "apache-solr-for-typo3/solr": "<2.8.3", + "apereo/phpcas": "<1.6", + "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3", + "appwrite/server-ce": "<=1.2.1", + "arc/web": "<3", + "area17/twill": "<1.2.5|>=2,<2.5.3", + "artesaos/seotools": "<0.17.2", + "asymmetricrypt/asymmetricrypt": "<9.9.99", + "athlon1600/php-proxy": "<=5.1", + "athlon1600/php-proxy-app": "<=3", + "austintoddj/canvas": "<=3.4.2", + "auth0/wordpress": "<=4.6", + "automad/automad": "<2.0.0.0-alpha5", + "automattic/jetpack": "<9.8", + "awesome-support/awesome-support": "<=6.0.7", + "aws/aws-sdk-php": "<3.288.1", + "azuracast/azuracast": "<0.18.3", + "backdrop/backdrop": "<1.27.3|>=1.28,<1.28.2", + "backpack/crud": "<3.4.9", + "backpack/filemanager": "<2.0.2|>=3,<3.0.9", + "bacula-web/bacula-web": "<8.0.0.0-RC2-dev", + "badaso/core": "<2.7", + "bagisto/bagisto": "<2.1", + "barrelstrength/sprout-base-email": "<1.2.7", + "barrelstrength/sprout-forms": "<3.9", + "barryvdh/laravel-translation-manager": "<0.6.2", + "barzahlen/barzahlen-php": "<2.0.1", + "baserproject/basercms": "<=5.1.1", + "bassjobsen/bootstrap-3-typeahead": ">4.0.2", + "bbpress/bbpress": "<2.6.5", + "bcosca/fatfree": "<3.7.2", + "bedita/bedita": "<4", + "bigfork/silverstripe-form-capture": ">=3,<3.1.1", + "billz/raspap-webgui": "<=3.1.4", + "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", + "blueimp/jquery-file-upload": "==6.4.4", + "bmarshall511/wordpress_zero_spam": "<5.2.13", + "bolt/bolt": "<3.7.2", + "bolt/core": "<=4.2", + "born05/craft-twofactorauthentication": "<3.3.4", + "bottelet/flarepoint": "<2.2.1", + "bref/bref": "<2.1.17", + "brightlocal/phpwhois": "<=4.2.5", + "brotkrueml/codehighlight": "<2.7", + "brotkrueml/schema": "<1.13.1|>=2,<2.5.1", + "brotkrueml/typo3-matomo-integration": "<1.3.2", + "buddypress/buddypress": "<7.2.1", + "bugsnag/bugsnag-laravel": ">=2,<2.0.2", + "bytefury/crater": "<6.0.2", + "cachethq/cachet": "<2.5.1", + "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.1,<4.1.4|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", + "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", + "cardgate/magento2": "<2.0.33", + "cardgate/woocommerce": "<=3.1.15", + "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cart2quote/module-quotation-encoded": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cartalyst/sentry": "<=2.1.6", + "catfan/medoo": "<1.7.5", + "causal/oidc": "<2.1", + "cecil/cecil": "<7.47.1", + "centreon/centreon": "<22.10.15", + "cesnet/simplesamlphp-module-proxystatistics": "<3.1", + "chriskacerguis/codeigniter-restserver": "<=2.7.1", + "civicrm/civicrm-core": ">=4.2,<4.2.9|>=4.3,<4.3.3", + "ckeditor/ckeditor": "<4.24", + "cockpit-hq/cockpit": "<2.7|==2.7", + "codeception/codeception": "<3.1.3|>=4,<4.1.22", + "codeigniter/framework": "<3.1.9", + "codeigniter4/framework": "<4.4.7", + "codeigniter4/shield": "<1.0.0.0-beta8", + "codiad/codiad": "<=2.8.4", + "composer/composer": "<1.10.27|>=2,<2.2.24|>=2.3,<2.7.7", + "concrete5/concrete5": "<9.3.4", + "concrete5/core": "<8.5.8|>=9,<9.1", + "contao-components/mediaelement": ">=2.14.2,<2.21.1", + "contao/comments-bundle": ">=2,<4.13.40|>=5.0.0.0-RC1-dev,<5.3.4", + "contao/contao": "<=5.4.1", + "contao/core": "<3.5.39", + "contao/core-bundle": "<4.13.49|>=5,<5.3.15|>=5.4,<5.4.3", + "contao/listing-bundle": ">=3,<=3.5.30|>=4,<4.4.8", + "contao/managed-edition": "<=1.5", + "corveda/phpsandbox": "<1.3.5", + "cosenary/instagram": "<=2.3", + "craftcms/cms": "<=4.12.6.1|>=5,<=5.4.7.1", + "croogo/croogo": "<4", + "cuyz/valinor": "<0.12", + "czim/file-handling": "<1.5|>=2,<2.3", + "czproject/git-php": "<4.0.3", + "damienharper/auditor-bundle": "<5.2.6", + "dapphp/securimage": "<3.6.6", + "darylldoyle/safe-svg": "<1.9.10", + "datadog/dd-trace": ">=0.30,<0.30.2", + "datatables/datatables": "<1.10.10", + "david-garcia/phpwhois": "<=4.3.1", + "dbrisinajumi/d2files": "<1", + "dcat/laravel-admin": "<=2.1.3", + "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3", + "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1|>=7,<7.4", + "desperado/xml-bundle": "<=0.1.7", + "dev-lancer/minecraft-motd-parser": "<=1.0.5", + "devgroup/dotplant": "<2020.09.14-dev", + "directmailteam/direct-mail": "<6.0.3|>=7,<7.0.3|>=8,<9.5.2", + "doctrine/annotations": "<1.2.7", + "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", + "doctrine/common": "<2.4.3|>=2.5,<2.5.1", + "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4", + "doctrine/doctrine-bundle": "<1.5.2", + "doctrine/doctrine-module": "<0.7.2", + "doctrine/mongodb-odm": "<1.0.2", + "doctrine/mongodb-odm-bundle": "<3.0.1", + "doctrine/orm": ">=1,<1.2.4|>=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", + "dolibarr/dolibarr": "<19.0.2", + "dompdf/dompdf": "<2.0.4", + "doublethreedigital/guest-entries": "<3.1.2", + "drupal/core": ">=6,<6.38|>=7,<7.96|>=8,<10.2.10|>=10.3,<10.3.6|>=11,<11.0.5", + "drupal/core-recommended": ">=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", + "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.80|>=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", + "duncanmcclean/guest-entries": "<3.1.2", + "dweeves/magmi": "<=0.7.24", + "ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2", + "ecodev/newsletter": "<=4", + "ectouch/ectouch": "<=2.7.2", + "egroupware/egroupware": "<23.1.20240624", + "elefant/cms": "<2.0.7", + "elgg/elgg": "<3.3.24|>=4,<4.0.5", + "elijaa/phpmemcacheadmin": "<=1.3", + "encore/laravel-admin": "<=1.8.19", + "endroid/qr-code-bundle": "<3.4.2", + "enhavo/enhavo-app": "<=0.13.1", + "enshrined/svg-sanitize": "<0.15", + "erusev/parsedown": "<1.7.2", + "ether/logs": "<3.0.4", + "evolutioncms/evolution": "<=3.2.3", + "exceedone/exment": "<4.4.3|>=5,<5.0.3", + "exceedone/laravel-admin": "<2.2.3|==3", + "ezsystems/demobundle": ">=5.4,<5.4.6.1-dev", + "ezsystems/ez-support-tools": ">=2.2,<2.2.3", + "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1-dev", + "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1-dev|>=5.4,<5.4.11.1-dev|>=2017.12,<2017.12.0.1-dev", + "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26|>=3.3,<3.3.39", + "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", + "ezsystems/ezplatform-graphql": ">=1.0.0.0-RC1-dev,<1.0.13|>=2.0.0.0-beta1,<2.3.12", + "ezsystems/ezplatform-http-cache": "<2.3.16", + "ezsystems/ezplatform-kernel": "<1.2.5.1-dev|>=1.3,<1.3.35", + "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", + "ezsystems/ezplatform-richtext": ">=2.3,<2.3.7.1-dev|>=3.3,<3.3.40", + "ezsystems/ezplatform-solr-search-engine": ">=1.7,<1.7.12|>=2,<2.0.2|>=3.3,<3.3.15", + "ezsystems/ezplatform-user": ">=1,<1.0.1", + "ezsystems/ezpublish-kernel": "<6.13.8.2-dev|>=7,<7.5.31", + "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.03.5.1", + "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", + "ezsystems/repository-forms": ">=2.3,<2.3.2.1-dev|>=2.5,<2.5.15", + "ezyang/htmlpurifier": "<=4.2", + "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", + "facturascripts/facturascripts": "<=2022.08", + "fastly/magento2": "<1.2.26", + "feehi/cms": "<=2.1.1", + "feehi/feehicms": "<=2.1.1", + "fenom/fenom": "<=2.12.1", + "filament/actions": ">=3.2,<3.2.123", + "filament/infolists": ">=3,<3.2.115", + "filament/tables": ">=3,<3.2.115", + "filegator/filegator": "<7.8", + "filp/whoops": "<2.1.13", + "fineuploader/php-traditional-server": "<=1.2.2", + "firebase/php-jwt": "<6", + "fisharebest/webtrees": "<=2.1.18", + "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2", + "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6", + "flarum/core": "<1.8.5", + "flarum/flarum": "<0.1.0.0-beta8", + "flarum/framework": "<1.8.5", + "flarum/mentions": "<1.6.3", + "flarum/sticky": ">=0.1.0.0-beta14,<=0.1.0.0-beta15", + "flarum/tags": "<=0.1.0.0-beta13", + "floriangaerber/magnesium": "<0.3.1", + "fluidtypo3/vhs": "<5.1.1", + "fof/byobu": ">=0.3.0.0-beta2,<1.1.7", + "fof/upload": "<1.2.3", + "foodcoopshop/foodcoopshop": ">=3.2,<3.6.1", + "fooman/tcpdf": "<6.2.22", + "forkcms/forkcms": "<5.11.1", + "fossar/tcpdf-parser": "<6.2.22", + "francoisjacquet/rosariosis": "<=11.5.1", + "frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2", + "friendsofsymfony/oauth2-php": "<1.3", + "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", + "friendsofsymfony/user-bundle": ">=1,<1.3.5", + "friendsofsymfony1/swiftmailer": ">=4,<5.4.13|>=6,<6.2.5", + "friendsofsymfony1/symfony1": ">=1.1,<1.5.19", + "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", + "friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6", + "froala/wysiwyg-editor": "<3.2.7|>=4.0.1,<=4.1.3", + "froxlor/froxlor": "<=2.2.0.0-RC3", + "frozennode/administrator": "<=5.0.12", + "fuel/core": "<1.8.1", + "funadmin/funadmin": "<=5.0.2", + "gaoming13/wechat-php-sdk": "<=1.10.2", + "genix/cms": "<=1.1.11", + "getformwork/formwork": "<1.13.1|==2.0.0.0-beta1", + "getgrav/grav": "<1.7.46", + "getkirby/cms": "<=3.6.6.5|>=3.7,<=3.7.5.4|>=3.8,<=3.8.4.3|>=3.9,<=3.9.8.1|>=3.10,<=3.10.1|>=4,<=4.3", + "getkirby/kirby": "<=2.5.12", + "getkirby/panel": "<2.5.14", + "getkirby/starterkit": "<=3.7.0.2", + "gilacms/gila": "<=1.15.4", + "gleez/cms": "<=1.3|==2", + "globalpayments/php-sdk": "<2", + "gogentooss/samlbase": "<1.2.7", + "google/protobuf": "<3.15", + "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", + "gree/jose": "<2.2.1", + "gregwar/rst": "<1.0.3", + "grumpydictator/firefly-iii": "<6.1.17", + "gugoan/economizzer": "<=0.9.0.0-beta1", + "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", + "guzzlehttp/psr7": "<1.9.1|>=2,<2.4.5", + "haffner/jh_captcha": "<=2.1.3|>=3,<=3.0.2", + "harvesthq/chosen": "<1.8.7", + "helloxz/imgurl": "<=2.31", + "hhxsv5/laravel-s": "<3.7.36", + "hillelcoren/invoice-ninja": "<5.3.35", + "himiklab/yii2-jqgrid-widget": "<1.0.8", + "hjue/justwriting": "<=1", + "hov/jobfair": "<1.0.13|>=2,<2.0.2", + "httpsoft/http-message": "<1.0.12", + "hyn/multi-tenant": ">=5.6,<5.7.2", + "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6,<4.6.14", + "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3|>=4.5,<4.5.6|>=4.6,<4.6.2", + "ibexa/fieldtype-richtext": ">=4.6,<4.6.10", + "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3", + "ibexa/http-cache": ">=4.6,<4.6.14", + "ibexa/post-install": "<1.0.16|>=4.6,<4.6.14", + "ibexa/solr": ">=4.5,<4.5.4", + "ibexa/user": ">=4,<4.4.3", + "icecoder/icecoder": "<=8.1", + "idno/known": "<=1.3.1", + "ilicmiljan/secure-props": ">=1.2,<1.2.2", + "illuminate/auth": "<5.5.10", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<6.18.31|>=7,<7.22.4", + "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", + "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", + "imdbphp/imdbphp": "<=5.1.1", + "impresscms/impresscms": "<=1.4.5", + "impresspages/impresspages": "<=1.0.12", + "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.2.3", + "in2code/ipandlanguageredirect": "<5.1.2", + "in2code/lux": "<17.6.1|>=18,<24.0.2", + "in2code/powermail": "<7.5.1|>=8,<8.5.1|>=9,<10.9.1|>=11,<12.4.1", + "innologi/typo3-appointments": "<2.0.6", + "intelliants/subrion": "<4.2.2", + "inter-mediator/inter-mediator": "==5.5", + "ipl/web": "<0.10.1", + "islandora/islandora": ">=2,<2.4.1", + "ivankristianto/phpwhois": "<=4.3", + "jackalope/jackalope-doctrine-dbal": "<1.7.4", + "james-heinrich/getid3": "<1.9.21", + "james-heinrich/phpthumb": "<1.7.12", + "jasig/phpcas": "<1.3.3", + "jcbrand/converse.js": "<3.3.3", + "johnbillion/wp-crontrol": "<1.16.2", + "joomla/application": "<1.0.13", + "joomla/archive": "<1.1.12|>=2,<2.0.1", + "joomla/filesystem": "<1.6.2|>=2,<2.0.1", + "joomla/filter": "<1.4.4|>=2,<2.0.1", + "joomla/framework": "<1.5.7|>=2.5.4,<=3.8.12", + "joomla/input": ">=2,<2.0.2", + "joomla/joomla-cms": ">=2.5,<3.9.12", + "joomla/session": "<1.3.1", + "joyqi/hyper-down": "<=2.4.27", + "jsdecena/laracom": "<2.0.9", + "jsmitty12/phpwhois": "<5.1", + "juzaweb/cms": "<=3.4", + "jweiland/events2": "<8.3.8|>=9,<9.0.6", + "kazist/phpwhois": "<=4.2.6", + "kelvinmo/simplexrd": "<3.1.1", + "kevinpapst/kimai2": "<1.16.7", + "khodakhah/nodcms": "<=3", + "kimai/kimai": "<=2.20.1", + "kitodo/presentation": "<3.2.3|>=3.3,<3.3.4", + "klaviyo/magento2-extension": ">=1,<3", + "knplabs/knp-snappy": "<=1.4.2", + "kohana/core": "<3.3.3", + "krayin/laravel-crm": "<=1.3", + "kreait/firebase-php": ">=3.2,<3.8.1", + "kumbiaphp/kumbiapp": "<=1.1.1", + "la-haute-societe/tcpdf": "<6.2.22", + "laminas/laminas-diactoros": "<2.18.1|==2.19|==2.20|==2.21|==2.22|==2.23|>=2.24,<2.24.2|>=2.25,<2.25.2", + "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", + "laminas/laminas-http": "<2.14.2", + "lara-zeus/artemis": ">=1,<=1.0.6", + "lara-zeus/dynamic-dashboard": ">=3,<=3.0.1", + "laravel/fortify": "<1.11.1", + "laravel/framework": "<6.20.45|>=7,<7.30.7|>=8,<8.83.28|>=9,<9.52.17|>=10,<10.48.23|>=11,<11.31", + "laravel/laravel": ">=5.4,<5.4.22", + "laravel/reverb": "<1.4", + "laravel/socialite": ">=1,<2.0.10", + "latte/latte": "<2.10.8", + "lavalite/cms": "<=9|==10.1", + "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", + "league/commonmark": "<0.18.3", + "league/flysystem": "<1.1.4|>=2,<2.1.1", + "league/oauth2-server": ">=8.3.2,<8.4.2|>=8.5,<8.5.3", + "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", + "libreform/libreform": ">=2,<=2.0.8", + "librenms/librenms": "<2017.08.18", + "liftkit/database": "<2.13.2", + "lightsaml/lightsaml": "<1.3.5", + "limesurvey/limesurvey": "<6.5.12", + "livehelperchat/livehelperchat": "<=3.91", + "livewire/livewire": "<2.12.7|>=3.0.0.0-beta1,<3.5.2", + "lms/routes": "<2.1.1", + "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", + "luyadev/yii-helpers": "<1.2.1", + "maestroerror/php-heic-to-jpg": "<1.0.5", + "magento/community-edition": "<2.4.5|==2.4.5|>=2.4.5.0-patch1,<2.4.5.0-patch10|==2.4.6|>=2.4.6.0-patch1,<2.4.6.0-patch8|>=2.4.7.0-beta1,<2.4.7.0-patch3", + "magento/core": "<=1.9.4.5", + "magento/magento1ce": "<1.9.4.3-dev", + "magento/magento1ee": ">=1,<1.14.4.3-dev", + "magento/product-community-edition": "<2.4.4.0-patch9|>=2.4.5,<2.4.5.0-patch8|>=2.4.6,<2.4.6.0-patch6|>=2.4.7,<2.4.7.0-patch1", + "magneto/core": "<1.9.4.4-dev", + "maikuolan/phpmussel": ">=1,<1.6", + "mainwp/mainwp": "<=4.4.3.3", + "mantisbt/mantisbt": "<=2.26.3", + "marcwillmann/turn": "<0.3.3", + "matyhtf/framework": "<3.0.6", + "mautic/core": "<4.4.13|>=5,<5.1.1", + "mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1", + "maximebf/debugbar": "<1.19", + "mdanter/ecc": "<2", + "mediawiki/abuse-filter": "<1.39.9|>=1.40,<1.41.3|>=1.42,<1.42.2", + "mediawiki/cargo": "<3.6.1", + "mediawiki/core": "<1.39.5|==1.40", + "mediawiki/matomo": "<2.4.3", + "mediawiki/semantic-media-wiki": "<4.0.2", + "melisplatform/melis-asset-manager": "<5.0.1", + "melisplatform/melis-cms": "<5.0.1", + "melisplatform/melis-front": "<5.0.1", + "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", + "mgallegos/laravel-jqgrid": "<=1.3", + "microsoft/microsoft-graph": ">=1.16,<1.109.1|>=2,<2.0.1", + "microsoft/microsoft-graph-beta": "<2.0.1", + "microsoft/microsoft-graph-core": "<2.0.2", + "microweber/microweber": "<=2.0.16", + "mikehaertl/php-shellcommand": "<1.6.1", + "miniorange/miniorange-saml": "<1.4.3", + "mittwald/typo3_forum": "<1.2.1", + "mobiledetect/mobiledetectlib": "<2.8.32", + "modx/revolution": "<=2.8.3.0-patch", + "mojo42/jirafeau": "<4.4", + "mongodb/mongodb": ">=1,<1.9.2", + "monolog/monolog": ">=1.8,<1.12", + "moodle/moodle": "<4.3.8|>=4.4,<4.4.4", + "mos/cimage": "<0.7.19", + "movim/moxl": ">=0.8,<=0.10", + "movingbytes/social-network": "<=1.2.1", + "mpdf/mpdf": "<=7.1.7", + "munkireport/comment": "<4.1", + "munkireport/managedinstalls": "<2.6", + "munkireport/munki_facts": "<1.5", + "munkireport/munkireport": ">=2.5.3,<5.6.3", + "munkireport/reportdata": "<3.5", + "munkireport/softwareupdate": "<1.6", + "mustache/mustache": ">=2,<2.14.1", + "namshi/jose": "<2.2", + "nategood/httpful": "<1", + "neoan3-apps/template": "<1.1.1", + "neorazorx/facturascripts": "<2022.04", + "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", + "neos/media-browser": "<7.3.19|>=8,<8.0.16|>=8.1,<8.1.11|>=8.2,<8.2.11|>=8.3,<8.3.9", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2", + "neos/swiftmailer": "<5.4.5", + "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", + "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", + "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", + "nilsteampassnet/teampass": "<3.0.10", + "nonfiction/nterchange": "<4.1.1", + "notrinos/notrinos-erp": "<=0.7", + "noumo/easyii": "<=0.9", + "novaksolutions/infusionsoft-php-sdk": "<1", + "nukeviet/nukeviet": "<4.5.02", + "nyholm/psr7": "<1.6.1", + "nystudio107/craft-seomatic": "<3.4.12", + "nzedb/nzedb": "<0.8", + "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", + "october/backend": "<1.1.2", + "october/cms": "<1.0.469|==1.0.469|==1.0.471|==1.1.1", + "october/october": "<=3.6.4", + "october/rain": "<1.0.472|>=1.1,<1.1.2", + "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.5.15", + "omeka/omeka-s": "<4.0.3", + "onelogin/php-saml": "<2.10.4", + "oneup/uploader-bundle": ">=1,<1.9.3|>=2,<2.1.5", + "open-web-analytics/open-web-analytics": "<1.7.4", + "opencart/opencart": ">=0", + "openid/php-openid": "<2.3", + "openmage/magento-lts": "<20.10.1", + "opensolutions/vimbadmin": "<=3.0.15", + "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2", + "orchid/platform": ">=8,<14.43", + "oro/calendar-bundle": ">=4.2,<=4.2.6|>=5,<=5.0.6|>=5.1,<5.1.1", + "oro/commerce": ">=4.1,<5.0.11|>=5.1,<5.1.1", + "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", + "oro/crm-call-bundle": ">=4.2,<=4.2.5|>=5,<5.0.4|>=5.1,<5.1.1", + "oro/customer-portal": ">=4.1,<=4.1.13|>=4.2,<=4.2.10|>=5,<=5.0.11|>=5.1,<=5.1.3", + "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<=4.2.10|>=5,<=5.0.12|>=5.1,<=5.1.3", + "oveleon/contao-cookiebar": "<1.16.3|>=2,<2.1.3", + "oxid-esales/oxideshop-ce": "<4.5", + "oxid-esales/paymorrow-module": ">=1,<1.0.2|>=2,<2.0.1", + "packbackbooks/lti-1-3-php-library": "<5", + "padraic/humbug_get_contents": "<1.1.2", + "pagarme/pagarme-php": "<3", + "pagekit/pagekit": "<=1.0.18", + "paragonie/ecc": "<2.0.1", + "paragonie/random_compat": "<2", + "passbolt/passbolt_api": "<4.6.2", + "paypal/adaptivepayments-sdk-php": "<=3.9.2", + "paypal/invoice-sdk-php": "<=3.9", + "paypal/merchant-sdk-php": "<3.12", + "paypal/permissions-sdk-php": "<=3.9.1", + "pear/archive_tar": "<1.4.14", + "pear/auth": "<1.2.4", + "pear/crypt_gpg": "<1.6.7", + "pear/pear": "<=1.10.1", + "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", + "personnummer/personnummer": "<3.0.2", + "phanan/koel": "<5.1.4", + "phenx/php-svg-lib": "<0.5.2", + "php-censor/php-censor": "<2.0.13|>=2.1,<2.1.5", + "php-mod/curl": "<2.3.2", + "phpbb/phpbb": "<3.3.11", + "phpems/phpems": ">=6,<=6.1.3", + "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", + "phpmailer/phpmailer": "<6.5", + "phpmussel/phpmussel": ">=1,<1.6", + "phpmyadmin/phpmyadmin": "<5.2.1", + "phpmyfaq/phpmyfaq": "<3.2.5|==3.2.5", + "phpoffice/common": "<0.2.9", + "phpoffice/phpexcel": "<1.8.1", + "phpoffice/phpspreadsheet": "<1.29.4|>=2,<2.1.3|>=2.2,<2.3.2|>=3.3,<3.4", + "phpseclib/phpseclib": "<2.0.47|>=3,<3.0.36", + "phpservermon/phpservermon": "<3.6", + "phpsysinfo/phpsysinfo": "<3.4.3", + "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", + "phpwhois/phpwhois": "<=4.2.5", + "phpxmlrpc/extras": "<0.6.1", + "phpxmlrpc/phpxmlrpc": "<4.9.2", + "pi/pi": "<=2.5", + "pimcore/admin-ui-classic-bundle": "<1.5.4", + "pimcore/customer-management-framework-bundle": "<4.0.6", + "pimcore/data-hub": "<1.2.4", + "pimcore/data-importer": "<1.8.9|>=1.9,<1.9.3", + "pimcore/demo": "<10.3", + "pimcore/ecommerce-framework-bundle": "<1.0.10", + "pimcore/perspective-editor": "<1.5.1", + "pimcore/pimcore": "<11.2.4", + "pixelfed/pixelfed": "<0.11.11", + "plotly/plotly.js": "<2.25.2", + "pocketmine/bedrock-protocol": "<8.0.2", + "pocketmine/pocketmine-mp": "<5.11.2", + "pocketmine/raklib": ">=0.14,<0.14.6|>=0.15,<0.15.1", + "pressbooks/pressbooks": "<5.18", + "prestashop/autoupgrade": ">=4,<4.10.1", + "prestashop/blockreassurance": "<=5.1.3", + "prestashop/blockwishlist": ">=2,<2.1.1", + "prestashop/contactform": ">=1.0.1,<4.3", + "prestashop/gamification": "<2.3.2", + "prestashop/prestashop": "<8.1.6", + "prestashop/productcomments": "<5.0.2", + "prestashop/ps_emailsubscription": "<2.6.1", + "prestashop/ps_facetedsearch": "<3.4.1", + "prestashop/ps_linklist": "<3.1", + "privatebin/privatebin": "<1.4|>=1.5,<1.7.4", + "processwire/processwire": "<=3.0.229", + "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7", + "propel/propel1": ">=1,<=1.7.1", + "pterodactyl/panel": "<1.11.8", + "ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2", + "ptrofimov/beanstalk_console": "<1.7.14", + "pubnub/pubnub": "<6.1", + "pusher/pusher-php-server": "<2.2.1", + "pwweb/laravel-core": "<=0.3.6.0-beta", + "pxlrbt/filament-excel": "<1.1.14|>=2.0.0.0-alpha,<2.3.3", + "pyrocms/pyrocms": "<=3.9.1", + "qcubed/qcubed": "<=3.1.1", + "quickapps/cms": "<=2.0.0.0-beta2", + "rainlab/blog-plugin": "<1.4.1", + "rainlab/debugbar-plugin": "<3.1", + "rainlab/user-plugin": "<=1.4.5", + "rankmath/seo-by-rank-math": "<=1.0.95", + "rap2hpoutre/laravel-log-viewer": "<0.13", + "react/http": ">=0.7,<1.9", + "really-simple-plugins/complianz-gdpr": "<6.4.2", + "redaxo/source": "<5.18", + "remdex/livehelperchat": "<4.29", + "reportico-web/reportico": "<=8.1", + "rhukster/dom-sanitizer": "<1.0.7", + "rmccue/requests": ">=1.6,<1.8", + "robrichards/xmlseclibs": ">=1,<3.0.4", + "roots/soil": "<4.1", + "rudloff/alltube": "<3.0.3", + "s-cart/core": "<6.9", + "s-cart/s-cart": "<6.9", + "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", + "sabre/dav": ">=1.6,<1.7.11|>=1.8,<1.8.9", + "samwilson/unlinked-wikibase": "<1.39.6|>=1.40,<1.40.2|>=1.41,<1.41.1", + "scheb/two-factor-bundle": "<3.26|>=4,<4.11", + "sensiolabs/connect": "<4.2.3", + "serluck/phpwhois": "<=4.2.6", + "sfroemken/url_redirect": "<=1.2.1", + "sheng/yiicms": "<=1.2", + "shopware/core": "<=6.5.8.12|>=6.6,<=6.6.5", + "shopware/platform": "<=6.5.8.12|>=6.6,<=6.6.5", + "shopware/production": "<=6.3.5.2", + "shopware/shopware": "<=5.7.17", + "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", + "shopxo/shopxo": "<=6.1", + "showdoc/showdoc": "<2.10.4", + "silverstripe-australia/advancedreports": ">=1,<=2", + "silverstripe/admin": "<1.13.19|>=2,<2.1.8", + "silverstripe/assets": ">=1,<1.11.1", + "silverstripe/cms": "<4.11.3", + "silverstripe/comments": ">=1.3,<3.1.1", + "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", + "silverstripe/framework": "<5.2.16", + "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.8.2|>=4,<4.3.7|>=5,<5.1.3", + "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", + "silverstripe/recipe-cms": ">=4.5,<4.5.3", + "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", + "silverstripe/reports": "<5.2.3", + "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4|>=2.1,<2.1.2", + "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", + "silverstripe/subsites": ">=2,<2.6.1", + "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", + "silverstripe/userforms": "<3|>=5,<5.4.2", + "silverstripe/versioned-admin": ">=1,<1.11.1", + "simple-updates/phpwhois": "<=1", + "simplesamlphp/saml2": "<4.6.14|==5.0.0.0-alpha12", + "simplesamlphp/saml2-legacy": "<4.6.14", + "simplesamlphp/simplesamlphp": "<1.18.6", + "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "simplesamlphp/simplesamlphp-module-openid": "<1", + "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", + "simplesamlphp/xml-common": "<1.20", + "simplesamlphp/xml-security": "==1.6.11", + "simplito/elliptic-php": "<1.0.6", + "sitegeist/fluid-components": "<3.5", + "sjbr/sr-freecap": "<2.4.6|>=2.5,<2.5.3", + "slim/psr7": "<1.4.1|>=1.5,<1.5.1|>=1.6,<1.6.1", + "slim/slim": "<2.6", + "slub/slub-events": "<3.0.3", + "smarty/smarty": "<4.5.3|>=5,<5.1.1", + "snipe/snipe-it": "<=7.0.13", + "socalnick/scn-social-auth": "<1.15.2", + "socialiteproviders/steam": "<1.1", + "spatie/browsershot": "<3.57.4", + "spatie/image-optimizer": "<1.7.3", + "spencer14420/sp-php-email-handler": "<1", + "spipu/html2pdf": "<5.2.8", + "spoon/library": "<1.4.1", + "spoonity/tcpdf": "<6.2.22", + "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", + "ssddanbrown/bookstack": "<24.05.1", + "starcitizentools/citizen-skin": ">=2.6.3,<2.31", + "statamic/cms": "<=5.16", + "stormpath/sdk": "<9.9.99", + "studio-42/elfinder": "<=2.1.64", + "studiomitte/friendlycaptcha": "<0.1.4", + "subhh/libconnect": "<7.0.8|>=8,<8.1", + "sukohi/surpass": "<1", + "sulu/form-bundle": ">=2,<2.5.3", + "sulu/sulu": "<1.6.44|>=2,<2.5.21|>=2.6,<2.6.5", + "sumocoders/framework-user-bundle": "<1.4", + "superbig/craft-audit": "<3.0.2", + "swag/paypal": "<5.4.4", + "swiftmailer/swiftmailer": "<6.2.5", + "swiftyedit/swiftyedit": "<1.2", + "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", + "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/grid-bundle": "<1.10.1", + "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", + "sylius/resource-bundle": ">=1,<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", + "sylius/sylius": "<1.12.19|>=1.13.0.0-alpha1,<1.13.4", + "symbiote/silverstripe-multivaluefield": ">=3,<3.1", + "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", + "symbiote/silverstripe-seed": "<6.0.3", + "symbiote/silverstripe-versionedfiles": "<=2.0.3", + "symfont/process": ">=0", + "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", + "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", + "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<5.3.15|>=5.4.3,<5.4.4|>=6.0.3,<6.0.4", + "symfony/http-client": ">=4.3,<5.4.47|>=6,<6.4.15|>=7,<7.1.8", + "symfony/http-foundation": "<5.4.46|>=6,<6.4.14|>=7,<7.1.7", + "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", + "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", + "symfony/mime": ">=4.3,<4.3.8", + "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/polyfill": ">=1,<1.10", + "symfony/polyfill-php55": ">=1,<1.10", + "symfony/process": "<5.4.46|>=6,<6.4.14|>=7,<7.1.7", + "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/routing": ">=2,<2.0.19", + "symfony/runtime": ">=5.3,<5.4.46|>=6,<6.4.14|>=7,<7.1.7", + "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", + "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.4.10|>=7,<7.0.10|>=7.1,<7.1.3", + "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", + "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.4.47|>=6,<6.4.15|>=7,<7.1.8", + "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", + "symfony/symfony": "<5.4.47|>=6,<6.4.15|>=7,<7.1.8", + "symfony/translation": ">=2,<2.0.17", + "symfony/twig-bridge": ">=2,<4.4.51|>=5,<5.4.31|>=6,<6.3.8", + "symfony/ux-autocomplete": "<2.11.2", + "symfony/validator": "<5.4.43|>=6,<6.4.11|>=7,<7.1.4", + "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", + "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", + "symfony/webhook": ">=6.3,<6.3.8", + "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7|>=2.2.0.0-beta1,<2.2.0.0-beta2", + "symphonycms/symphony-2": "<2.6.4", + "t3/dce": "<0.11.5|>=2.2,<2.6.2", + "t3g/svg-sanitizer": "<1.0.3", + "t3s/content-consent": "<1.0.3|>=2,<2.0.2", + "tastyigniter/tastyigniter": "<3.3", + "tcg/voyager": "<=1.4", + "tecnickcom/tcpdf": "<=6.7.5", + "terminal42/contao-tablelookupwizard": "<3.3.5", + "thelia/backoffice-default-template": ">=2.1,<2.1.2", + "thelia/thelia": ">=2.1,<2.1.3", + "theonedemon/phpwhois": "<=4.2.5", + "thinkcmf/thinkcmf": "<6.0.8", + "thorsten/phpmyfaq": "<4", + "tikiwiki/tiki-manager": "<=17.1", + "timber/timber": ">=0.16.6,<1.23.1|>=1.24,<1.24.1|>=2,<2.1", + "tinymce/tinymce": "<7.2", + "tinymighty/wiki-seo": "<1.2.2", + "titon/framework": "<9.9.99", + "tobiasbg/tablepress": "<=2.0.0.0-RC1", + "topthink/framework": "<6.0.17|>=6.1,<=8.0.4", + "topthink/think": "<=6.1.1", + "topthink/thinkphp": "<=3.2.3|>=6.1.3,<=8.0.4", + "torrentpier/torrentpier": "<=2.4.3", + "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", + "tribalsystems/zenario": "<=9.7.61188", + "truckersmp/phpwhois": "<=4.3.1", + "ttskch/pagination-service-provider": "<1", + "twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2", + "twig/twig": "<3.11.2|>=3.12,<3.14.1", + "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", + "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<10.4.46|>=11,<11.5.40|>=12,<12.4.21|>=13,<13.3.1", + "typo3/cms-core": "<=8.7.56|>=9,<=9.5.47|>=10,<=10.4.44|>=11,<=11.5.36|>=12,<=12.4.14|>=13,<=13.1", + "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1", + "typo3/cms-fluid": "<4.3.4|>=4.4,<4.4.1", + "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/cms-frontend": "<4.3.9|>=4.4,<4.4.5", + "typo3/cms-install": "<4.1.14|>=4.2,<4.2.16|>=4.3,<4.3.9|>=4.4,<4.4.5|>=12.2,<12.4.8", + "typo3/cms-rte-ckeditor": ">=9.5,<9.5.42|>=10,<10.4.39|>=11,<11.5.30", + "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "typo3/html-sanitizer": ">=1,<=1.5.2|>=2,<=2.1.3", + "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", + "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", + "ua-parser/uap-php": "<3.8", + "uasoft-indonesia/badaso": "<=2.9.7", + "unisharp/laravel-filemanager": "<2.6.4", + "unopim/unopim": "<0.1.5", + "userfrosting/userfrosting": ">=0.3.1,<4.6.3", + "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", + "uvdesk/community-skeleton": "<=1.1.1", + "uvdesk/core-framework": "<=1.1.1", + "vanilla/safecurl": "<0.9.2", + "verbb/comments": "<1.5.5", + "verbb/formie": "<2.1.6", + "verbb/image-resizer": "<2.0.9", + "verbb/knock-knock": "<1.2.8", + "verot/class.upload.php": "<=2.1.6", + "villagedefrance/opencart-overclocked": "<=1.11.1", + "vova07/yii2-fileapi-widget": "<0.1.9", + "vrana/adminer": "<4.8.1", + "vufind/vufind": ">=2,<9.1.1", + "waldhacker/hcaptcha": "<2.1.2", + "wallabag/tcpdf": "<6.2.22", + "wallabag/wallabag": "<2.6.7", + "wanglelecc/laracms": "<=1.0.3", + "web-auth/webauthn-framework": ">=3.3,<3.3.4|>=4.5,<4.9", + "web-auth/webauthn-lib": ">=4.5,<4.9", + "web-feet/coastercms": "==5.5", + "webbuilders-group/silverstripe-kapost-bridge": "<0.4", + "webcoast/deferred-image-processing": "<1.0.2", + "webklex/laravel-imap": "<5.3", + "webklex/php-imap": "<5.3", + "webpa/webpa": "<3.1.2", + "wikibase/wikibase": "<=1.39.3", + "wikimedia/parsoid": "<0.12.2", + "willdurand/js-translation-bundle": "<2.1.1", + "winter/wn-backend-module": "<1.2.4", + "winter/wn-dusk-plugin": "<2.1", + "winter/wn-system-module": "<1.2.4", + "wintercms/winter": "<=1.2.3", + "wireui/wireui": "<1.19.3|>=2,<2.1.3", + "woocommerce/woocommerce": "<6.6|>=8.8,<8.8.5|>=8.9,<8.9.3", + "wp-cli/wp-cli": ">=0.12,<2.5", + "wp-graphql/wp-graphql": "<=1.14.5", + "wp-premium/gravityforms": "<2.4.21", + "wpanel/wpanel4-cms": "<=4.3.1", + "wpcloud/wp-stateless": "<3.2", + "wpglobus/wpglobus": "<=1.9.6", + "wwbn/avideo": "<14.3", + "xataface/xataface": "<3", + "xpressengine/xpressengine": "<3.0.15", + "yab/quarx": "<2.4.5", + "yeswiki/yeswiki": "<=4.4.4", + "yetiforce/yetiforce-crm": "<=6.4", + "yidashi/yii2cmf": "<=2", + "yii2mod/yii2-cms": "<1.9.2", + "yiisoft/yii": "<1.1.29", + "yiisoft/yii2": "<2.0.49.4-dev", + "yiisoft/yii2-authclient": "<2.2.15", + "yiisoft/yii2-bootstrap": "<2.0.4", + "yiisoft/yii2-dev": "<2.0.43", + "yiisoft/yii2-elasticsearch": "<2.0.5", + "yiisoft/yii2-gii": "<=2.2.4", + "yiisoft/yii2-jui": "<2.0.4", + "yiisoft/yii2-redis": "<2.0.8", + "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6", + "yoast-seo-for-typo3/yoast_seo": "<7.2.3", + "yourls/yourls": "<=1.8.2", + "yuan1994/tpadmin": "<=1.3.12", + "zencart/zencart": "<=1.5.7.0-beta", + "zendesk/zendesk_api_client_php": "<2.2.11", + "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", + "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-db": "<2.2.10|>=2.3,<2.3.5", + "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", + "zendframework/zend-diactoros": "<1.8.4", + "zendframework/zend-feed": "<2.10.3", + "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-http": "<2.8.1", + "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", + "zendframework/zend-mail": "<2.4.11|>=2.5,<2.7.2", + "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-session": ">=2,<2.2.9|>=2.3,<2.3.4", + "zendframework/zend-validator": ">=2.3,<2.3.6", + "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zendframework": "<=3", + "zendframework/zendframework1": "<1.12.20", + "zendframework/zendopenid": "<2.0.2", + "zendframework/zendrest": "<2.0.2", + "zendframework/zendservice-amazon": "<2.0.3", + "zendframework/zendservice-api": "<1", + "zendframework/zendservice-audioscrobbler": "<2.0.2", + "zendframework/zendservice-nirvanix": "<2.0.2", + "zendframework/zendservice-slideshare": "<2.0.2", + "zendframework/zendservice-technorati": "<2.0.2", + "zendframework/zendservice-windowsazure": "<2.0.2", + "zendframework/zendxml": ">=1,<1.0.1", + "zenstruck/collection": "<0.2.1", + "zetacomponents/mail": "<1.8.2", + "zf-commons/zfc-user": "<1.2.2", + "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", + "zfr/zfr-oauth2-server-module": "<0.1.2", + "zoujingli/thinkadmin": "<=6.1.53" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "role": "maintainer" + }, + { + "name": "Ilya Tribusean", + "email": "slash3b@gmail.com", + "role": "maintainer" + } + ], + "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", + "keywords": [ + "dev" + ], + "support": { + "issues": "https://github.com/Roave/SecurityAdvisories/issues", + "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", + "type": "tidelift" + } + ], + "time": "2024-12-06T23:05:03+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:44:28+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739", + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-31T05:30:08+00:00" + }, + { + "name": "sebastian/complexity", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:49:50+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "sebastian/environment", + "version": "7.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:54:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "6.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-12-05T09:17:50+00:00" + }, + { + "name": "sebastian/global-state", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:57:36+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:58:38+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:00:13+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:01:32+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:10:34+00:00" + }, + { + "name": "sebastian/type", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-09-17T13:12:04+00:00" + }, + { + "name": "sebastian/version", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.11.1", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-11-16T12:02:36+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "symfony/config", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/bcd3c4adf0144dee5011bb35454728c38adec055", + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^7.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-04T11:36:24+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "a475747af1a1c98272a5471abc35f3da81197c5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a475747af1a1c98272a5471abc35f3da81197c5d", + "reference": "a475747af1a1c98272a5471abc35f3da81197c5d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^3.5", + "symfony/var-exporter": "^6.4|^7.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "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": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-25T15:45:00+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "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": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-10-25T15:15:23+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c6a22929407dec8765d6e2b6ff85b800b245879c", + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.12" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "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": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-08T15:48:14+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d", + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "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": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-10-18T07:58:17+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": { + "roave/security-advisories": 20 + }, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.3", + "ext-curl": "*", + "ext-json": "*" + }, + "platform-dev": { + "ext-simplexml": "*" + }, + "plugin-api-version": "2.3.0" +} From daeb22b745f907de28c5fea10fb5323a4f52f0d1 Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 10:57:18 +0100 Subject: [PATCH 04/46] Added basic .gitignore with sensible defaults --- .gitignore | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac608c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,118 @@ +# Custom added rules +/bin/ + +# Created by https://www.toptal.com/developers/gitignore/api/composer,phpunit,phpstorm+all +# Edit at https://www.toptal.com/developers/gitignore?templates=composer,phpunit,phpstorm+all + +### Composer ### +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + +### PhpStorm+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### PhpStorm+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### PHPUnit ### +# Covers PHPUnit +# Reference: https://phpunit.de/ + +# Generated files +.phpunit.result.cache +.phpunit.cache + +# PHPUnit +/app/phpunit.xml +/phpunit.xml + +# Build data +/build/ + +# End of https://www.toptal.com/developers/gitignore/api/composer,phpunit,phpstorm+all \ No newline at end of file From c70a16558451dc76c400f8e19dd2349881c8066d Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 11:12:57 +0100 Subject: [PATCH 05/46] Updated: README.md --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f94905d..a948def 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,25 @@ -

PHP SDK

- +
+ Pay NL SDK +

PHP SDK

+
Use this SDK to implement Pay. into your PHP integration. -
#### Requirements -> PHP 7.4 or PHP 8+ +> PHP 8.3+ JSON extension installed CURL extension installed - -
+ +#### Installation If requirements are met, go ahead with the [installation and set-up](https://github.com/paynl/php-sdk/wiki/Install) of the SDK! -
+#### Usage To get you started, you should check these [Samples](https://github.com/paynl/SDK-PHP/blob/main/samples). -
+ +#### Documentation For more detailed information, have a look at the [Wiki](https://github.com/paynl/php-sdk/wiki/) page. From 5f87dea66861aae5694fa555c0fd915b0edf9f85 Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 11:20:38 +0100 Subject: [PATCH 06/46] Updated: Composer packages / use composer default bin dir / https only --- composer.json | 26 +- composer.lock | 4311 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4323 insertions(+), 14 deletions(-) create mode 100644 composer.lock diff --git a/composer.json b/composer.json index 216fe0d..851929c 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,11 @@ "version": "0.1.0", "type": "library", "require": { - "php": "^7.4|^8.0", + "php": "^8.3", "ext-curl": "*", "ext-json": "*", - "psr/container": "^1.0", - "psr/http-message": "~1.0" + "psr/container": "^2", + "psr/http-message": "^2" }, "license": "MIT", "support": { @@ -22,13 +22,13 @@ ], "require-dev": { "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.3", - "phpmd/phpmd": "^2.7", - "phpstan/phpstan": "1.10.4", - "phpunit/phpunit": "^10", + "guzzlehttp/guzzle": "^7", + "phpmd/phpmd": "^2", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^11", "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.4", - "symfony/var-dumper": "^4.3" + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^7" }, "autoload": { "psr-4": { @@ -50,8 +50,6 @@ "repositories": [ ], "config": { - "bin-dir": "bin", - "secure-http": false, "optimize-autoloader": true, "sort-packages": true, "discard-changes": true @@ -65,9 +63,9 @@ "@phpmd", "@phpcs" ], - "phpstan": "bin/phpstan analyse", - "phpmd": "bin/phpmd src,samples text phpmd.xml", - "phpcs": "bin/phpcs" + "phpstan": "vendor/bin/phpstan analyse", + "phpmd": "vendor/bin/phpmd src,samples text phpmd.xml", + "phpcs": "vendor/bin/phpcs" }, "archive": { "exclude": [ diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..a213884 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4311 @@ +{ + "_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#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "59524dd712be7d3d4e3113dd446f6a9e", + "packages": [ + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://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" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2024-07-24T11:22:20+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2024-10-17T10:06:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2024-07-18T11:15:46+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.12.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-11-08T17:47:46+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.3.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + }, + "time": "2024-10-08T18:51:32+00:00" + }, + { + "name": "pdepend/pdepend", + "version": "2.16.2", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/f942b208dc2a0868454d01b29f0c75bbcfc6ed58", + "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58", + "shasum": "" + }, + "require": { + "php": ">=5.3.7", + "symfony/config": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/polyfill-mbstring": "^1.19" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0|^1.2.3", + "gregwar/rst": "^1.0", + "squizlabs/php_codesniffer": "^2.0.0" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PDepend\\": "src/main/php/PDepend" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Official version of pdepend to be handled with Composer", + "keywords": [ + "PHP Depend", + "PHP_Depend", + "dev", + "pdepend" + ], + "support": { + "issues": "https://github.com/pdepend/pdepend/issues", + "source": "https://github.com/pdepend/pdepend/tree/2.16.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend", + "type": "tidelift" + } + ], + "time": "2023-12-17T18:09:59+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpmd/phpmd", + "version": "2.15.0", + "source": { + "type": "git", + "url": "https://github.com/phpmd/phpmd.git", + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/74a1f56e33afad4128b886e334093e98e1b5e7c0", + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0", + "shasum": "" + }, + "require": { + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", + "ext-xml": "*", + "pdepend/pdepend": "^2.16.1", + "php": ">=5.3.9" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0 || ^1.3.2", + "ext-json": "*", + "ext-simplexml": "*", + "gregwar/rst": "^1.0", + "mikey179/vfsstream": "^1.6.8", + "squizlabs/php_codesniffer": "^2.9.2 || ^3.7.2" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Manuel Pichler", + "email": "github@manuel-pichler.de", + "homepage": "https://github.com/manuelpichler", + "role": "Project Founder" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" + }, + { + "name": "Other contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", + "role": "Contributors" + } + ], + "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", + "homepage": "https://phpmd.org/", + "keywords": [ + "dev", + "mess detection", + "mess detector", + "pdepend", + "phpmd", + "pmd" + ], + "support": { + "irc": "irc://irc.freenode.org/phpmd", + "issues": "https://github.com/phpmd/phpmd/issues", + "source": "https://github.com/phpmd/phpmd/tree/2.15.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", + "type": "tidelift" + } + ], + "time": "2023-12-11T08:22:20+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2024-11-28T22:19:37+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "11.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.3.1", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^11.4.1" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T06:21:38+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-27T05:02:59+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:07:44+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:08:43+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:09:35+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "11.5.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0569902506a6c0878930b87ea79ec3b50ea563f7", + "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.12.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.7", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.1", + "sebastian/comparator": "^6.2.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.0" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-12-06T05:57:38+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "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.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "roave/security-advisories", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Roave/SecurityAdvisories.git", + "reference": "dcb2bdb48e1d9b0b5b1c333b61f49772aee879ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/dcb2bdb48e1d9b0b5b1c333b61f49772aee879ff", + "reference": "dcb2bdb48e1d9b0b5b1c333b61f49772aee879ff", + "shasum": "" + }, + "conflict": { + "3f/pygmentize": "<1.2", + "admidio/admidio": "<4.3.12", + "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", + "aheinze/cockpit": "<2.2", + "aimeos/ai-admin-graphql": ">=2022.04.1,<2022.10.10|>=2023.04.1,<2023.10.6|>=2024.04.1,<2024.07.2", + "aimeos/ai-admin-jsonadm": "<2020.10.13|>=2021.04.1,<2021.10.6|>=2022.04.1,<2022.10.3|>=2023.04.1,<2023.10.4|==2024.04.1", + "aimeos/ai-client-html": ">=2020.04.1,<2020.10.27|>=2021.04.1,<2021.10.22|>=2022.04.1,<2022.10.13|>=2023.04.1,<2023.10.15|>=2024.04.1,<2024.04.7", + "aimeos/ai-controller-frontend": "<2020.10.15|>=2021.04.1,<2021.10.8|>=2022.04.1,<2022.10.8|>=2023.04.1,<2023.10.9|==2024.04.1", + "aimeos/aimeos-core": ">=2022.04.1,<2022.10.17|>=2023.04.1,<2023.10.17|>=2024.04.1,<2024.04.7", + "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5", + "airesvsg/acf-to-rest-api": "<=3.1", + "akaunting/akaunting": "<2.1.13", + "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", + "alextselegidis/easyappointments": "<1.5", + "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", + "amazing/media2click": ">=1,<1.3.3", + "ameos/ameos_tarteaucitron": "<1.2.23", + "amphp/artax": "<1.0.6|>=2,<2.0.6", + "amphp/http": "<=1.7.2|>=2,<=2.1", + "amphp/http-client": ">=4,<4.4", + "anchorcms/anchor-cms": "<=0.12.7", + "andreapollastri/cipi": "<=3.1.15", + "andrewhaine/silverstripe-form-capture": ">=0.2,<=0.2.3|>=1,<1.0.2|>=2,<2.2.5", + "apache-solr-for-typo3/solr": "<2.8.3", + "apereo/phpcas": "<1.6", + "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3", + "appwrite/server-ce": "<=1.2.1", + "arc/web": "<3", + "area17/twill": "<1.2.5|>=2,<2.5.3", + "artesaos/seotools": "<0.17.2", + "asymmetricrypt/asymmetricrypt": "<9.9.99", + "athlon1600/php-proxy": "<=5.1", + "athlon1600/php-proxy-app": "<=3", + "austintoddj/canvas": "<=3.4.2", + "auth0/wordpress": "<=4.6", + "automad/automad": "<2.0.0.0-alpha5", + "automattic/jetpack": "<9.8", + "awesome-support/awesome-support": "<=6.0.7", + "aws/aws-sdk-php": "<3.288.1", + "azuracast/azuracast": "<0.18.3", + "backdrop/backdrop": "<1.27.3|>=1.28,<1.28.2", + "backpack/crud": "<3.4.9", + "backpack/filemanager": "<2.0.2|>=3,<3.0.9", + "bacula-web/bacula-web": "<8.0.0.0-RC2-dev", + "badaso/core": "<2.7", + "bagisto/bagisto": "<2.1", + "barrelstrength/sprout-base-email": "<1.2.7", + "barrelstrength/sprout-forms": "<3.9", + "barryvdh/laravel-translation-manager": "<0.6.2", + "barzahlen/barzahlen-php": "<2.0.1", + "baserproject/basercms": "<=5.1.1", + "bassjobsen/bootstrap-3-typeahead": ">4.0.2", + "bbpress/bbpress": "<2.6.5", + "bcosca/fatfree": "<3.7.2", + "bedita/bedita": "<4", + "bigfork/silverstripe-form-capture": ">=3,<3.1.1", + "billz/raspap-webgui": "<=3.1.4", + "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", + "blueimp/jquery-file-upload": "==6.4.4", + "bmarshall511/wordpress_zero_spam": "<5.2.13", + "bolt/bolt": "<3.7.2", + "bolt/core": "<=4.2", + "born05/craft-twofactorauthentication": "<3.3.4", + "bottelet/flarepoint": "<2.2.1", + "bref/bref": "<2.1.17", + "brightlocal/phpwhois": "<=4.2.5", + "brotkrueml/codehighlight": "<2.7", + "brotkrueml/schema": "<1.13.1|>=2,<2.5.1", + "brotkrueml/typo3-matomo-integration": "<1.3.2", + "buddypress/buddypress": "<7.2.1", + "bugsnag/bugsnag-laravel": ">=2,<2.0.2", + "bytefury/crater": "<6.0.2", + "cachethq/cachet": "<2.5.1", + "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.1,<4.1.4|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", + "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", + "cardgate/magento2": "<2.0.33", + "cardgate/woocommerce": "<=3.1.15", + "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cart2quote/module-quotation-encoded": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cartalyst/sentry": "<=2.1.6", + "catfan/medoo": "<1.7.5", + "causal/oidc": "<2.1", + "cecil/cecil": "<7.47.1", + "centreon/centreon": "<22.10.15", + "cesnet/simplesamlphp-module-proxystatistics": "<3.1", + "chriskacerguis/codeigniter-restserver": "<=2.7.1", + "civicrm/civicrm-core": ">=4.2,<4.2.9|>=4.3,<4.3.3", + "ckeditor/ckeditor": "<4.24", + "cockpit-hq/cockpit": "<2.7|==2.7", + "codeception/codeception": "<3.1.3|>=4,<4.1.22", + "codeigniter/framework": "<3.1.9", + "codeigniter4/framework": "<4.4.7", + "codeigniter4/shield": "<1.0.0.0-beta8", + "codiad/codiad": "<=2.8.4", + "composer/composer": "<1.10.27|>=2,<2.2.24|>=2.3,<2.7.7", + "concrete5/concrete5": "<9.3.4", + "concrete5/core": "<8.5.8|>=9,<9.1", + "contao-components/mediaelement": ">=2.14.2,<2.21.1", + "contao/comments-bundle": ">=2,<4.13.40|>=5.0.0.0-RC1-dev,<5.3.4", + "contao/contao": "<=5.4.1", + "contao/core": "<3.5.39", + "contao/core-bundle": "<4.13.49|>=5,<5.3.15|>=5.4,<5.4.3", + "contao/listing-bundle": ">=3,<=3.5.30|>=4,<4.4.8", + "contao/managed-edition": "<=1.5", + "corveda/phpsandbox": "<1.3.5", + "cosenary/instagram": "<=2.3", + "craftcms/cms": "<=4.12.6.1|>=5,<=5.4.7.1", + "croogo/croogo": "<4", + "cuyz/valinor": "<0.12", + "czim/file-handling": "<1.5|>=2,<2.3", + "czproject/git-php": "<4.0.3", + "damienharper/auditor-bundle": "<5.2.6", + "dapphp/securimage": "<3.6.6", + "darylldoyle/safe-svg": "<1.9.10", + "datadog/dd-trace": ">=0.30,<0.30.2", + "datatables/datatables": "<1.10.10", + "david-garcia/phpwhois": "<=4.3.1", + "dbrisinajumi/d2files": "<1", + "dcat/laravel-admin": "<=2.1.3", + "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3", + "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1|>=7,<7.4", + "desperado/xml-bundle": "<=0.1.7", + "dev-lancer/minecraft-motd-parser": "<=1.0.5", + "devgroup/dotplant": "<2020.09.14-dev", + "directmailteam/direct-mail": "<6.0.3|>=7,<7.0.3|>=8,<9.5.2", + "doctrine/annotations": "<1.2.7", + "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", + "doctrine/common": "<2.4.3|>=2.5,<2.5.1", + "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4", + "doctrine/doctrine-bundle": "<1.5.2", + "doctrine/doctrine-module": "<0.7.2", + "doctrine/mongodb-odm": "<1.0.2", + "doctrine/mongodb-odm-bundle": "<3.0.1", + "doctrine/orm": ">=1,<1.2.4|>=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", + "dolibarr/dolibarr": "<19.0.2", + "dompdf/dompdf": "<2.0.4", + "doublethreedigital/guest-entries": "<3.1.2", + "drupal/core": ">=6,<6.38|>=7,<7.96|>=8,<10.2.10|>=10.3,<10.3.6|>=11,<11.0.5", + "drupal/core-recommended": ">=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", + "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.80|>=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", + "duncanmcclean/guest-entries": "<3.1.2", + "dweeves/magmi": "<=0.7.24", + "ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2", + "ecodev/newsletter": "<=4", + "ectouch/ectouch": "<=2.7.2", + "egroupware/egroupware": "<23.1.20240624", + "elefant/cms": "<2.0.7", + "elgg/elgg": "<3.3.24|>=4,<4.0.5", + "elijaa/phpmemcacheadmin": "<=1.3", + "encore/laravel-admin": "<=1.8.19", + "endroid/qr-code-bundle": "<3.4.2", + "enhavo/enhavo-app": "<=0.13.1", + "enshrined/svg-sanitize": "<0.15", + "erusev/parsedown": "<1.7.2", + "ether/logs": "<3.0.4", + "evolutioncms/evolution": "<=3.2.3", + "exceedone/exment": "<4.4.3|>=5,<5.0.3", + "exceedone/laravel-admin": "<2.2.3|==3", + "ezsystems/demobundle": ">=5.4,<5.4.6.1-dev", + "ezsystems/ez-support-tools": ">=2.2,<2.2.3", + "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1-dev", + "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1-dev|>=5.4,<5.4.11.1-dev|>=2017.12,<2017.12.0.1-dev", + "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26|>=3.3,<3.3.39", + "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", + "ezsystems/ezplatform-graphql": ">=1.0.0.0-RC1-dev,<1.0.13|>=2.0.0.0-beta1,<2.3.12", + "ezsystems/ezplatform-http-cache": "<2.3.16", + "ezsystems/ezplatform-kernel": "<1.2.5.1-dev|>=1.3,<1.3.35", + "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", + "ezsystems/ezplatform-richtext": ">=2.3,<2.3.7.1-dev|>=3.3,<3.3.40", + "ezsystems/ezplatform-solr-search-engine": ">=1.7,<1.7.12|>=2,<2.0.2|>=3.3,<3.3.15", + "ezsystems/ezplatform-user": ">=1,<1.0.1", + "ezsystems/ezpublish-kernel": "<6.13.8.2-dev|>=7,<7.5.31", + "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.03.5.1", + "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", + "ezsystems/repository-forms": ">=2.3,<2.3.2.1-dev|>=2.5,<2.5.15", + "ezyang/htmlpurifier": "<=4.2", + "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", + "facturascripts/facturascripts": "<=2022.08", + "fastly/magento2": "<1.2.26", + "feehi/cms": "<=2.1.1", + "feehi/feehicms": "<=2.1.1", + "fenom/fenom": "<=2.12.1", + "filament/actions": ">=3.2,<3.2.123", + "filament/infolists": ">=3,<3.2.115", + "filament/tables": ">=3,<3.2.115", + "filegator/filegator": "<7.8", + "filp/whoops": "<2.1.13", + "fineuploader/php-traditional-server": "<=1.2.2", + "firebase/php-jwt": "<6", + "fisharebest/webtrees": "<=2.1.18", + "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2", + "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6", + "flarum/core": "<1.8.5", + "flarum/flarum": "<0.1.0.0-beta8", + "flarum/framework": "<1.8.5", + "flarum/mentions": "<1.6.3", + "flarum/sticky": ">=0.1.0.0-beta14,<=0.1.0.0-beta15", + "flarum/tags": "<=0.1.0.0-beta13", + "floriangaerber/magnesium": "<0.3.1", + "fluidtypo3/vhs": "<5.1.1", + "fof/byobu": ">=0.3.0.0-beta2,<1.1.7", + "fof/upload": "<1.2.3", + "foodcoopshop/foodcoopshop": ">=3.2,<3.6.1", + "fooman/tcpdf": "<6.2.22", + "forkcms/forkcms": "<5.11.1", + "fossar/tcpdf-parser": "<6.2.22", + "francoisjacquet/rosariosis": "<=11.5.1", + "frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2", + "friendsofsymfony/oauth2-php": "<1.3", + "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", + "friendsofsymfony/user-bundle": ">=1,<1.3.5", + "friendsofsymfony1/swiftmailer": ">=4,<5.4.13|>=6,<6.2.5", + "friendsofsymfony1/symfony1": ">=1.1,<1.5.19", + "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", + "friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6", + "froala/wysiwyg-editor": "<3.2.7|>=4.0.1,<=4.1.3", + "froxlor/froxlor": "<=2.2.0.0-RC3", + "frozennode/administrator": "<=5.0.12", + "fuel/core": "<1.8.1", + "funadmin/funadmin": "<=5.0.2", + "gaoming13/wechat-php-sdk": "<=1.10.2", + "genix/cms": "<=1.1.11", + "getformwork/formwork": "<1.13.1|==2.0.0.0-beta1", + "getgrav/grav": "<1.7.46", + "getkirby/cms": "<=3.6.6.5|>=3.7,<=3.7.5.4|>=3.8,<=3.8.4.3|>=3.9,<=3.9.8.1|>=3.10,<=3.10.1|>=4,<=4.3", + "getkirby/kirby": "<=2.5.12", + "getkirby/panel": "<2.5.14", + "getkirby/starterkit": "<=3.7.0.2", + "gilacms/gila": "<=1.15.4", + "gleez/cms": "<=1.3|==2", + "globalpayments/php-sdk": "<2", + "gogentooss/samlbase": "<1.2.7", + "google/protobuf": "<3.15", + "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", + "gree/jose": "<2.2.1", + "gregwar/rst": "<1.0.3", + "grumpydictator/firefly-iii": "<6.1.17", + "gugoan/economizzer": "<=0.9.0.0-beta1", + "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", + "guzzlehttp/psr7": "<1.9.1|>=2,<2.4.5", + "haffner/jh_captcha": "<=2.1.3|>=3,<=3.0.2", + "harvesthq/chosen": "<1.8.7", + "helloxz/imgurl": "<=2.31", + "hhxsv5/laravel-s": "<3.7.36", + "hillelcoren/invoice-ninja": "<5.3.35", + "himiklab/yii2-jqgrid-widget": "<1.0.8", + "hjue/justwriting": "<=1", + "hov/jobfair": "<1.0.13|>=2,<2.0.2", + "httpsoft/http-message": "<1.0.12", + "hyn/multi-tenant": ">=5.6,<5.7.2", + "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6,<4.6.14", + "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3|>=4.5,<4.5.6|>=4.6,<4.6.2", + "ibexa/fieldtype-richtext": ">=4.6,<4.6.10", + "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3", + "ibexa/http-cache": ">=4.6,<4.6.14", + "ibexa/post-install": "<1.0.16|>=4.6,<4.6.14", + "ibexa/solr": ">=4.5,<4.5.4", + "ibexa/user": ">=4,<4.4.3", + "icecoder/icecoder": "<=8.1", + "idno/known": "<=1.3.1", + "ilicmiljan/secure-props": ">=1.2,<1.2.2", + "illuminate/auth": "<5.5.10", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<6.18.31|>=7,<7.22.4", + "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", + "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", + "imdbphp/imdbphp": "<=5.1.1", + "impresscms/impresscms": "<=1.4.5", + "impresspages/impresspages": "<=1.0.12", + "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.2.3", + "in2code/ipandlanguageredirect": "<5.1.2", + "in2code/lux": "<17.6.1|>=18,<24.0.2", + "in2code/powermail": "<7.5.1|>=8,<8.5.1|>=9,<10.9.1|>=11,<12.4.1", + "innologi/typo3-appointments": "<2.0.6", + "intelliants/subrion": "<4.2.2", + "inter-mediator/inter-mediator": "==5.5", + "ipl/web": "<0.10.1", + "islandora/islandora": ">=2,<2.4.1", + "ivankristianto/phpwhois": "<=4.3", + "jackalope/jackalope-doctrine-dbal": "<1.7.4", + "james-heinrich/getid3": "<1.9.21", + "james-heinrich/phpthumb": "<1.7.12", + "jasig/phpcas": "<1.3.3", + "jcbrand/converse.js": "<3.3.3", + "johnbillion/wp-crontrol": "<1.16.2", + "joomla/application": "<1.0.13", + "joomla/archive": "<1.1.12|>=2,<2.0.1", + "joomla/filesystem": "<1.6.2|>=2,<2.0.1", + "joomla/filter": "<1.4.4|>=2,<2.0.1", + "joomla/framework": "<1.5.7|>=2.5.4,<=3.8.12", + "joomla/input": ">=2,<2.0.2", + "joomla/joomla-cms": ">=2.5,<3.9.12", + "joomla/session": "<1.3.1", + "joyqi/hyper-down": "<=2.4.27", + "jsdecena/laracom": "<2.0.9", + "jsmitty12/phpwhois": "<5.1", + "juzaweb/cms": "<=3.4", + "jweiland/events2": "<8.3.8|>=9,<9.0.6", + "kazist/phpwhois": "<=4.2.6", + "kelvinmo/simplexrd": "<3.1.1", + "kevinpapst/kimai2": "<1.16.7", + "khodakhah/nodcms": "<=3", + "kimai/kimai": "<=2.20.1", + "kitodo/presentation": "<3.2.3|>=3.3,<3.3.4", + "klaviyo/magento2-extension": ">=1,<3", + "knplabs/knp-snappy": "<=1.4.2", + "kohana/core": "<3.3.3", + "krayin/laravel-crm": "<=1.3", + "kreait/firebase-php": ">=3.2,<3.8.1", + "kumbiaphp/kumbiapp": "<=1.1.1", + "la-haute-societe/tcpdf": "<6.2.22", + "laminas/laminas-diactoros": "<2.18.1|==2.19|==2.20|==2.21|==2.22|==2.23|>=2.24,<2.24.2|>=2.25,<2.25.2", + "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", + "laminas/laminas-http": "<2.14.2", + "lara-zeus/artemis": ">=1,<=1.0.6", + "lara-zeus/dynamic-dashboard": ">=3,<=3.0.1", + "laravel/fortify": "<1.11.1", + "laravel/framework": "<6.20.45|>=7,<7.30.7|>=8,<8.83.28|>=9,<9.52.17|>=10,<10.48.23|>=11,<11.31", + "laravel/laravel": ">=5.4,<5.4.22", + "laravel/reverb": "<1.4", + "laravel/socialite": ">=1,<2.0.10", + "latte/latte": "<2.10.8", + "lavalite/cms": "<=9|==10.1", + "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", + "league/commonmark": "<0.18.3", + "league/flysystem": "<1.1.4|>=2,<2.1.1", + "league/oauth2-server": ">=8.3.2,<8.4.2|>=8.5,<8.5.3", + "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", + "libreform/libreform": ">=2,<=2.0.8", + "librenms/librenms": "<2017.08.18", + "liftkit/database": "<2.13.2", + "lightsaml/lightsaml": "<1.3.5", + "limesurvey/limesurvey": "<6.5.12", + "livehelperchat/livehelperchat": "<=3.91", + "livewire/livewire": "<2.12.7|>=3.0.0.0-beta1,<3.5.2", + "lms/routes": "<2.1.1", + "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", + "luyadev/yii-helpers": "<1.2.1", + "maestroerror/php-heic-to-jpg": "<1.0.5", + "magento/community-edition": "<2.4.5|==2.4.5|>=2.4.5.0-patch1,<2.4.5.0-patch10|==2.4.6|>=2.4.6.0-patch1,<2.4.6.0-patch8|>=2.4.7.0-beta1,<2.4.7.0-patch3", + "magento/core": "<=1.9.4.5", + "magento/magento1ce": "<1.9.4.3-dev", + "magento/magento1ee": ">=1,<1.14.4.3-dev", + "magento/product-community-edition": "<2.4.4.0-patch9|>=2.4.5,<2.4.5.0-patch8|>=2.4.6,<2.4.6.0-patch6|>=2.4.7,<2.4.7.0-patch1", + "magneto/core": "<1.9.4.4-dev", + "maikuolan/phpmussel": ">=1,<1.6", + "mainwp/mainwp": "<=4.4.3.3", + "mantisbt/mantisbt": "<=2.26.3", + "marcwillmann/turn": "<0.3.3", + "matyhtf/framework": "<3.0.6", + "mautic/core": "<4.4.13|>=5,<5.1.1", + "mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1", + "maximebf/debugbar": "<1.19", + "mdanter/ecc": "<2", + "mediawiki/abuse-filter": "<1.39.9|>=1.40,<1.41.3|>=1.42,<1.42.2", + "mediawiki/cargo": "<3.6.1", + "mediawiki/core": "<1.39.5|==1.40", + "mediawiki/matomo": "<2.4.3", + "mediawiki/semantic-media-wiki": "<4.0.2", + "melisplatform/melis-asset-manager": "<5.0.1", + "melisplatform/melis-cms": "<5.0.1", + "melisplatform/melis-front": "<5.0.1", + "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", + "mgallegos/laravel-jqgrid": "<=1.3", + "microsoft/microsoft-graph": ">=1.16,<1.109.1|>=2,<2.0.1", + "microsoft/microsoft-graph-beta": "<2.0.1", + "microsoft/microsoft-graph-core": "<2.0.2", + "microweber/microweber": "<=2.0.16", + "mikehaertl/php-shellcommand": "<1.6.1", + "miniorange/miniorange-saml": "<1.4.3", + "mittwald/typo3_forum": "<1.2.1", + "mobiledetect/mobiledetectlib": "<2.8.32", + "modx/revolution": "<=2.8.3.0-patch", + "mojo42/jirafeau": "<4.4", + "mongodb/mongodb": ">=1,<1.9.2", + "monolog/monolog": ">=1.8,<1.12", + "moodle/moodle": "<4.3.8|>=4.4,<4.4.4", + "mos/cimage": "<0.7.19", + "movim/moxl": ">=0.8,<=0.10", + "movingbytes/social-network": "<=1.2.1", + "mpdf/mpdf": "<=7.1.7", + "munkireport/comment": "<4.1", + "munkireport/managedinstalls": "<2.6", + "munkireport/munki_facts": "<1.5", + "munkireport/munkireport": ">=2.5.3,<5.6.3", + "munkireport/reportdata": "<3.5", + "munkireport/softwareupdate": "<1.6", + "mustache/mustache": ">=2,<2.14.1", + "namshi/jose": "<2.2", + "nategood/httpful": "<1", + "neoan3-apps/template": "<1.1.1", + "neorazorx/facturascripts": "<2022.04", + "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", + "neos/media-browser": "<7.3.19|>=8,<8.0.16|>=8.1,<8.1.11|>=8.2,<8.2.11|>=8.3,<8.3.9", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2", + "neos/swiftmailer": "<5.4.5", + "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", + "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", + "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", + "nilsteampassnet/teampass": "<3.0.10", + "nonfiction/nterchange": "<4.1.1", + "notrinos/notrinos-erp": "<=0.7", + "noumo/easyii": "<=0.9", + "novaksolutions/infusionsoft-php-sdk": "<1", + "nukeviet/nukeviet": "<4.5.02", + "nyholm/psr7": "<1.6.1", + "nystudio107/craft-seomatic": "<3.4.12", + "nzedb/nzedb": "<0.8", + "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", + "october/backend": "<1.1.2", + "october/cms": "<1.0.469|==1.0.469|==1.0.471|==1.1.1", + "october/october": "<=3.6.4", + "october/rain": "<1.0.472|>=1.1,<1.1.2", + "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.5.15", + "omeka/omeka-s": "<4.0.3", + "onelogin/php-saml": "<2.10.4", + "oneup/uploader-bundle": ">=1,<1.9.3|>=2,<2.1.5", + "open-web-analytics/open-web-analytics": "<1.7.4", + "opencart/opencart": ">=0", + "openid/php-openid": "<2.3", + "openmage/magento-lts": "<20.10.1", + "opensolutions/vimbadmin": "<=3.0.15", + "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2", + "orchid/platform": ">=8,<14.43", + "oro/calendar-bundle": ">=4.2,<=4.2.6|>=5,<=5.0.6|>=5.1,<5.1.1", + "oro/commerce": ">=4.1,<5.0.11|>=5.1,<5.1.1", + "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", + "oro/crm-call-bundle": ">=4.2,<=4.2.5|>=5,<5.0.4|>=5.1,<5.1.1", + "oro/customer-portal": ">=4.1,<=4.1.13|>=4.2,<=4.2.10|>=5,<=5.0.11|>=5.1,<=5.1.3", + "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<=4.2.10|>=5,<=5.0.12|>=5.1,<=5.1.3", + "oveleon/contao-cookiebar": "<1.16.3|>=2,<2.1.3", + "oxid-esales/oxideshop-ce": "<4.5", + "oxid-esales/paymorrow-module": ">=1,<1.0.2|>=2,<2.0.1", + "packbackbooks/lti-1-3-php-library": "<5", + "padraic/humbug_get_contents": "<1.1.2", + "pagarme/pagarme-php": "<3", + "pagekit/pagekit": "<=1.0.18", + "paragonie/ecc": "<2.0.1", + "paragonie/random_compat": "<2", + "passbolt/passbolt_api": "<4.6.2", + "paypal/adaptivepayments-sdk-php": "<=3.9.2", + "paypal/invoice-sdk-php": "<=3.9", + "paypal/merchant-sdk-php": "<3.12", + "paypal/permissions-sdk-php": "<=3.9.1", + "pear/archive_tar": "<1.4.14", + "pear/auth": "<1.2.4", + "pear/crypt_gpg": "<1.6.7", + "pear/pear": "<=1.10.1", + "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", + "personnummer/personnummer": "<3.0.2", + "phanan/koel": "<5.1.4", + "phenx/php-svg-lib": "<0.5.2", + "php-censor/php-censor": "<2.0.13|>=2.1,<2.1.5", + "php-mod/curl": "<2.3.2", + "phpbb/phpbb": "<3.3.11", + "phpems/phpems": ">=6,<=6.1.3", + "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", + "phpmailer/phpmailer": "<6.5", + "phpmussel/phpmussel": ">=1,<1.6", + "phpmyadmin/phpmyadmin": "<5.2.1", + "phpmyfaq/phpmyfaq": "<3.2.5|==3.2.5", + "phpoffice/common": "<0.2.9", + "phpoffice/phpexcel": "<1.8.1", + "phpoffice/phpspreadsheet": "<1.29.4|>=2,<2.1.3|>=2.2,<2.3.2|>=3.3,<3.4", + "phpseclib/phpseclib": "<2.0.47|>=3,<3.0.36", + "phpservermon/phpservermon": "<3.6", + "phpsysinfo/phpsysinfo": "<3.4.3", + "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", + "phpwhois/phpwhois": "<=4.2.5", + "phpxmlrpc/extras": "<0.6.1", + "phpxmlrpc/phpxmlrpc": "<4.9.2", + "pi/pi": "<=2.5", + "pimcore/admin-ui-classic-bundle": "<1.5.4", + "pimcore/customer-management-framework-bundle": "<4.0.6", + "pimcore/data-hub": "<1.2.4", + "pimcore/data-importer": "<1.8.9|>=1.9,<1.9.3", + "pimcore/demo": "<10.3", + "pimcore/ecommerce-framework-bundle": "<1.0.10", + "pimcore/perspective-editor": "<1.5.1", + "pimcore/pimcore": "<11.2.4", + "pixelfed/pixelfed": "<0.11.11", + "plotly/plotly.js": "<2.25.2", + "pocketmine/bedrock-protocol": "<8.0.2", + "pocketmine/pocketmine-mp": "<5.11.2", + "pocketmine/raklib": ">=0.14,<0.14.6|>=0.15,<0.15.1", + "pressbooks/pressbooks": "<5.18", + "prestashop/autoupgrade": ">=4,<4.10.1", + "prestashop/blockreassurance": "<=5.1.3", + "prestashop/blockwishlist": ">=2,<2.1.1", + "prestashop/contactform": ">=1.0.1,<4.3", + "prestashop/gamification": "<2.3.2", + "prestashop/prestashop": "<8.1.6", + "prestashop/productcomments": "<5.0.2", + "prestashop/ps_emailsubscription": "<2.6.1", + "prestashop/ps_facetedsearch": "<3.4.1", + "prestashop/ps_linklist": "<3.1", + "privatebin/privatebin": "<1.4|>=1.5,<1.7.4", + "processwire/processwire": "<=3.0.229", + "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7", + "propel/propel1": ">=1,<=1.7.1", + "pterodactyl/panel": "<1.11.8", + "ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2", + "ptrofimov/beanstalk_console": "<1.7.14", + "pubnub/pubnub": "<6.1", + "pusher/pusher-php-server": "<2.2.1", + "pwweb/laravel-core": "<=0.3.6.0-beta", + "pxlrbt/filament-excel": "<1.1.14|>=2.0.0.0-alpha,<2.3.3", + "pyrocms/pyrocms": "<=3.9.1", + "qcubed/qcubed": "<=3.1.1", + "quickapps/cms": "<=2.0.0.0-beta2", + "rainlab/blog-plugin": "<1.4.1", + "rainlab/debugbar-plugin": "<3.1", + "rainlab/user-plugin": "<=1.4.5", + "rankmath/seo-by-rank-math": "<=1.0.95", + "rap2hpoutre/laravel-log-viewer": "<0.13", + "react/http": ">=0.7,<1.9", + "really-simple-plugins/complianz-gdpr": "<6.4.2", + "redaxo/source": "<5.18", + "remdex/livehelperchat": "<4.29", + "reportico-web/reportico": "<=8.1", + "rhukster/dom-sanitizer": "<1.0.7", + "rmccue/requests": ">=1.6,<1.8", + "robrichards/xmlseclibs": ">=1,<3.0.4", + "roots/soil": "<4.1", + "rudloff/alltube": "<3.0.3", + "s-cart/core": "<6.9", + "s-cart/s-cart": "<6.9", + "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", + "sabre/dav": ">=1.6,<1.7.11|>=1.8,<1.8.9", + "samwilson/unlinked-wikibase": "<1.39.6|>=1.40,<1.40.2|>=1.41,<1.41.1", + "scheb/two-factor-bundle": "<3.26|>=4,<4.11", + "sensiolabs/connect": "<4.2.3", + "serluck/phpwhois": "<=4.2.6", + "sfroemken/url_redirect": "<=1.2.1", + "sheng/yiicms": "<=1.2", + "shopware/core": "<=6.5.8.12|>=6.6,<=6.6.5", + "shopware/platform": "<=6.5.8.12|>=6.6,<=6.6.5", + "shopware/production": "<=6.3.5.2", + "shopware/shopware": "<=5.7.17", + "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", + "shopxo/shopxo": "<=6.1", + "showdoc/showdoc": "<2.10.4", + "silverstripe-australia/advancedreports": ">=1,<=2", + "silverstripe/admin": "<1.13.19|>=2,<2.1.8", + "silverstripe/assets": ">=1,<1.11.1", + "silverstripe/cms": "<4.11.3", + "silverstripe/comments": ">=1.3,<3.1.1", + "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", + "silverstripe/framework": "<5.2.16", + "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.8.2|>=4,<4.3.7|>=5,<5.1.3", + "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", + "silverstripe/recipe-cms": ">=4.5,<4.5.3", + "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", + "silverstripe/reports": "<5.2.3", + "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4|>=2.1,<2.1.2", + "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", + "silverstripe/subsites": ">=2,<2.6.1", + "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", + "silverstripe/userforms": "<3|>=5,<5.4.2", + "silverstripe/versioned-admin": ">=1,<1.11.1", + "simple-updates/phpwhois": "<=1", + "simplesamlphp/saml2": "<4.6.14|==5.0.0.0-alpha12", + "simplesamlphp/saml2-legacy": "<4.6.14", + "simplesamlphp/simplesamlphp": "<1.18.6", + "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "simplesamlphp/simplesamlphp-module-openid": "<1", + "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", + "simplesamlphp/xml-common": "<1.20", + "simplesamlphp/xml-security": "==1.6.11", + "simplito/elliptic-php": "<1.0.6", + "sitegeist/fluid-components": "<3.5", + "sjbr/sr-freecap": "<2.4.6|>=2.5,<2.5.3", + "slim/psr7": "<1.4.1|>=1.5,<1.5.1|>=1.6,<1.6.1", + "slim/slim": "<2.6", + "slub/slub-events": "<3.0.3", + "smarty/smarty": "<4.5.3|>=5,<5.1.1", + "snipe/snipe-it": "<=7.0.13", + "socalnick/scn-social-auth": "<1.15.2", + "socialiteproviders/steam": "<1.1", + "spatie/browsershot": "<3.57.4", + "spatie/image-optimizer": "<1.7.3", + "spencer14420/sp-php-email-handler": "<1", + "spipu/html2pdf": "<5.2.8", + "spoon/library": "<1.4.1", + "spoonity/tcpdf": "<6.2.22", + "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", + "ssddanbrown/bookstack": "<24.05.1", + "starcitizentools/citizen-skin": ">=2.6.3,<2.31", + "statamic/cms": "<=5.16", + "stormpath/sdk": "<9.9.99", + "studio-42/elfinder": "<=2.1.64", + "studiomitte/friendlycaptcha": "<0.1.4", + "subhh/libconnect": "<7.0.8|>=8,<8.1", + "sukohi/surpass": "<1", + "sulu/form-bundle": ">=2,<2.5.3", + "sulu/sulu": "<1.6.44|>=2,<2.5.21|>=2.6,<2.6.5", + "sumocoders/framework-user-bundle": "<1.4", + "superbig/craft-audit": "<3.0.2", + "swag/paypal": "<5.4.4", + "swiftmailer/swiftmailer": "<6.2.5", + "swiftyedit/swiftyedit": "<1.2", + "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", + "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/grid-bundle": "<1.10.1", + "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", + "sylius/resource-bundle": ">=1,<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", + "sylius/sylius": "<1.12.19|>=1.13.0.0-alpha1,<1.13.4", + "symbiote/silverstripe-multivaluefield": ">=3,<3.1", + "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", + "symbiote/silverstripe-seed": "<6.0.3", + "symbiote/silverstripe-versionedfiles": "<=2.0.3", + "symfont/process": ">=0", + "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", + "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", + "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<5.3.15|>=5.4.3,<5.4.4|>=6.0.3,<6.0.4", + "symfony/http-client": ">=4.3,<5.4.47|>=6,<6.4.15|>=7,<7.1.8", + "symfony/http-foundation": "<5.4.46|>=6,<6.4.14|>=7,<7.1.7", + "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", + "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", + "symfony/mime": ">=4.3,<4.3.8", + "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/polyfill": ">=1,<1.10", + "symfony/polyfill-php55": ">=1,<1.10", + "symfony/process": "<5.4.46|>=6,<6.4.14|>=7,<7.1.7", + "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/routing": ">=2,<2.0.19", + "symfony/runtime": ">=5.3,<5.4.46|>=6,<6.4.14|>=7,<7.1.7", + "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", + "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.4.10|>=7,<7.0.10|>=7.1,<7.1.3", + "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", + "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.4.47|>=6,<6.4.15|>=7,<7.1.8", + "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", + "symfony/symfony": "<5.4.47|>=6,<6.4.15|>=7,<7.1.8", + "symfony/translation": ">=2,<2.0.17", + "symfony/twig-bridge": ">=2,<4.4.51|>=5,<5.4.31|>=6,<6.3.8", + "symfony/ux-autocomplete": "<2.11.2", + "symfony/validator": "<5.4.43|>=6,<6.4.11|>=7,<7.1.4", + "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", + "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", + "symfony/webhook": ">=6.3,<6.3.8", + "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7|>=2.2.0.0-beta1,<2.2.0.0-beta2", + "symphonycms/symphony-2": "<2.6.4", + "t3/dce": "<0.11.5|>=2.2,<2.6.2", + "t3g/svg-sanitizer": "<1.0.3", + "t3s/content-consent": "<1.0.3|>=2,<2.0.2", + "tastyigniter/tastyigniter": "<3.3", + "tcg/voyager": "<=1.4", + "tecnickcom/tcpdf": "<=6.7.5", + "terminal42/contao-tablelookupwizard": "<3.3.5", + "thelia/backoffice-default-template": ">=2.1,<2.1.2", + "thelia/thelia": ">=2.1,<2.1.3", + "theonedemon/phpwhois": "<=4.2.5", + "thinkcmf/thinkcmf": "<6.0.8", + "thorsten/phpmyfaq": "<4", + "tikiwiki/tiki-manager": "<=17.1", + "timber/timber": ">=0.16.6,<1.23.1|>=1.24,<1.24.1|>=2,<2.1", + "tinymce/tinymce": "<7.2", + "tinymighty/wiki-seo": "<1.2.2", + "titon/framework": "<9.9.99", + "tobiasbg/tablepress": "<=2.0.0.0-RC1", + "topthink/framework": "<6.0.17|>=6.1,<=8.0.4", + "topthink/think": "<=6.1.1", + "topthink/thinkphp": "<=3.2.3|>=6.1.3,<=8.0.4", + "torrentpier/torrentpier": "<=2.4.3", + "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", + "tribalsystems/zenario": "<=9.7.61188", + "truckersmp/phpwhois": "<=4.3.1", + "ttskch/pagination-service-provider": "<1", + "twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2", + "twig/twig": "<3.11.2|>=3.12,<3.14.1", + "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", + "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<10.4.46|>=11,<11.5.40|>=12,<12.4.21|>=13,<13.3.1", + "typo3/cms-core": "<=8.7.56|>=9,<=9.5.47|>=10,<=10.4.44|>=11,<=11.5.36|>=12,<=12.4.14|>=13,<=13.1", + "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1", + "typo3/cms-fluid": "<4.3.4|>=4.4,<4.4.1", + "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/cms-frontend": "<4.3.9|>=4.4,<4.4.5", + "typo3/cms-install": "<4.1.14|>=4.2,<4.2.16|>=4.3,<4.3.9|>=4.4,<4.4.5|>=12.2,<12.4.8", + "typo3/cms-rte-ckeditor": ">=9.5,<9.5.42|>=10,<10.4.39|>=11,<11.5.30", + "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "typo3/html-sanitizer": ">=1,<=1.5.2|>=2,<=2.1.3", + "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", + "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", + "ua-parser/uap-php": "<3.8", + "uasoft-indonesia/badaso": "<=2.9.7", + "unisharp/laravel-filemanager": "<2.6.4", + "unopim/unopim": "<0.1.5", + "userfrosting/userfrosting": ">=0.3.1,<4.6.3", + "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", + "uvdesk/community-skeleton": "<=1.1.1", + "uvdesk/core-framework": "<=1.1.1", + "vanilla/safecurl": "<0.9.2", + "verbb/comments": "<1.5.5", + "verbb/formie": "<2.1.6", + "verbb/image-resizer": "<2.0.9", + "verbb/knock-knock": "<1.2.8", + "verot/class.upload.php": "<=2.1.6", + "villagedefrance/opencart-overclocked": "<=1.11.1", + "vova07/yii2-fileapi-widget": "<0.1.9", + "vrana/adminer": "<4.8.1", + "vufind/vufind": ">=2,<9.1.1", + "waldhacker/hcaptcha": "<2.1.2", + "wallabag/tcpdf": "<6.2.22", + "wallabag/wallabag": "<2.6.7", + "wanglelecc/laracms": "<=1.0.3", + "web-auth/webauthn-framework": ">=3.3,<3.3.4|>=4.5,<4.9", + "web-auth/webauthn-lib": ">=4.5,<4.9", + "web-feet/coastercms": "==5.5", + "webbuilders-group/silverstripe-kapost-bridge": "<0.4", + "webcoast/deferred-image-processing": "<1.0.2", + "webklex/laravel-imap": "<5.3", + "webklex/php-imap": "<5.3", + "webpa/webpa": "<3.1.2", + "wikibase/wikibase": "<=1.39.3", + "wikimedia/parsoid": "<0.12.2", + "willdurand/js-translation-bundle": "<2.1.1", + "winter/wn-backend-module": "<1.2.4", + "winter/wn-dusk-plugin": "<2.1", + "winter/wn-system-module": "<1.2.4", + "wintercms/winter": "<=1.2.3", + "wireui/wireui": "<1.19.3|>=2,<2.1.3", + "woocommerce/woocommerce": "<6.6|>=8.8,<8.8.5|>=8.9,<8.9.3", + "wp-cli/wp-cli": ">=0.12,<2.5", + "wp-graphql/wp-graphql": "<=1.14.5", + "wp-premium/gravityforms": "<2.4.21", + "wpanel/wpanel4-cms": "<=4.3.1", + "wpcloud/wp-stateless": "<3.2", + "wpglobus/wpglobus": "<=1.9.6", + "wwbn/avideo": "<14.3", + "xataface/xataface": "<3", + "xpressengine/xpressengine": "<3.0.15", + "yab/quarx": "<2.4.5", + "yeswiki/yeswiki": "<=4.4.4", + "yetiforce/yetiforce-crm": "<=6.4", + "yidashi/yii2cmf": "<=2", + "yii2mod/yii2-cms": "<1.9.2", + "yiisoft/yii": "<1.1.29", + "yiisoft/yii2": "<2.0.49.4-dev", + "yiisoft/yii2-authclient": "<2.2.15", + "yiisoft/yii2-bootstrap": "<2.0.4", + "yiisoft/yii2-dev": "<2.0.43", + "yiisoft/yii2-elasticsearch": "<2.0.5", + "yiisoft/yii2-gii": "<=2.2.4", + "yiisoft/yii2-jui": "<2.0.4", + "yiisoft/yii2-redis": "<2.0.8", + "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6", + "yoast-seo-for-typo3/yoast_seo": "<7.2.3", + "yourls/yourls": "<=1.8.2", + "yuan1994/tpadmin": "<=1.3.12", + "zencart/zencart": "<=1.5.7.0-beta", + "zendesk/zendesk_api_client_php": "<2.2.11", + "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", + "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-db": "<2.2.10|>=2.3,<2.3.5", + "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", + "zendframework/zend-diactoros": "<1.8.4", + "zendframework/zend-feed": "<2.10.3", + "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-http": "<2.8.1", + "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", + "zendframework/zend-mail": "<2.4.11|>=2.5,<2.7.2", + "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-session": ">=2,<2.2.9|>=2.3,<2.3.4", + "zendframework/zend-validator": ">=2.3,<2.3.6", + "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zendframework": "<=3", + "zendframework/zendframework1": "<1.12.20", + "zendframework/zendopenid": "<2.0.2", + "zendframework/zendrest": "<2.0.2", + "zendframework/zendservice-amazon": "<2.0.3", + "zendframework/zendservice-api": "<1", + "zendframework/zendservice-audioscrobbler": "<2.0.2", + "zendframework/zendservice-nirvanix": "<2.0.2", + "zendframework/zendservice-slideshare": "<2.0.2", + "zendframework/zendservice-technorati": "<2.0.2", + "zendframework/zendservice-windowsazure": "<2.0.2", + "zendframework/zendxml": ">=1,<1.0.1", + "zenstruck/collection": "<0.2.1", + "zetacomponents/mail": "<1.8.2", + "zf-commons/zfc-user": "<1.2.2", + "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", + "zfr/zfr-oauth2-server-module": "<0.1.2", + "zoujingli/thinkadmin": "<=6.1.53" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "role": "maintainer" + }, + { + "name": "Ilya Tribusean", + "email": "slash3b@gmail.com", + "role": "maintainer" + } + ], + "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", + "keywords": [ + "dev" + ], + "support": { + "issues": "https://github.com/Roave/SecurityAdvisories/issues", + "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", + "type": "tidelift" + } + ], + "time": "2024-12-06T23:05:03+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:44:28+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739", + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-31T05:30:08+00:00" + }, + { + "name": "sebastian/complexity", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:49:50+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "sebastian/environment", + "version": "7.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:54:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "6.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-12-05T09:17:50+00:00" + }, + { + "name": "sebastian/global-state", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:57:36+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:58:38+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:00:13+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:01:32+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:10:34+00:00" + }, + { + "name": "sebastian/type", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-09-17T13:12:04+00:00" + }, + { + "name": "sebastian/version", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.11.1", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-11-16T12:02:36+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "symfony/config", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/bcd3c4adf0144dee5011bb35454728c38adec055", + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^7.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-04T11:36:24+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "a475747af1a1c98272a5471abc35f3da81197c5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a475747af1a1c98272a5471abc35f3da81197c5d", + "reference": "a475747af1a1c98272a5471abc35f3da81197c5d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^3.5", + "symfony/var-exporter": "^6.4|^7.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "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": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-25T15:45:00+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "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": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-10-25T15:15:23+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c6a22929407dec8765d6e2b6ff85b800b245879c", + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.12" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "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": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-08T15:48:14+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d", + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "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": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-10-18T07:58:17+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": { + "roave/security-advisories": 20 + }, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.3", + "ext-curl": "*", + "ext-json": "*" + }, + "platform-dev": { + "ext-simplexml": "*" + }, + "plugin-api-version": "2.3.0" +} From 95971d035ef1a9ae901bb436dbcc13cafda278c9 Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 12:47:28 +0100 Subject: [PATCH 07/46] Removed: build dir --- build/guzzle/src/Client.php | 345 --------- build/guzzle/src/ClientInterface.php | 79 --- build/guzzle/src/Cookie/CookieJar.php | 245 ------- .../guzzle/src/Cookie/CookieJarInterface.php | 76 -- build/guzzle/src/Cookie/FileCookieJar.php | 84 --- build/guzzle/src/Cookie/SessionCookieJar.php | 67 -- build/guzzle/src/Cookie/SetCookie.php | 343 --------- .../src/Exception/BadResponseException.php | 19 - .../guzzle/src/Exception/ClientException.php | 10 - .../guzzle/src/Exception/ConnectException.php | 31 - .../guzzle/src/Exception/GuzzleException.php | 23 - .../Exception/InvalidArgumentException.php | 7 - .../guzzle/src/Exception/RequestException.php | 165 ----- build/guzzle/src/Exception/SeekException.php | 25 - .../guzzle/src/Exception/ServerException.php | 10 - .../Exception/TooManyRedirectsException.php | 7 - .../src/Exception/TransferException.php | 7 - build/guzzle/src/Handler/CurlFactory.php | 433 ------------ .../src/Handler/CurlFactoryInterface.php | 26 - build/guzzle/src/Handler/CurlHandler.php | 39 -- build/guzzle/src/Handler/CurlMultiHandler.php | 166 ----- build/guzzle/src/Handler/EasyHandle.php | 67 -- build/guzzle/src/Handler/MockHandler.php | 153 ---- build/guzzle/src/Handler/Proxy.php | 46 -- build/guzzle/src/Handler/StreamHandler.php | 376 ---------- build/guzzle/src/HandlerStack.php | 239 ------- build/guzzle/src/MessageFormatter.php | 151 ---- build/guzzle/src/Middleware.php | 221 ------ build/guzzle/src/Pool.php | 106 --- build/guzzle/src/PrepareBodyMiddleware.php | 86 --- build/guzzle/src/RedirectMiddleware.php | 160 ----- build/guzzle/src/RequestOptions.php | 228 ------ build/guzzle/src/RetryMiddleware.php | 86 --- build/guzzle/src/TransferStats.php | 110 --- build/guzzle/src/UriTemplate.php | 191 ----- build/guzzle/src/functions.php | 305 -------- build/guzzle/src/functions_include.php | 8 - build/promises/src/AggregateException.php | 14 - build/promises/src/CancellationException.php | 10 - build/promises/src/Coroutine.php | 135 ---- build/promises/src/EachPromise.php | 190 ----- build/promises/src/FulfilledPromise.php | 69 -- build/promises/src/Promise.php | 231 ------ build/promises/src/PromiseInterface.php | 84 --- build/promises/src/PromisorInterface.php | 16 - build/promises/src/RejectedPromise.php | 74 -- build/promises/src/RejectionException.php | 40 -- build/promises/src/TaskQueue.php | 62 -- build/promises/src/TaskQueueInterface.php | 24 - build/promises/src/functions.php | 387 ----------- build/promises/src/functions_include.php | 8 - build/psr7/src/AppendStream.php | 202 ------ build/psr7/src/BufferStream.php | 114 --- build/psr7/src/CachingStream.php | 115 --- build/psr7/src/DroppingStream.php | 36 - build/psr7/src/FnStream.php | 132 ---- build/psr7/src/InflateStream.php | 48 -- build/psr7/src/LazyOpenStream.php | 35 - build/psr7/src/LimitStream.php | 128 ---- build/psr7/src/MessageTrait.php | 171 ----- build/psr7/src/MultipartStream.php | 123 ---- build/psr7/src/NoSeekStream.php | 20 - build/psr7/src/PumpStream.php | 140 ---- build/psr7/src/Request.php | 120 ---- build/psr7/src/Response.php | 76 -- build/psr7/src/Rfc7230.php | 18 - build/psr7/src/ServerRequest.php | 302 -------- build/psr7/src/Stream.php | 221 ------ build/psr7/src/StreamDecoratorTrait.php | 128 ---- build/psr7/src/StreamWrapper.php | 102 --- build/psr7/src/UploadedFile.php | 244 ------- build/psr7/src/Uri.php | 598 ---------------- build/psr7/src/UriNormalizer.php | 179 ----- build/psr7/src/UriResolver.php | 190 ----- build/psr7/src/functions.php | 657 ------------------ build/psr7/src/functions_include.php | 8 - 76 files changed, 10191 deletions(-) delete mode 100644 build/guzzle/src/Client.php delete mode 100644 build/guzzle/src/ClientInterface.php delete mode 100644 build/guzzle/src/Cookie/CookieJar.php delete mode 100644 build/guzzle/src/Cookie/CookieJarInterface.php delete mode 100644 build/guzzle/src/Cookie/FileCookieJar.php delete mode 100644 build/guzzle/src/Cookie/SessionCookieJar.php delete mode 100644 build/guzzle/src/Cookie/SetCookie.php delete mode 100644 build/guzzle/src/Exception/BadResponseException.php delete mode 100644 build/guzzle/src/Exception/ClientException.php delete mode 100644 build/guzzle/src/Exception/ConnectException.php delete mode 100644 build/guzzle/src/Exception/GuzzleException.php delete mode 100644 build/guzzle/src/Exception/InvalidArgumentException.php delete mode 100644 build/guzzle/src/Exception/RequestException.php delete mode 100644 build/guzzle/src/Exception/SeekException.php delete mode 100644 build/guzzle/src/Exception/ServerException.php delete mode 100644 build/guzzle/src/Exception/TooManyRedirectsException.php delete mode 100644 build/guzzle/src/Exception/TransferException.php delete mode 100644 build/guzzle/src/Handler/CurlFactory.php delete mode 100644 build/guzzle/src/Handler/CurlFactoryInterface.php delete mode 100644 build/guzzle/src/Handler/CurlHandler.php delete mode 100644 build/guzzle/src/Handler/CurlMultiHandler.php delete mode 100644 build/guzzle/src/Handler/EasyHandle.php delete mode 100644 build/guzzle/src/Handler/MockHandler.php delete mode 100644 build/guzzle/src/Handler/Proxy.php delete mode 100644 build/guzzle/src/Handler/StreamHandler.php delete mode 100644 build/guzzle/src/HandlerStack.php delete mode 100644 build/guzzle/src/MessageFormatter.php delete mode 100644 build/guzzle/src/Middleware.php delete mode 100644 build/guzzle/src/Pool.php delete mode 100644 build/guzzle/src/PrepareBodyMiddleware.php delete mode 100644 build/guzzle/src/RedirectMiddleware.php delete mode 100644 build/guzzle/src/RequestOptions.php delete mode 100644 build/guzzle/src/RetryMiddleware.php delete mode 100644 build/guzzle/src/TransferStats.php delete mode 100644 build/guzzle/src/UriTemplate.php delete mode 100644 build/guzzle/src/functions.php delete mode 100644 build/guzzle/src/functions_include.php delete mode 100644 build/promises/src/AggregateException.php delete mode 100644 build/promises/src/CancellationException.php delete mode 100644 build/promises/src/Coroutine.php delete mode 100644 build/promises/src/EachPromise.php delete mode 100644 build/promises/src/FulfilledPromise.php delete mode 100644 build/promises/src/Promise.php delete mode 100644 build/promises/src/PromiseInterface.php delete mode 100644 build/promises/src/PromisorInterface.php delete mode 100644 build/promises/src/RejectedPromise.php delete mode 100644 build/promises/src/RejectionException.php delete mode 100644 build/promises/src/TaskQueue.php delete mode 100644 build/promises/src/TaskQueueInterface.php delete mode 100644 build/promises/src/functions.php delete mode 100644 build/promises/src/functions_include.php delete mode 100644 build/psr7/src/AppendStream.php delete mode 100644 build/psr7/src/BufferStream.php delete mode 100644 build/psr7/src/CachingStream.php delete mode 100644 build/psr7/src/DroppingStream.php delete mode 100644 build/psr7/src/FnStream.php delete mode 100644 build/psr7/src/InflateStream.php delete mode 100644 build/psr7/src/LazyOpenStream.php delete mode 100644 build/psr7/src/LimitStream.php delete mode 100644 build/psr7/src/MessageTrait.php delete mode 100644 build/psr7/src/MultipartStream.php delete mode 100644 build/psr7/src/NoSeekStream.php delete mode 100644 build/psr7/src/PumpStream.php delete mode 100644 build/psr7/src/Request.php delete mode 100644 build/psr7/src/Response.php delete mode 100644 build/psr7/src/Rfc7230.php delete mode 100644 build/psr7/src/ServerRequest.php delete mode 100644 build/psr7/src/Stream.php delete mode 100644 build/psr7/src/StreamDecoratorTrait.php delete mode 100644 build/psr7/src/StreamWrapper.php delete mode 100644 build/psr7/src/UploadedFile.php delete mode 100644 build/psr7/src/Uri.php delete mode 100644 build/psr7/src/UriNormalizer.php delete mode 100644 build/psr7/src/UriResolver.php delete mode 100644 build/psr7/src/functions.php delete mode 100644 build/psr7/src/functions_include.php diff --git a/build/guzzle/src/Client.php b/build/guzzle/src/Client.php deleted file mode 100644 index 7c47b81..0000000 --- a/build/guzzle/src/Client.php +++ /dev/null @@ -1,345 +0,0 @@ - 'http://www.foo.com/1.0/', - * 'timeout' => 0, - * 'allow_redirects' => false, - * 'proxy' => '192.168.16.1:10' - * ]); - * - * Client configuration settings include the following options: - * - * - handler: (callable) Function that transfers HTTP requests over the - * wire. The function is called with a Psr7\Http\Message\RequestInterface - * and array of transfer options, and must return a - * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a - * Psr7\Http\Message\ResponseInterface on success. "handler" is a - * constructor only option that cannot be overridden in per/request - * options. If no handler is provided, a default handler will be created - * that enables all of the request options below by attaching all of the - * default middleware to the handler. - * - base_uri: (string|UriInterface) Base URI of the client that is merged - * into relative URIs. Can be a string or instance of UriInterface. - * - **: any request option - * - * @param array $config Client configuration settings. - * - * @see \GuzzleHttp\RequestOptions for a list of available request options. - */ - public function __construct(array $config = []) - { - if (!isset($config['handler'])) { - $config['handler'] = \PayNL\GuzzleHttp\HandlerStack::create(); - } elseif (!\is_callable($config['handler'])) { - throw new \InvalidArgumentException('handler must be a callable'); - } - // Convert the base_uri to a UriInterface - if (isset($config['base_uri'])) { - $config['base_uri'] = \PayNL\GuzzleHttp\Psr7\uri_for($config['base_uri']); - } - $this->configureDefaults($config); - } - public function __call($method, $args) - { - if (\count($args) < 1) { - throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); - } - $uri = $args[0]; - $opts = isset($args[1]) ? $args[1] : []; - return \substr($method, -5) === 'Async' ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) : $this->request($method, $uri, $opts); - } - public function sendAsync(\Psr\Http\Message\RequestInterface $request, array $options = []) - { - // Merge the base URI into the request URI if needed. - $options = $this->prepareDefaults($options); - return $this->transfer($request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), $options); - } - public function send(\Psr\Http\Message\RequestInterface $request, array $options = []) - { - $options[\PayNL\GuzzleHttp\RequestOptions::SYNCHRONOUS] = \true; - return $this->sendAsync($request, $options)->wait(); - } - public function requestAsync($method, $uri = '', array $options = []) - { - $options = $this->prepareDefaults($options); - // Remove request modifying parameter because it can be done up-front. - $headers = isset($options['headers']) ? $options['headers'] : []; - $body = isset($options['body']) ? $options['body'] : null; - $version = isset($options['version']) ? $options['version'] : '1.1'; - // Merge the URI into the base URI. - $uri = $this->buildUri($uri, $options); - if (\is_array($body)) { - $this->invalidBody(); - } - $request = new \PayNL\GuzzleHttp\Psr7\Request($method, $uri, $headers, $body, $version); - // Remove the option so that they are not doubly-applied. - unset($options['headers'], $options['body'], $options['version']); - return $this->transfer($request, $options); - } - public function request($method, $uri = '', array $options = []) - { - $options[\PayNL\GuzzleHttp\RequestOptions::SYNCHRONOUS] = \true; - return $this->requestAsync($method, $uri, $options)->wait(); - } - public function getConfig($option = null) - { - return $option === null ? $this->config : (isset($this->config[$option]) ? $this->config[$option] : null); - } - private function buildUri($uri, array $config) - { - // for BC we accept null which would otherwise fail in uri_for - $uri = \PayNL\GuzzleHttp\Psr7\uri_for($uri === null ? '' : $uri); - if (isset($config['base_uri'])) { - $uri = \PayNL\GuzzleHttp\Psr7\UriResolver::resolve(\PayNL\GuzzleHttp\Psr7\uri_for($config['base_uri']), $uri); - } - return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; - } - /** - * Configures the default options for a client. - * - * @param array $config - */ - private function configureDefaults(array $config) - { - $defaults = ['allow_redirects' => \PayNL\GuzzleHttp\RedirectMiddleware::$defaultSettings, 'http_errors' => \true, 'decode_content' => \true, 'verify' => \true, 'cookies' => \false]; - // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. - // We can only trust the HTTP_PROXY environment variable in a CLI - // process due to the fact that PHP has no reliable mechanism to - // get environment variables that start with "HTTP_". - if (\php_sapi_name() == 'cli' && \getenv('HTTP_PROXY')) { - $defaults['proxy']['http'] = \getenv('HTTP_PROXY'); - } - if ($proxy = \getenv('HTTPS_PROXY')) { - $defaults['proxy']['https'] = $proxy; - } - if ($noProxy = \getenv('NO_PROXY')) { - $cleanedNoProxy = \str_replace(' ', '', $noProxy); - $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy); - } - $this->config = $config + $defaults; - if (!empty($config['cookies']) && $config['cookies'] === \true) { - $this->config['cookies'] = new \PayNL\GuzzleHttp\Cookie\CookieJar(); - } - // Add the default user-agent header. - if (!isset($this->config['headers'])) { - $this->config['headers'] = ['User-Agent' => default_user_agent()]; - } else { - // Add the User-Agent header if one was not already set. - foreach (\array_keys($this->config['headers']) as $name) { - if (\strtolower($name) === 'user-agent') { - return; - } - } - $this->config['headers']['User-Agent'] = default_user_agent(); - } - } - /** - * Merges default options into the array. - * - * @param array $options Options to modify by reference - * - * @return array - */ - private function prepareDefaults(array $options) - { - $defaults = $this->config; - if (!empty($defaults['headers'])) { - // Default headers are only added if they are not present. - $defaults['_conditional'] = $defaults['headers']; - unset($defaults['headers']); - } - // Special handling for headers is required as they are added as - // conditional headers and as headers passed to a request ctor. - if (\array_key_exists('headers', $options)) { - // Allows default headers to be unset. - if ($options['headers'] === null) { - $defaults['_conditional'] = null; - unset($options['headers']); - } elseif (!\is_array($options['headers'])) { - throw new \InvalidArgumentException('headers must be an array'); - } - } - // Shallow merge defaults underneath options. - $result = $options + $defaults; - // Remove null values. - foreach ($result as $k => $v) { - if ($v === null) { - unset($result[$k]); - } - } - return $result; - } - /** - * Transfers the given request and applies request options. - * - * The URI of the request is not modified and the request options are used - * as-is without merging in default options. - * - * @param RequestInterface $request - * @param array $options - * - * @return Promise\PromiseInterface - */ - private function transfer(\Psr\Http\Message\RequestInterface $request, array $options) - { - // save_to -> sink - if (isset($options['save_to'])) { - $options['sink'] = $options['save_to']; - unset($options['save_to']); - } - // exceptions -> http_errors - if (isset($options['exceptions'])) { - $options['http_errors'] = $options['exceptions']; - unset($options['exceptions']); - } - $request = $this->applyOptions($request, $options); - $handler = $options['handler']; - try { - return \PayNL\GuzzleHttp\Promise\promise_for($handler($request, $options)); - } catch (\Exception $e) { - return \PayNL\GuzzleHttp\Promise\rejection_for($e); - } - } - /** - * Applies the array of request options to a request. - * - * @param RequestInterface $request - * @param array $options - * - * @return RequestInterface - */ - private function applyOptions(\Psr\Http\Message\RequestInterface $request, array &$options) - { - $modify = ['set_headers' => []]; - if (isset($options['headers'])) { - $modify['set_headers'] = $options['headers']; - unset($options['headers']); - } - if (isset($options['form_params'])) { - if (isset($options['multipart'])) { - throw new \InvalidArgumentException('You cannot use ' . 'form_params and multipart at the same time. Use the ' . 'form_params option if you want to send application/' . 'x-www-form-urlencoded requests, and the multipart ' . 'option to send multipart/form-data requests.'); - } - $options['body'] = \http_build_query($options['form_params'], '', '&'); - unset($options['form_params']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = \PayNL\GuzzleHttp\Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; - } - if (isset($options['multipart'])) { - $options['body'] = new \PayNL\GuzzleHttp\Psr7\MultipartStream($options['multipart']); - unset($options['multipart']); - } - if (isset($options['json'])) { - $options['body'] = \PayNL\GuzzleHttp\json_encode($options['json']); - unset($options['json']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = \PayNL\GuzzleHttp\Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/json'; - } - if (!empty($options['decode_content']) && $options['decode_content'] !== \true) { - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = \PayNL\GuzzleHttp\Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']); - $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; - } - if (isset($options['body'])) { - if (\is_array($options['body'])) { - $this->invalidBody(); - } - $modify['body'] = \PayNL\GuzzleHttp\Psr7\stream_for($options['body']); - unset($options['body']); - } - if (!empty($options['auth']) && \is_array($options['auth'])) { - $value = $options['auth']; - $type = isset($value[2]) ? \strtolower($value[2]) : 'basic'; - switch ($type) { - case 'basic': - // Ensure that we don't have the header in different case and set the new value. - $modify['set_headers'] = \PayNL\GuzzleHttp\Psr7\_caseless_remove(['Authorization'], $modify['set_headers']); - $modify['set_headers']['Authorization'] = 'Basic ' . \base64_encode("{$value[0]}:{$value[1]}"); - break; - case 'digest': - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST; - $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}"; - break; - case 'ntlm': - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; - $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}"; - break; - } - } - if (isset($options['query'])) { - $value = $options['query']; - if (\is_array($value)) { - $value = \http_build_query($value, null, '&', \PHP_QUERY_RFC3986); - } - if (!\is_string($value)) { - throw new \InvalidArgumentException('query must be a string or array'); - } - $modify['query'] = $value; - unset($options['query']); - } - // Ensure that sink is not an invalid value. - if (isset($options['sink'])) { - if (\is_bool($options['sink'])) { - throw new \InvalidArgumentException('sink must not be a boolean'); - } - } - $request = \PayNL\GuzzleHttp\Psr7\modify_request($request, $modify); - if ($request->getBody() instanceof \PayNL\GuzzleHttp\Psr7\MultipartStream) { - // Use a multipart/form-data POST if a Content-Type is not set. - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = \PayNL\GuzzleHttp\Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' . $request->getBody()->getBoundary(); - } - // Merge in conditional headers if they are not present. - if (isset($options['_conditional'])) { - // Build up the changes so it's in a single clone of the message. - $modify = []; - foreach ($options['_conditional'] as $k => $v) { - if (!$request->hasHeader($k)) { - $modify['set_headers'][$k] = $v; - } - } - $request = \PayNL\GuzzleHttp\Psr7\modify_request($request, $modify); - // Don't pass this internal value along to middleware/handlers. - unset($options['_conditional']); - } - return $request; - } - private function invalidBody() - { - throw new \InvalidArgumentException('Passing in the "body" request ' . 'option as an array to send a POST request has been deprecated. ' . 'Please use the "form_params" request option to send a ' . 'application/x-www-form-urlencoded request, or the "multipart" ' . 'request option to send a multipart/form-data request.'); - } -} diff --git a/build/guzzle/src/ClientInterface.php b/build/guzzle/src/ClientInterface.php deleted file mode 100644 index 6fc888e..0000000 --- a/build/guzzle/src/ClientInterface.php +++ /dev/null @@ -1,79 +0,0 @@ -strictMode = $strictMode; - foreach ($cookieArray as $cookie) { - if (!$cookie instanceof \PayNL\GuzzleHttp\Cookie\SetCookie) { - $cookie = new \PayNL\GuzzleHttp\Cookie\SetCookie($cookie); - } - $this->setCookie($cookie); - } - } - /** - * Create a new Cookie jar from an associative array and domain. - * - * @param array $cookies Cookies to create the jar from - * @param string $domain Domain to set the cookies to - * - * @return self - */ - public static function fromArray(array $cookies, $domain) - { - $cookieJar = new self(); - foreach ($cookies as $name => $value) { - $cookieJar->setCookie(new \PayNL\GuzzleHttp\Cookie\SetCookie(['Domain' => $domain, 'Name' => $name, 'Value' => $value, 'Discard' => \true])); - } - return $cookieJar; - } - /** - * @deprecated - */ - public static function getCookieValue($value) - { - return $value; - } - /** - * Evaluate if this cookie should be persisted to storage - * that survives between requests. - * - * @param SetCookie $cookie Being evaluated. - * @param bool $allowSessionCookies If we should persist session cookies - * @return bool - */ - public static function shouldPersist(\PayNL\GuzzleHttp\Cookie\SetCookie $cookie, $allowSessionCookies = \false) - { - if ($cookie->getExpires() || $allowSessionCookies) { - if (!$cookie->getDiscard()) { - return \true; - } - } - return \false; - } - /** - * Finds and returns the cookie based on the name - * - * @param string $name cookie name to search for - * @return SetCookie|null cookie that was found or null if not found - */ - public function getCookieByName($name) - { - // don't allow a null name - if ($name === null) { - return null; - } - foreach ($this->cookies as $cookie) { - if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) { - return $cookie; - } - } - } - public function toArray() - { - return \array_map(function (\PayNL\GuzzleHttp\Cookie\SetCookie $cookie) { - return $cookie->toArray(); - }, $this->getIterator()->getArrayCopy()); - } - public function clear($domain = null, $path = null, $name = null) - { - if (!$domain) { - $this->cookies = []; - return; - } elseif (!$path) { - $this->cookies = \array_filter($this->cookies, function (\PayNL\GuzzleHttp\Cookie\SetCookie $cookie) use($domain) { - return !$cookie->matchesDomain($domain); - }); - } elseif (!$name) { - $this->cookies = \array_filter($this->cookies, function (\PayNL\GuzzleHttp\Cookie\SetCookie $cookie) use($path, $domain) { - return !($cookie->matchesPath($path) && $cookie->matchesDomain($domain)); - }); - } else { - $this->cookies = \array_filter($this->cookies, function (\PayNL\GuzzleHttp\Cookie\SetCookie $cookie) use($path, $domain, $name) { - return !($cookie->getName() == $name && $cookie->matchesPath($path) && $cookie->matchesDomain($domain)); - }); - } - } - public function clearSessionCookies() - { - $this->cookies = \array_filter($this->cookies, function (\PayNL\GuzzleHttp\Cookie\SetCookie $cookie) { - return !$cookie->getDiscard() && $cookie->getExpires(); - }); - } - public function setCookie(\PayNL\GuzzleHttp\Cookie\SetCookie $cookie) - { - // If the name string is empty (but not 0), ignore the set-cookie - // string entirely. - $name = $cookie->getName(); - if (!$name && $name !== '0') { - return \false; - } - // Only allow cookies with set and valid domain, name, value - $result = $cookie->validate(); - if ($result !== \true) { - if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: ' . $result); - } else { - $this->removeCookieIfEmpty($cookie); - return \false; - } - } - // Resolve conflicts with previously set cookies - foreach ($this->cookies as $i => $c) { - // Two cookies are identical, when their path, and domain are - // identical. - if ($c->getPath() != $cookie->getPath() || $c->getDomain() != $cookie->getDomain() || $c->getName() != $cookie->getName()) { - continue; - } - // The previously set cookie is a discard cookie and this one is - // not so allow the new cookie to be set - if (!$cookie->getDiscard() && $c->getDiscard()) { - unset($this->cookies[$i]); - continue; - } - // If the new cookie's expiration is further into the future, then - // replace the old cookie - if ($cookie->getExpires() > $c->getExpires()) { - unset($this->cookies[$i]); - continue; - } - // If the value has changed, we better change it - if ($cookie->getValue() !== $c->getValue()) { - unset($this->cookies[$i]); - continue; - } - // The cookie exists, so no need to continue - return \false; - } - $this->cookies[] = $cookie; - return \true; - } - public function count() - { - return \count($this->cookies); - } - public function getIterator() - { - return new \ArrayIterator(\array_values($this->cookies)); - } - public function extractCookies(\Psr\Http\Message\RequestInterface $request, \Psr\Http\Message\ResponseInterface $response) - { - if ($cookieHeader = $response->getHeader('Set-Cookie')) { - foreach ($cookieHeader as $cookie) { - $sc = \PayNL\GuzzleHttp\Cookie\SetCookie::fromString($cookie); - if (!$sc->getDomain()) { - $sc->setDomain($request->getUri()->getHost()); - } - if (0 !== \strpos($sc->getPath(), '/')) { - $sc->setPath($this->getCookiePathFromRequest($request)); - } - $this->setCookie($sc); - } - } - } - /** - * Computes cookie path following RFC 6265 section 5.1.4 - * - * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 - * - * @param RequestInterface $request - * @return string - */ - private function getCookiePathFromRequest(\Psr\Http\Message\RequestInterface $request) - { - $uriPath = $request->getUri()->getPath(); - if ('' === $uriPath) { - return '/'; - } - if (0 !== \strpos($uriPath, '/')) { - return '/'; - } - if ('/' === $uriPath) { - return '/'; - } - if (0 === ($lastSlashPos = \strrpos($uriPath, '/'))) { - return '/'; - } - return \substr($uriPath, 0, $lastSlashPos); - } - public function withCookieHeader(\Psr\Http\Message\RequestInterface $request) - { - $values = []; - $uri = $request->getUri(); - $scheme = $uri->getScheme(); - $host = $uri->getHost(); - $path = $uri->getPath() ?: '/'; - foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && $cookie->matchesDomain($host) && !$cookie->isExpired() && (!$cookie->getSecure() || $scheme === 'https')) { - $values[] = $cookie->getName() . '=' . $cookie->getValue(); - } - } - return $values ? $request->withHeader('Cookie', \implode('; ', $values)) : $request; - } - /** - * If a cookie already exists and the server asks to set it again with a - * null value, the cookie must be deleted. - * - * @param SetCookie $cookie - */ - private function removeCookieIfEmpty(\PayNL\GuzzleHttp\Cookie\SetCookie $cookie) - { - $cookieValue = $cookie->getValue(); - if ($cookieValue === null || $cookieValue === '') { - $this->clear($cookie->getDomain(), $cookie->getPath(), $cookie->getName()); - } - } -} diff --git a/build/guzzle/src/Cookie/CookieJarInterface.php b/build/guzzle/src/Cookie/CookieJarInterface.php deleted file mode 100644 index 30b7504..0000000 --- a/build/guzzle/src/Cookie/CookieJarInterface.php +++ /dev/null @@ -1,76 +0,0 @@ -filename = $cookieFile; - $this->storeSessionCookies = $storeSessionCookies; - if (\file_exists($cookieFile)) { - $this->load($cookieFile); - } - } - /** - * Saves the file when shutting down - */ - public function __destruct() - { - $this->save($this->filename); - } - /** - * Saves the cookies to a file. - * - * @param string $filename File to save - * @throws \RuntimeException if the file cannot be found or created - */ - public function save($filename) - { - $json = []; - foreach ($this as $cookie) { - /** @var SetCookie $cookie */ - if (\PayNL\GuzzleHttp\Cookie\CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - $jsonStr = \PayNL\GuzzleHttp\json_encode($json); - if (\false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) { - throw new \RuntimeException("Unable to save file {$filename}"); - } - } - /** - * Load cookies from a JSON formatted file. - * - * Old cookies are kept unless overwritten by newly loaded ones. - * - * @param string $filename Cookie file to load. - * @throws \RuntimeException if the file cannot be loaded. - */ - public function load($filename) - { - $json = \file_get_contents($filename); - if (\false === $json) { - throw new \RuntimeException("Unable to load file {$filename}"); - } elseif ($json === '') { - return; - } - $data = \PayNL\GuzzleHttp\json_decode($json, \true); - if (\is_array($data)) { - foreach (\json_decode($json, \true) as $cookie) { - $this->setCookie(new \PayNL\GuzzleHttp\Cookie\SetCookie($cookie)); - } - } elseif (\strlen($data)) { - throw new \RuntimeException("Invalid cookie file: {$filename}"); - } - } -} diff --git a/build/guzzle/src/Cookie/SessionCookieJar.php b/build/guzzle/src/Cookie/SessionCookieJar.php deleted file mode 100644 index f498d66..0000000 --- a/build/guzzle/src/Cookie/SessionCookieJar.php +++ /dev/null @@ -1,67 +0,0 @@ -sessionKey = $sessionKey; - $this->storeSessionCookies = $storeSessionCookies; - $this->load(); - } - /** - * Saves cookies to session when shutting down - */ - public function __destruct() - { - $this->save(); - } - /** - * Save cookies to the client session - */ - public function save() - { - $json = []; - foreach ($this as $cookie) { - /** @var SetCookie $cookie */ - if (\PayNL\GuzzleHttp\Cookie\CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - $_SESSION[$this->sessionKey] = \json_encode($json); - } - /** - * Load the contents of the client session into the data array - */ - protected function load() - { - if (!isset($_SESSION[$this->sessionKey])) { - return; - } - $data = \json_decode($_SESSION[$this->sessionKey], \true); - if (\is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new \PayNL\GuzzleHttp\Cookie\SetCookie($cookie)); - } - } elseif (\strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); - } - } -} diff --git a/build/guzzle/src/Cookie/SetCookie.php b/build/guzzle/src/Cookie/SetCookie.php deleted file mode 100644 index cf80d31..0000000 --- a/build/guzzle/src/Cookie/SetCookie.php +++ /dev/null @@ -1,343 +0,0 @@ - null, 'Value' => null, 'Domain' => null, 'Path' => '/', 'Max-Age' => null, 'Expires' => null, 'Secure' => \false, 'Discard' => \false, 'HttpOnly' => \false]; - /** @var array Cookie data */ - private $data; - /** - * Create a new SetCookie object from a string - * - * @param string $cookie Set-Cookie header string - * - * @return self - */ - public static function fromString($cookie) - { - // Create the default return array - $data = self::$defaults; - // Explode the cookie string using a series of semicolons - $pieces = \array_filter(\array_map('trim', \explode(';', $cookie))); - // The name of the cookie (first kvp) must exist and include an equal sign. - if (empty($pieces[0]) || !\strpos($pieces[0], '=')) { - return new self($data); - } - // Add the cookie pieces into the parsed data array - foreach ($pieces as $part) { - $cookieParts = \explode('=', $part, 2); - $key = \trim($cookieParts[0]); - $value = isset($cookieParts[1]) ? \trim($cookieParts[1], " \n\r\t\0\v") : \true; - // Only check for non-cookies when cookies have been found - if (empty($data['Name'])) { - $data['Name'] = $key; - $data['Value'] = $value; - } else { - foreach (\array_keys(self::$defaults) as $search) { - if (!\strcasecmp($search, $key)) { - $data[$search] = $value; - continue 2; - } - } - $data[$key] = $value; - } - } - return new self($data); - } - /** - * @param array $data Array of cookie data provided by a Cookie parser - */ - public function __construct(array $data = []) - { - $this->data = \array_replace(self::$defaults, $data); - // Extract the Expires value and turn it into a UNIX timestamp if needed - if (!$this->getExpires() && $this->getMaxAge()) { - // Calculate the Expires date - $this->setExpires(\time() + $this->getMaxAge()); - } elseif ($this->getExpires() && !\is_numeric($this->getExpires())) { - $this->setExpires($this->getExpires()); - } - } - public function __toString() - { - $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; - foreach ($this->data as $k => $v) { - if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== \false) { - if ($k === 'Expires') { - $str .= 'Expires=' . \gmdate('PayNL\\D, d M Y H:i:s \\G\\M\\T', $v) . '; '; - } else { - $str .= ($v === \true ? $k : "{$k}={$v}") . '; '; - } - } - } - return \rtrim($str, '; '); - } - public function toArray() - { - return $this->data; - } - /** - * Get the cookie name - * - * @return string - */ - public function getName() - { - return $this->data['Name']; - } - /** - * Set the cookie name - * - * @param string $name Cookie name - */ - public function setName($name) - { - $this->data['Name'] = $name; - } - /** - * Get the cookie value - * - * @return string - */ - public function getValue() - { - return $this->data['Value']; - } - /** - * Set the cookie value - * - * @param string $value Cookie value - */ - public function setValue($value) - { - $this->data['Value'] = $value; - } - /** - * Get the domain - * - * @return string|null - */ - public function getDomain() - { - return $this->data['Domain']; - } - /** - * Set the domain of the cookie - * - * @param string $domain - */ - public function setDomain($domain) - { - $this->data['Domain'] = $domain; - } - /** - * Get the path - * - * @return string - */ - public function getPath() - { - return $this->data['Path']; - } - /** - * Set the path of the cookie - * - * @param string $path Path of the cookie - */ - public function setPath($path) - { - $this->data['Path'] = $path; - } - /** - * Maximum lifetime of the cookie in seconds - * - * @return int|null - */ - public function getMaxAge() - { - return $this->data['Max-Age']; - } - /** - * Set the max-age of the cookie - * - * @param int $maxAge Max age of the cookie in seconds - */ - public function setMaxAge($maxAge) - { - $this->data['Max-Age'] = $maxAge; - } - /** - * The UNIX timestamp when the cookie Expires - * - * @return mixed - */ - public function getExpires() - { - return $this->data['Expires']; - } - /** - * Set the unix timestamp for which the cookie will expire - * - * @param int $timestamp Unix timestamp - */ - public function setExpires($timestamp) - { - $this->data['Expires'] = \is_numeric($timestamp) ? (int) $timestamp : \strtotime($timestamp); - } - /** - * Get whether or not this is a secure cookie - * - * @return bool|null - */ - public function getSecure() - { - return $this->data['Secure']; - } - /** - * Set whether or not the cookie is secure - * - * @param bool $secure Set to true or false if secure - */ - public function setSecure($secure) - { - $this->data['Secure'] = $secure; - } - /** - * Get whether or not this is a session cookie - * - * @return bool|null - */ - public function getDiscard() - { - return $this->data['Discard']; - } - /** - * Set whether or not this is a session cookie - * - * @param bool $discard Set to true or false if this is a session cookie - */ - public function setDiscard($discard) - { - $this->data['Discard'] = $discard; - } - /** - * Get whether or not this is an HTTP only cookie - * - * @return bool - */ - public function getHttpOnly() - { - return $this->data['HttpOnly']; - } - /** - * Set whether or not this is an HTTP only cookie - * - * @param bool $httpOnly Set to true or false if this is HTTP only - */ - public function setHttpOnly($httpOnly) - { - $this->data['HttpOnly'] = $httpOnly; - } - /** - * Check if the cookie matches a path value. - * - * A request-path path-matches a given cookie-path if at least one of - * the following conditions holds: - * - * - The cookie-path and the request-path are identical. - * - The cookie-path is a prefix of the request-path, and the last - * character of the cookie-path is %x2F ("/"). - * - The cookie-path is a prefix of the request-path, and the first - * character of the request-path that is not included in the cookie- - * path is a %x2F ("/") character. - * - * @param string $requestPath Path to check against - * - * @return bool - */ - public function matchesPath($requestPath) - { - $cookiePath = $this->getPath(); - // Match on exact matches or when path is the default empty "/" - if ($cookiePath === '/' || $cookiePath == $requestPath) { - return \true; - } - // Ensure that the cookie-path is a prefix of the request path. - if (0 !== \strpos($requestPath, $cookiePath)) { - return \false; - } - // Match if the last character of the cookie-path is "/" - if (\substr($cookiePath, -1, 1) === '/') { - return \true; - } - // Match if the first character not included in cookie path is "/" - return \substr($requestPath, \strlen($cookiePath), 1) === '/'; - } - /** - * Check if the cookie matches a domain value - * - * @param string $domain Domain to check against - * - * @return bool - */ - public function matchesDomain($domain) - { - // Remove the leading '.' as per spec in RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = \ltrim($this->getDomain(), '.'); - // Domain not set or exact match. - if (!$cookieDomain || !\strcasecmp($domain, $cookieDomain)) { - return \true; - } - // Matching the subdomain according to RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.1.3 - if (\filter_var($domain, \FILTER_VALIDATE_IP)) { - return \false; - } - return (bool) \preg_match('/\\.' . \preg_quote($cookieDomain, '/') . '$/', $domain); - } - /** - * Check if the cookie is expired - * - * @return bool - */ - public function isExpired() - { - return $this->getExpires() !== null && \time() > $this->getExpires(); - } - /** - * Check if the cookie is valid according to RFC 6265 - * - * @return bool|string Returns true if valid or an error message if invalid - */ - public function validate() - { - // Names must not be empty, but can be 0 - $name = $this->getName(); - if (empty($name) && !\is_numeric($name)) { - return 'The cookie name must not be empty'; - } - // Check if any of the invalid characters are present in the cookie name - if (\preg_match('/[\\x00-\\x20\\x22\\x28-\\x29\\x2c\\x2f\\x3a-\\x40\\x5c\\x7b\\x7d\\x7f]/', $name)) { - return 'Cookie name must not contain invalid characters: ASCII ' . 'Control characters (0-31;127), space, tab and the ' . 'following characters: ()<>@,;:\\"/?={}'; - } - // Value must not be empty, but can be 0 - $value = $this->getValue(); - if (empty($value) && !\is_numeric($value)) { - return 'The cookie value must not be empty'; - } - // Domains must not be empty, but can be 0 - // A "0" is not a valid internet domain, but may be used as server name - // in a private network. - $domain = $this->getDomain(); - if (empty($domain) && !\is_numeric($domain)) { - return 'The cookie domain must not be empty'; - } - return \true; - } -} diff --git a/build/guzzle/src/Exception/BadResponseException.php b/build/guzzle/src/Exception/BadResponseException.php deleted file mode 100644 index 472dcf6..0000000 --- a/build/guzzle/src/Exception/BadResponseException.php +++ /dev/null @@ -1,19 +0,0 @@ -getStatusCode() : 0; - parent::__construct($message, $code, $previous); - $this->request = $request; - $this->response = $response; - $this->handlerContext = $handlerContext; - } - /** - * Wrap non-RequestExceptions with a RequestException - * - * @param RequestInterface $request - * @param \Exception $e - * - * @return RequestException - */ - public static function wrapException(\Psr\Http\Message\RequestInterface $request, \Exception $e) - { - return $e instanceof \PayNL\GuzzleHttp\Exception\RequestException ? $e : new \PayNL\GuzzleHttp\Exception\RequestException($e->getMessage(), $request, null, $e); - } - /** - * Factory method to create a new exception with a normalized error message - * - * @param RequestInterface $request Request - * @param ResponseInterface $response Response received - * @param \Exception $previous Previous exception - * @param array $ctx Optional handler context. - * - * @return self - */ - public static function create(\Psr\Http\Message\RequestInterface $request, \Psr\Http\Message\ResponseInterface $response = null, \Exception $previous = null, array $ctx = []) - { - if (!$response) { - return new self('Error completing request', $request, null, $previous, $ctx); - } - $level = (int) \floor($response->getStatusCode() / 100); - if ($level === 4) { - $label = 'Client error'; - $className = \PayNL\GuzzleHttp\Exception\ClientException::class; - } elseif ($level === 5) { - $label = 'Server error'; - $className = \PayNL\GuzzleHttp\Exception\ServerException::class; - } else { - $label = 'Unsuccessful request'; - $className = __CLASS__; - } - $uri = $request->getUri(); - $uri = static::obfuscateUri($uri); - // Client Error: `GET /` resulted in a `404 Not Found` response: - // ... (truncated) - $message = \sprintf('%s: `%s %s` resulted in a `%s %s` response', $label, $request->getMethod(), $uri, $response->getStatusCode(), $response->getReasonPhrase()); - $summary = static::getResponseBodySummary($response); - if ($summary !== null) { - $message .= ":\n{$summary}\n"; - } - return new $className($message, $request, $response, $previous, $ctx); - } - /** - * Get a short summary of the response - * - * Will return `null` if the response is not printable. - * - * @param ResponseInterface $response - * - * @return string|null - */ - public static function getResponseBodySummary(\Psr\Http\Message\ResponseInterface $response) - { - $body = $response->getBody(); - if (!$body->isSeekable() || !$body->isReadable()) { - return null; - } - $size = $body->getSize(); - if ($size === 0) { - return null; - } - $summary = $body->read(120); - $body->rewind(); - if ($size > 120) { - $summary .= ' (truncated...)'; - } - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (\preg_match('/[^\\pL\\pM\\pN\\pP\\pS\\pZ\\n\\r\\t]/', $summary)) { - return null; - } - return $summary; - } - /** - * Obfuscates URI if there is an username and a password present - * - * @param UriInterface $uri - * - * @return UriInterface - */ - private static function obfuscateUri($uri) - { - $userInfo = $uri->getUserInfo(); - if (\false !== ($pos = \strpos($userInfo, ':'))) { - return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); - } - return $uri; - } - /** - * Get the request that caused the exception - * - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } - /** - * Get the associated response - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } - /** - * Check if a response was received - * - * @return bool - */ - public function hasResponse() - { - return $this->response !== null; - } - /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. - * - * @return array - */ - public function getHandlerContext() - { - return $this->handlerContext; - } -} diff --git a/build/guzzle/src/Exception/SeekException.php b/build/guzzle/src/Exception/SeekException.php deleted file mode 100644 index 8266d55..0000000 --- a/build/guzzle/src/Exception/SeekException.php +++ /dev/null @@ -1,25 +0,0 @@ -stream = $stream; - $msg = $msg ?: 'Could not seek the stream to position ' . $pos; - parent::__construct($msg); - } - /** - * @return StreamInterface - */ - public function getStream() - { - return $this->stream; - } -} diff --git a/build/guzzle/src/Exception/ServerException.php b/build/guzzle/src/Exception/ServerException.php deleted file mode 100644 index 7d7182d..0000000 --- a/build/guzzle/src/Exception/ServerException.php +++ /dev/null @@ -1,10 +0,0 @@ -maxHandles = $maxHandles; - } - public function create(\Psr\Http\Message\RequestInterface $request, array $options) - { - if (isset($options['curl']['body_as_string'])) { - $options['_body_as_string'] = $options['curl']['body_as_string']; - unset($options['curl']['body_as_string']); - } - $easy = new \PayNL\GuzzleHttp\Handler\EasyHandle(); - $easy->request = $request; - $easy->options = $options; - $conf = $this->getDefaultConf($easy); - $this->applyMethod($easy, $conf); - $this->applyHandlerOptions($easy, $conf); - $this->applyHeaders($easy, $conf); - unset($conf['_headers']); - // Add handler options from the request configuration options - if (isset($options['curl'])) { - $conf = \array_replace($conf, $options['curl']); - } - $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); - $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init(); - \curl_setopt_array($easy->handle, $conf); - return $easy; - } - public function release(\PayNL\GuzzleHttp\Handler\EasyHandle $easy) - { - $resource = $easy->handle; - unset($easy->handle); - if (\count($this->handles) >= $this->maxHandles) { - \curl_close($resource); - } else { - // Remove all callback functions as they can hold onto references - // and are not cleaned up by curl_reset. Using curl_setopt_array - // does not work for some reason, so removing each one - // individually. - \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null); - \curl_setopt($resource, \CURLOPT_READFUNCTION, null); - \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null); - \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null); - \curl_reset($resource); - $this->handles[] = $resource; - } - } - /** - * Completes a cURL transaction, either returning a response promise or a - * rejected promise. - * - * @param callable $handler - * @param EasyHandle $easy - * @param CurlFactoryInterface $factory Dictates how the handle is released - * - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public static function finish(callable $handler, \PayNL\GuzzleHttp\Handler\EasyHandle $easy, \PayNL\GuzzleHttp\Handler\CurlFactoryInterface $factory) - { - if (isset($easy->options['on_stats'])) { - self::invokeStats($easy); - } - if (!$easy->response || $easy->errno) { - return self::finishError($handler, $easy, $factory); - } - // Return the response if it is present and there is no error. - $factory->release($easy); - // Rewind the body of the response if possible. - $body = $easy->response->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - return new \PayNL\GuzzleHttp\Promise\FulfilledPromise($easy->response); - } - private static function invokeStats(\PayNL\GuzzleHttp\Handler\EasyHandle $easy) - { - $curlStats = \curl_getinfo($easy->handle); - $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME); - $stats = new \PayNL\GuzzleHttp\TransferStats($easy->request, $easy->response, $curlStats['total_time'], $easy->errno, $curlStats); - \call_user_func($easy->options['on_stats'], $stats); - } - private static function finishError(callable $handler, \PayNL\GuzzleHttp\Handler\EasyHandle $easy, \PayNL\GuzzleHttp\Handler\CurlFactoryInterface $factory) - { - // Get error information and release the handle to the factory. - $ctx = ['errno' => $easy->errno, 'error' => \curl_error($easy->handle), 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME)] + \curl_getinfo($easy->handle); - $ctx[self::CURL_VERSION_STR] = \curl_version()['version']; - $factory->release($easy); - // Retry when nothing is present or when curl failed to rewind. - if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) { - return self::retryFailedRewind($handler, $easy, $ctx); - } - return self::createRejection($easy, $ctx); - } - private static function createRejection(\PayNL\GuzzleHttp\Handler\EasyHandle $easy, array $ctx) - { - static $connectionErrors = [\CURLE_OPERATION_TIMEOUTED => \true, \CURLE_COULDNT_RESOLVE_HOST => \true, \CURLE_COULDNT_CONNECT => \true, \CURLE_SSL_CONNECT_ERROR => \true, \CURLE_GOT_NOTHING => \true]; - // If an exception was encountered during the onHeaders event, then - // return a rejected promise that wraps that exception. - if ($easy->onHeadersException) { - return \PayNL\GuzzleHttp\Promise\rejection_for(new \PayNL\GuzzleHttp\Exception\RequestException('An error was encountered during the on_headers event', $easy->request, $easy->response, $easy->onHeadersException, $ctx)); - } - if (\version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) { - $message = \sprintf('cURL error %s: %s (%s)', $ctx['errno'], $ctx['error'], 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'); - } else { - $message = \sprintf('cURL error %s: %s (%s) for %s', $ctx['errno'], $ctx['error'], 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html', $easy->request->getUri()); - } - // Create a connection exception if it was a specific error code. - $error = isset($connectionErrors[$easy->errno]) ? new \PayNL\GuzzleHttp\Exception\ConnectException($message, $easy->request, null, $ctx) : new \PayNL\GuzzleHttp\Exception\RequestException($message, $easy->request, $easy->response, null, $ctx); - return \PayNL\GuzzleHttp\Promise\rejection_for($error); - } - private function getDefaultConf(\PayNL\GuzzleHttp\Handler\EasyHandle $easy) - { - $conf = ['_headers' => $easy->request->getHeaders(), \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), \CURLOPT_RETURNTRANSFER => \false, \CURLOPT_HEADER => \false, \CURLOPT_CONNECTTIMEOUT => 150]; - if (\defined('CURLOPT_PROTOCOLS')) { - $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS; - } - $version = $easy->request->getProtocolVersion(); - if ($version == 1.1) { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; - } elseif ($version == 2.0) { - $conf[\CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; - } else { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; - } - return $conf; - } - private function applyMethod(\PayNL\GuzzleHttp\Handler\EasyHandle $easy, array &$conf) - { - $body = $easy->request->getBody(); - $size = $body->getSize(); - if ($size === null || $size > 0) { - $this->applyBody($easy->request, $easy->options, $conf); - return; - } - $method = $easy->request->getMethod(); - if ($method === 'PUT' || $method === 'POST') { - // See http://tools.ietf.org/html/rfc7230#section-3.3.2 - if (!$easy->request->hasHeader('Content-Length')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; - } - } elseif ($method === 'HEAD') { - $conf[\CURLOPT_NOBODY] = \true; - unset($conf[\CURLOPT_WRITEFUNCTION], $conf[\CURLOPT_READFUNCTION], $conf[\CURLOPT_FILE], $conf[\CURLOPT_INFILE]); - } - } - private function applyBody(\Psr\Http\Message\RequestInterface $request, array $options, array &$conf) - { - $size = $request->hasHeader('Content-Length') ? (int) $request->getHeaderLine('Content-Length') : null; - // Send the body as a string if the size is less than 1MB OR if the - // [curl][body_as_string] request value is set. - if ($size !== null && $size < 1000000 || !empty($options['_body_as_string'])) { - $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody(); - // Don't duplicate the Content-Length header - $this->removeHeader('Content-Length', $conf); - $this->removeHeader('Transfer-Encoding', $conf); - } else { - $conf[\CURLOPT_UPLOAD] = \true; - if ($size !== null) { - $conf[\CURLOPT_INFILESIZE] = $size; - $this->removeHeader('Content-Length', $conf); - } - $body = $request->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - $conf[\CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use($body) { - return $body->read($length); - }; - } - // If the Expect header is not present, prevent curl from adding it - if (!$request->hasHeader('Expect')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Expect:'; - } - // cURL sometimes adds a content-type by default. Prevent this. - if (!$request->hasHeader('Content-Type')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:'; - } - } - private function applyHeaders(\PayNL\GuzzleHttp\Handler\EasyHandle $easy, array &$conf) - { - foreach ($conf['_headers'] as $name => $values) { - foreach ($values as $value) { - $value = (string) $value; - if ($value === '') { - // cURL requires a special format for empty headers. - // See https://github.com/guzzle/guzzle/issues/1882 for more details. - $conf[\CURLOPT_HTTPHEADER][] = "{$name};"; - } else { - $conf[\CURLOPT_HTTPHEADER][] = "{$name}: {$value}"; - } - } - } - // Remove the Accept header if one was not set - if (!$easy->request->hasHeader('Accept')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Accept:'; - } - } - /** - * Remove a header from the options array. - * - * @param string $name Case-insensitive header to remove - * @param array $options Array of options to modify - */ - private function removeHeader($name, array &$options) - { - foreach (\array_keys($options['_headers']) as $key) { - if (!\strcasecmp($key, $name)) { - unset($options['_headers'][$key]); - return; - } - } - } - private function applyHandlerOptions(\PayNL\GuzzleHttp\Handler\EasyHandle $easy, array &$conf) - { - $options = $easy->options; - if (isset($options['verify'])) { - if ($options['verify'] === \false) { - unset($conf[\CURLOPT_CAINFO]); - $conf[\CURLOPT_SSL_VERIFYHOST] = 0; - $conf[\CURLOPT_SSL_VERIFYPEER] = \false; - } else { - $conf[\CURLOPT_SSL_VERIFYHOST] = 2; - $conf[\CURLOPT_SSL_VERIFYPEER] = \true; - if (\is_string($options['verify'])) { - // Throw an error if the file/folder/link path is not valid or doesn't exist. - if (!\file_exists($options['verify'])) { - throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}"); - } - // If it's a directory or a link to a directory use CURLOPT_CAPATH. - // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. - if (\is_dir($options['verify']) || \is_link($options['verify']) && \is_dir(\readlink($options['verify']))) { - $conf[\CURLOPT_CAPATH] = $options['verify']; - } else { - $conf[\CURLOPT_CAINFO] = $options['verify']; - } - } - } - } - if (!empty($options['decode_content'])) { - $accept = $easy->request->getHeaderLine('Accept-Encoding'); - if ($accept) { - $conf[\CURLOPT_ENCODING] = $accept; - } else { - $conf[\CURLOPT_ENCODING] = ''; - // Don't let curl send the header over the wire - $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; - } - } - if (isset($options['sink'])) { - $sink = $options['sink']; - if (!\is_string($sink)) { - $sink = \PayNL\GuzzleHttp\Psr7\stream_for($sink); - } elseif (!\is_dir(\dirname($sink))) { - // Ensure that the directory exists before failing in curl. - throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink)); - } else { - $sink = new \PayNL\GuzzleHttp\Psr7\LazyOpenStream($sink, 'w+'); - } - $easy->sink = $sink; - $conf[\CURLOPT_WRITEFUNCTION] = function ($ch, $write) use($sink) { - return $sink->write($write); - }; - } else { - // Use a default temp stream if no sink was set. - $conf[\CURLOPT_FILE] = \fopen('php://temp', 'w+'); - $easy->sink = \PayNL\GuzzleHttp\Psr7\stream_for($conf[\CURLOPT_FILE]); - } - $timeoutRequiresNoSignal = \false; - if (isset($options['timeout'])) { - $timeoutRequiresNoSignal |= $options['timeout'] < 1; - $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; - } - // CURL default value is CURL_IPRESOLVE_WHATEVER - if (isset($options['force_ip_resolve'])) { - if ('v4' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; - } elseif ('v6' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6; - } - } - if (isset($options['connect_timeout'])) { - $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; - $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; - } - if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') { - $conf[\CURLOPT_NOSIGNAL] = \true; - } - if (isset($options['proxy'])) { - if (!\is_array($options['proxy'])) { - $conf[\CURLOPT_PROXY] = $options['proxy']; - } else { - $scheme = $easy->request->getUri()->getScheme(); - if (isset($options['proxy'][$scheme])) { - $host = $easy->request->getUri()->getHost(); - if (!isset($options['proxy']['no']) || !\PayNL\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no'])) { - $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; - } - } - } - } - if (isset($options['cert'])) { - $cert = $options['cert']; - if (\is_array($cert)) { - $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1]; - $cert = $cert[0]; - } - if (!\file_exists($cert)) { - throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); - } - $conf[\CURLOPT_SSLCERT] = $cert; - } - if (isset($options['ssl_key'])) { - $sslKey = $options['ssl_key']; - if (\is_array($sslKey)) { - $conf[\CURLOPT_SSLKEYPASSWD] = $sslKey[1]; - $sslKey = $sslKey[0]; - } - if (!\file_exists($sslKey)) { - throw new \InvalidArgumentException("SSL private key not found: {$sslKey}"); - } - $conf[\CURLOPT_SSLKEY] = $sslKey; - } - if (isset($options['progress'])) { - $progress = $options['progress']; - if (!\is_callable($progress)) { - throw new \InvalidArgumentException('progress client option must be callable'); - } - $conf[\CURLOPT_NOPROGRESS] = \false; - $conf[\CURLOPT_PROGRESSFUNCTION] = function () use($progress) { - $args = \func_get_args(); - // PHP 5.5 pushed the handle onto the start of the args - if (\is_resource($args[0])) { - \array_shift($args); - } - \call_user_func_array($progress, $args); - }; - } - if (!empty($options['debug'])) { - $conf[\CURLOPT_STDERR] = \PayNL\GuzzleHttp\debug_resource($options['debug']); - $conf[\CURLOPT_VERBOSE] = \true; - } - } - /** - * This function ensures that a response was set on a transaction. If one - * was not set, then the request is retried if possible. This error - * typically means you are sending a payload, curl encountered a - * "Connection died, retrying a fresh connect" error, tried to rewind the - * stream, and then encountered a "necessary data rewind wasn't possible" - * error, causing the request to be sent through curl_multi_info_read() - * without an error status. - */ - private static function retryFailedRewind(callable $handler, \PayNL\GuzzleHttp\Handler\EasyHandle $easy, array $ctx) - { - try { - // Only rewind if the body has been read from. - $body = $easy->request->getBody(); - if ($body->tell() > 0) { - $body->rewind(); - } - } catch (\RuntimeException $e) { - $ctx['error'] = 'The connection unexpectedly failed without ' . 'providing an error. The request would have been retried, ' . 'but attempting to rewind the request body failed. ' . 'Exception: ' . $e; - return self::createRejection($easy, $ctx); - } - // Retry no more than 3 times before giving up. - if (!isset($easy->options['_curl_retries'])) { - $easy->options['_curl_retries'] = 1; - } elseif ($easy->options['_curl_retries'] == 2) { - $ctx['error'] = 'The cURL request was retried 3 times ' . 'and did not succeed. The most likely reason for the failure ' . 'is that cURL was unable to rewind the body of the request ' . 'and subsequent retries resulted in the same error. Turn on ' . 'the debug option to see what went wrong. See ' . 'https://bugs.php.net/bug.php?id=47204 for more information.'; - return self::createRejection($easy, $ctx); - } else { - $easy->options['_curl_retries']++; - } - return $handler($easy->request, $easy->options); - } - private function createHeaderFn(\PayNL\GuzzleHttp\Handler\EasyHandle $easy) - { - if (isset($easy->options['on_headers'])) { - $onHeaders = $easy->options['on_headers']; - if (!\is_callable($onHeaders)) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - } else { - $onHeaders = null; - } - return function ($ch, $h) use($onHeaders, $easy, &$startingResponse) { - $value = \trim($h); - if ($value === '') { - $startingResponse = \true; - $easy->createResponse(); - if ($onHeaders !== null) { - try { - $onHeaders($easy->response); - } catch (\Exception $e) { - // Associate the exception with the handle and trigger - // a curl header write error by returning 0. - $easy->onHeadersException = $e; - return -1; - } - } - } elseif ($startingResponse) { - $startingResponse = \false; - $easy->headers = [$value]; - } else { - $easy->headers[] = $value; - } - return \strlen($h); - }; - } -} diff --git a/build/guzzle/src/Handler/CurlFactoryInterface.php b/build/guzzle/src/Handler/CurlFactoryInterface.php deleted file mode 100644 index acf7b10..0000000 --- a/build/guzzle/src/Handler/CurlFactoryInterface.php +++ /dev/null @@ -1,26 +0,0 @@ -factory = isset($options['handle_factory']) ? $options['handle_factory'] : new \PayNL\GuzzleHttp\Handler\CurlFactory(3); - } - public function __invoke(\Psr\Http\Message\RequestInterface $request, array $options) - { - if (isset($options['delay'])) { - \usleep($options['delay'] * 1000); - } - $easy = $this->factory->create($request, $options); - \curl_exec($easy->handle); - $easy->errno = \curl_errno($easy->handle); - return \PayNL\GuzzleHttp\Handler\CurlFactory::finish($this, $easy, $this->factory); - } -} diff --git a/build/guzzle/src/Handler/CurlMultiHandler.php b/build/guzzle/src/Handler/CurlMultiHandler.php deleted file mode 100644 index 9ae2759..0000000 --- a/build/guzzle/src/Handler/CurlMultiHandler.php +++ /dev/null @@ -1,166 +0,0 @@ -factory = isset($options['handle_factory']) ? $options['handle_factory'] : new \PayNL\GuzzleHttp\Handler\CurlFactory(50); - if (isset($options['select_timeout'])) { - $this->selectTimeout = $options['select_timeout']; - } elseif ($selectTimeout = \getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { - $this->selectTimeout = $selectTimeout; - } else { - $this->selectTimeout = 1; - } - } - public function __get($name) - { - if ($name === '_mh') { - return $this->_mh = \curl_multi_init(); - } - throw new \BadMethodCallException(); - } - public function __destruct() - { - if (isset($this->_mh)) { - \curl_multi_close($this->_mh); - unset($this->_mh); - } - } - public function __invoke(\Psr\Http\Message\RequestInterface $request, array $options) - { - $easy = $this->factory->create($request, $options); - $id = (int) $easy->handle; - $promise = new \PayNL\GuzzleHttp\Promise\Promise([$this, 'execute'], function () use($id) { - return $this->cancel($id); - }); - $this->addRequest(['easy' => $easy, 'deferred' => $promise]); - return $promise; - } - /** - * Ticks the curl event loop. - */ - public function tick() - { - // Add any delayed handles if needed. - if ($this->delays) { - $currentTime = \PayNL\GuzzleHttp\_current_time(); - foreach ($this->delays as $id => $delay) { - if ($currentTime >= $delay) { - unset($this->delays[$id]); - \curl_multi_add_handle($this->_mh, $this->handles[$id]['easy']->handle); - } - } - } - // Step through the task queue which may add additional requests. - \PayNL\GuzzleHttp\Promise\queue()->run(); - if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) { - // Perform a usleep if a select returns -1. - // See: https://bugs.php.net/bug.php?id=61141 - \usleep(250); - } - while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { - } - $this->processMessages(); - } - /** - * Runs until all outstanding connections have completed. - */ - public function execute() - { - $queue = \PayNL\GuzzleHttp\Promise\queue(); - while ($this->handles || !$queue->isEmpty()) { - // If there are no transfers, then sleep for the next delay - if (!$this->active && $this->delays) { - \usleep($this->timeToNext()); - } - $this->tick(); - } - } - private function addRequest(array $entry) - { - $easy = $entry['easy']; - $id = (int) $easy->handle; - $this->handles[$id] = $entry; - if (empty($easy->options['delay'])) { - \curl_multi_add_handle($this->_mh, $easy->handle); - } else { - $this->delays[$id] = \PayNL\GuzzleHttp\_current_time() + $easy->options['delay'] / 1000; - } - } - /** - * Cancels a handle from sending and removes references to it. - * - * @param int $id Handle ID to cancel and remove. - * - * @return bool True on success, false on failure. - */ - private function cancel($id) - { - // Cannot cancel if it has been processed. - if (!isset($this->handles[$id])) { - return \false; - } - $handle = $this->handles[$id]['easy']->handle; - unset($this->delays[$id], $this->handles[$id]); - \curl_multi_remove_handle($this->_mh, $handle); - \curl_close($handle); - return \true; - } - private function processMessages() - { - while ($done = \curl_multi_info_read($this->_mh)) { - $id = (int) $done['handle']; - \curl_multi_remove_handle($this->_mh, $done['handle']); - if (!isset($this->handles[$id])) { - // Probably was cancelled. - continue; - } - $entry = $this->handles[$id]; - unset($this->handles[$id], $this->delays[$id]); - $entry['easy']->errno = $done['result']; - $entry['deferred']->resolve(\PayNL\GuzzleHttp\Handler\CurlFactory::finish($this, $entry['easy'], $this->factory)); - } - } - private function timeToNext() - { - $currentTime = \PayNL\GuzzleHttp\_current_time(); - $nextTime = \PHP_INT_MAX; - foreach ($this->delays as $time) { - if ($time < $nextTime) { - $nextTime = $time; - } - } - return \max(0, $nextTime - $currentTime) * 1000000; - } -} diff --git a/build/guzzle/src/Handler/EasyHandle.php b/build/guzzle/src/Handler/EasyHandle.php deleted file mode 100644 index 4a3959e..0000000 --- a/build/guzzle/src/Handler/EasyHandle.php +++ /dev/null @@ -1,67 +0,0 @@ -headers)) { - throw new \RuntimeException('No headers have been received'); - } - // HTTP-version SP status-code SP reason-phrase - $startLine = \explode(' ', \array_shift($this->headers), 3); - $headers = \PayNL\GuzzleHttp\headers_from_lines($this->headers); - $normalizedKeys = \PayNL\GuzzleHttp\normalize_header_keys($headers); - if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) { - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; - unset($headers[$normalizedKeys['content-encoding']]); - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; - $bodyLength = (int) $this->sink->getSize(); - if ($bodyLength) { - $headers[$normalizedKeys['content-length']] = $bodyLength; - } else { - unset($headers[$normalizedKeys['content-length']]); - } - } - } - // Attach a response to the easy handle with the parsed headers. - $this->response = new \PayNL\GuzzleHttp\Psr7\Response($startLine[1], $headers, $this->sink, \substr($startLine[0], 5), isset($startLine[2]) ? (string) $startLine[2] : null); - } - public function __get($name) - { - $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name; - throw new \BadMethodCallException($msg); - } -} diff --git a/build/guzzle/src/Handler/MockHandler.php b/build/guzzle/src/Handler/MockHandler.php deleted file mode 100644 index 4a92f02..0000000 --- a/build/guzzle/src/Handler/MockHandler.php +++ /dev/null @@ -1,153 +0,0 @@ -onFulfilled = $onFulfilled; - $this->onRejected = $onRejected; - if ($queue) { - \call_user_func_array([$this, 'append'], $queue); - } - } - public function __invoke(\Psr\Http\Message\RequestInterface $request, array $options) - { - if (!$this->queue) { - throw new \OutOfBoundsException('Mock queue is empty'); - } - if (isset($options['delay'])) { - \usleep($options['delay'] * 1000); - } - $this->lastRequest = $request; - $this->lastOptions = $options; - $response = \array_shift($this->queue); - if (isset($options['on_headers'])) { - if (!\is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $response = new \PayNL\GuzzleHttp\Exception\RequestException($msg, $request, $response, $e); - } - } - if (\is_callable($response)) { - $response = \call_user_func($response, $request, $options); - } - $response = $response instanceof \Exception ? \PayNL\GuzzleHttp\Promise\rejection_for($response) : \PayNL\GuzzleHttp\Promise\promise_for($response); - return $response->then(function ($value) use($request, $options) { - $this->invokeStats($request, $options, $value); - if ($this->onFulfilled) { - \call_user_func($this->onFulfilled, $value); - } - if (isset($options['sink'])) { - $contents = (string) $value->getBody(); - $sink = $options['sink']; - if (\is_resource($sink)) { - \fwrite($sink, $contents); - } elseif (\is_string($sink)) { - \file_put_contents($sink, $contents); - } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) { - $sink->write($contents); - } - } - return $value; - }, function ($reason) use($request, $options) { - $this->invokeStats($request, $options, null, $reason); - if ($this->onRejected) { - \call_user_func($this->onRejected, $reason); - } - return \PayNL\GuzzleHttp\Promise\rejection_for($reason); - }); - } - /** - * Adds one or more variadic requests, exceptions, callables, or promises - * to the queue. - */ - public function append() - { - foreach (\func_get_args() as $value) { - if ($value instanceof \Psr\Http\Message\ResponseInterface || $value instanceof \Exception || $value instanceof \PayNL\GuzzleHttp\Promise\PromiseInterface || \is_callable($value)) { - $this->queue[] = $value; - } else { - throw new \InvalidArgumentException('Expected a response or ' . 'exception. Found ' . \PayNL\GuzzleHttp\describe_type($value)); - } - } - } - /** - * Get the last received request. - * - * @return RequestInterface - */ - public function getLastRequest() - { - return $this->lastRequest; - } - /** - * Get the last received request options. - * - * @return array - */ - public function getLastOptions() - { - return $this->lastOptions; - } - /** - * Returns the number of remaining items in the queue. - * - * @return int - */ - public function count() - { - return \count($this->queue); - } - private function invokeStats(\Psr\Http\Message\RequestInterface $request, array $options, \Psr\Http\Message\ResponseInterface $response = null, $reason = null) - { - if (isset($options['on_stats'])) { - $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0; - $stats = new \PayNL\GuzzleHttp\TransferStats($request, $response, $transferTime, $reason); - \call_user_func($options['on_stats'], $stats); - } - } -} diff --git a/build/guzzle/src/Handler/Proxy.php b/build/guzzle/src/Handler/Proxy.php deleted file mode 100644 index a25f011..0000000 --- a/build/guzzle/src/Handler/Proxy.php +++ /dev/null @@ -1,46 +0,0 @@ -withoutHeader('Expect'); - // Append a content-length header if body size is zero to match - // cURL's behavior. - if (0 === $request->getBody()->getSize()) { - $request = $request->withHeader('Content-Length', '0'); - } - return $this->createResponse($request, $options, $this->createStream($request, $options), $startTime); - } catch (\InvalidArgumentException $e) { - throw $e; - } catch (\Exception $e) { - // Determine if the error was a networking error. - $message = $e->getMessage(); - // This list can probably get more comprehensive. - if (\strpos($message, 'getaddrinfo') || \strpos($message, 'Connection refused') || \strpos($message, "couldn't connect to host") || \strpos($message, "connection attempt failed")) { - $e = new \PayNL\GuzzleHttp\Exception\ConnectException($e->getMessage(), $request, $e); - } - $e = \PayNL\GuzzleHttp\Exception\RequestException::wrapException($request, $e); - $this->invokeStats($options, $request, $startTime, null, $e); - return \PayNL\GuzzleHttp\Promise\rejection_for($e); - } - } - private function invokeStats(array $options, \Psr\Http\Message\RequestInterface $request, $startTime, \Psr\Http\Message\ResponseInterface $response = null, $error = null) - { - if (isset($options['on_stats'])) { - $stats = new \PayNL\GuzzleHttp\TransferStats($request, $response, \PayNL\GuzzleHttp\_current_time() - $startTime, $error, []); - \call_user_func($options['on_stats'], $stats); - } - } - private function createResponse(\Psr\Http\Message\RequestInterface $request, array $options, $stream, $startTime) - { - $hdrs = $this->lastHeaders; - $this->lastHeaders = []; - $parts = \explode(' ', \array_shift($hdrs), 3); - $ver = \explode('/', $parts[0])[1]; - $status = $parts[1]; - $reason = isset($parts[2]) ? $parts[2] : null; - $headers = \PayNL\GuzzleHttp\headers_from_lines($hdrs); - list($stream, $headers) = $this->checkDecode($options, $headers, $stream); - $stream = \PayNL\GuzzleHttp\Psr7\stream_for($stream); - $sink = $stream; - if (\strcasecmp('HEAD', $request->getMethod())) { - $sink = $this->createSink($stream, $options); - } - $response = new \PayNL\GuzzleHttp\Psr7\Response($status, $headers, $sink, $ver, $reason); - if (isset($options['on_headers'])) { - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $ex = new \PayNL\GuzzleHttp\Exception\RequestException($msg, $request, $response, $e); - return \PayNL\GuzzleHttp\Promise\rejection_for($ex); - } - } - // Do not drain when the request is a HEAD request because they have - // no body. - if ($sink !== $stream) { - $this->drain($stream, $sink, $response->getHeaderLine('Content-Length')); - } - $this->invokeStats($options, $request, $startTime, $response, null); - return new \PayNL\GuzzleHttp\Promise\FulfilledPromise($response); - } - private function createSink(\Psr\Http\Message\StreamInterface $stream, array $options) - { - if (!empty($options['stream'])) { - return $stream; - } - $sink = isset($options['sink']) ? $options['sink'] : \fopen('php://temp', 'r+'); - return \is_string($sink) ? new \PayNL\GuzzleHttp\Psr7\LazyOpenStream($sink, 'w+') : \PayNL\GuzzleHttp\Psr7\stream_for($sink); - } - private function checkDecode(array $options, array $headers, $stream) - { - // Automatically decode responses when instructed. - if (!empty($options['decode_content'])) { - $normalizedKeys = \PayNL\GuzzleHttp\normalize_header_keys($headers); - if (isset($normalizedKeys['content-encoding'])) { - $encoding = $headers[$normalizedKeys['content-encoding']]; - if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { - $stream = new \PayNL\GuzzleHttp\Psr7\InflateStream(\PayNL\GuzzleHttp\Psr7\stream_for($stream)); - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; - // Remove content-encoding header - unset($headers[$normalizedKeys['content-encoding']]); - // Fix content-length header - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; - $length = (int) $stream->getSize(); - if ($length === 0) { - unset($headers[$normalizedKeys['content-length']]); - } else { - $headers[$normalizedKeys['content-length']] = [$length]; - } - } - } - } - } - return [$stream, $headers]; - } - /** - * Drains the source stream into the "sink" client option. - * - * @param StreamInterface $source - * @param StreamInterface $sink - * @param string $contentLength Header specifying the amount of - * data to read. - * - * @return StreamInterface - * @throws \RuntimeException when the sink option is invalid. - */ - private function drain(\Psr\Http\Message\StreamInterface $source, \Psr\Http\Message\StreamInterface $sink, $contentLength) - { - // If a content-length header is provided, then stop reading once - // that number of bytes has been read. This can prevent infinitely - // reading from a stream when dealing with servers that do not honor - // Connection: Close headers. - \PayNL\GuzzleHttp\Psr7\copy_to_stream($source, $sink, \strlen($contentLength) > 0 && (int) $contentLength > 0 ? (int) $contentLength : -1); - $sink->seek(0); - $source->close(); - return $sink; - } - /** - * Create a resource and check to ensure it was created successfully - * - * @param callable $callback Callable that returns stream resource - * - * @return resource - * @throws \RuntimeException on error - */ - private function createResource(callable $callback) - { - $errors = null; - \set_error_handler(function ($_, $msg, $file, $line) use(&$errors) { - $errors[] = ['message' => $msg, 'file' => $file, 'line' => $line]; - return \true; - }); - $resource = $callback(); - \restore_error_handler(); - if (!$resource) { - $message = 'Error creating resource: '; - foreach ($errors as $err) { - foreach ($err as $key => $value) { - $message .= "[{$key}] {$value}" . \PHP_EOL; - } - } - throw new \RuntimeException(\trim($message)); - } - return $resource; - } - private function createStream(\Psr\Http\Message\RequestInterface $request, array $options) - { - static $methods; - if (!$methods) { - $methods = \array_flip(\get_class_methods(__CLASS__)); - } - // HTTP/1.1 streams using the PHP stream wrapper require a - // Connection: close header - if ($request->getProtocolVersion() == '1.1' && !$request->hasHeader('Connection')) { - $request = $request->withHeader('Connection', 'close'); - } - // Ensure SSL is verified by default - if (!isset($options['verify'])) { - $options['verify'] = \true; - } - $params = []; - $context = $this->getDefaultContext($request); - if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - if (!empty($options)) { - foreach ($options as $key => $value) { - $method = "add_{$key}"; - if (isset($methods[$method])) { - $this->{$method}($request, $context, $value, $params); - } - } - } - if (isset($options['stream_context'])) { - if (!\is_array($options['stream_context'])) { - throw new \InvalidArgumentException('stream_context must be an array'); - } - $context = \array_replace_recursive($context, $options['stream_context']); - } - // Microsoft NTLM authentication only supported with curl handler - if (isset($options['auth']) && \is_array($options['auth']) && isset($options['auth'][2]) && 'ntlm' == $options['auth'][2]) { - throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); - } - $uri = $this->resolveHost($request, $options); - $context = $this->createResource(function () use($context, $params) { - return \stream_context_create($context, $params); - }); - return $this->createResource(function () use($uri, &$http_response_header, $context, $options) { - $resource = \fopen((string) $uri, 'r', null, $context); - $this->lastHeaders = $http_response_header; - if (isset($options['read_timeout'])) { - $readTimeout = $options['read_timeout']; - $sec = (int) $readTimeout; - $usec = ($readTimeout - $sec) * 100000; - \stream_set_timeout($resource, $sec, $usec); - } - return $resource; - }); - } - private function resolveHost(\Psr\Http\Message\RequestInterface $request, array $options) - { - $uri = $request->getUri(); - if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) { - if ('v4' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_A); - if (!isset($records[0]['ip'])) { - throw new \PayNL\GuzzleHttp\Exception\ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); - } - $uri = $uri->withHost($records[0]['ip']); - } elseif ('v6' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_AAAA); - if (!isset($records[0]['ipv6'])) { - throw new \PayNL\GuzzleHttp\Exception\ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); - } - $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']'); - } - } - return $uri; - } - private function getDefaultContext(\Psr\Http\Message\RequestInterface $request) - { - $headers = ''; - foreach ($request->getHeaders() as $name => $value) { - foreach ($value as $val) { - $headers .= "{$name}: {$val}\r\n"; - } - } - $context = ['http' => ['method' => $request->getMethod(), 'header' => $headers, 'protocol_version' => $request->getProtocolVersion(), 'ignore_errors' => \true, 'follow_location' => 0]]; - $body = (string) $request->getBody(); - if (!empty($body)) { - $context['http']['content'] = $body; - // Prevent the HTTP handler from adding a Content-Type header. - if (!$request->hasHeader('Content-Type')) { - $context['http']['header'] .= "Content-Type:\r\n"; - } - } - $context['http']['header'] = \rtrim($context['http']['header']); - return $context; - } - private function add_proxy(\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) - { - if (!\is_array($value)) { - $options['http']['proxy'] = $value; - } else { - $scheme = $request->getUri()->getScheme(); - if (isset($value[$scheme])) { - if (!isset($value['no']) || !\PayNL\GuzzleHttp\is_host_in_noproxy($request->getUri()->getHost(), $value['no'])) { - $options['http']['proxy'] = $value[$scheme]; - } - } - } - } - private function add_timeout(\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) - { - if ($value > 0) { - $options['http']['timeout'] = $value; - } - } - private function add_verify(\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) - { - if ($value === \true) { - // PHP 5.6 or greater will find the system cert by default. When - // < 5.6, use the Guzzle bundled cacert. - if (\PHP_VERSION_ID < 50600) { - $options['ssl']['cafile'] = \PayNL\GuzzleHttp\default_ca_bundle(); - } - } elseif (\is_string($value)) { - $options['ssl']['cafile'] = $value; - if (!\file_exists($value)) { - throw new \RuntimeException("SSL CA bundle not found: {$value}"); - } - } elseif ($value === \false) { - $options['ssl']['verify_peer'] = \false; - $options['ssl']['verify_peer_name'] = \false; - return; - } else { - throw new \InvalidArgumentException('Invalid verify request option'); - } - $options['ssl']['verify_peer'] = \true; - $options['ssl']['verify_peer_name'] = \true; - $options['ssl']['allow_self_signed'] = \false; - } - private function add_cert(\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) - { - if (\is_array($value)) { - $options['ssl']['passphrase'] = $value[1]; - $value = $value[0]; - } - if (!\file_exists($value)) { - throw new \RuntimeException("SSL certificate not found: {$value}"); - } - $options['ssl']['local_cert'] = $value; - } - private function add_progress(\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) - { - $this->addNotification($params, function ($code, $a, $b, $c, $transferred, $total) use($value) { - if ($code == \STREAM_NOTIFY_PROGRESS) { - $value($total, $transferred, null, null); - } - }); - } - private function add_debug(\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) - { - if ($value === \false) { - return; - } - static $map = [\STREAM_NOTIFY_CONNECT => 'CONNECT', \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', \STREAM_NOTIFY_PROGRESS => 'PROGRESS', \STREAM_NOTIFY_FAILURE => 'FAILURE', \STREAM_NOTIFY_COMPLETED => 'COMPLETED', \STREAM_NOTIFY_RESOLVE => 'RESOLVE']; - static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; - $value = \PayNL\GuzzleHttp\debug_resource($value); - $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); - $this->addNotification($params, function () use($ident, $value, $map, $args) { - $passed = \func_get_args(); - $code = \array_shift($passed); - \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); - foreach (\array_filter($passed) as $i => $v) { - \fwrite($value, $args[$i] . ': "' . $v . '" '); - } - \fwrite($value, "\n"); - }); - } - private function addNotification(array &$params, callable $notify) - { - // Wrap the existing function if needed. - if (!isset($params['notification'])) { - $params['notification'] = $notify; - } else { - $params['notification'] = $this->callArray([$params['notification'], $notify]); - } - } - private function callArray(array $functions) - { - return function () use($functions) { - $args = \func_get_args(); - foreach ($functions as $fn) { - \call_user_func_array($fn, $args); - } - }; - } -} diff --git a/build/guzzle/src/HandlerStack.php b/build/guzzle/src/HandlerStack.php deleted file mode 100644 index 6c4f0cd..0000000 --- a/build/guzzle/src/HandlerStack.php +++ /dev/null @@ -1,239 +0,0 @@ -push(\PayNL\GuzzleHttp\Middleware::httpErrors(), 'http_errors'); - $stack->push(\PayNL\GuzzleHttp\Middleware::redirect(), 'allow_redirects'); - $stack->push(\PayNL\GuzzleHttp\Middleware::cookies(), 'cookies'); - $stack->push(\PayNL\GuzzleHttp\Middleware::prepareBody(), 'prepare_body'); - return $stack; - } - /** - * @param callable $handler Underlying HTTP handler. - */ - public function __construct(callable $handler = null) - { - $this->handler = $handler; - } - /** - * Invokes the handler stack as a composed handler - * - * @param RequestInterface $request - * @param array $options - */ - public function __invoke(\Psr\Http\Message\RequestInterface $request, array $options) - { - $handler = $this->resolve(); - return $handler($request, $options); - } - /** - * Dumps a string representation of the stack. - * - * @return string - */ - public function __toString() - { - $depth = 0; - $stack = []; - if ($this->handler) { - $stack[] = "0) Handler: " . $this->debugCallable($this->handler); - } - $result = ''; - foreach (\array_reverse($this->stack) as $tuple) { - $depth++; - $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= "Function: " . $this->debugCallable($tuple[0]); - $result = "> {$str}\n{$result}"; - $stack[] = $str; - } - foreach (\array_keys($stack) as $k) { - $result .= "< {$stack[$k]}\n"; - } - return $result; - } - /** - * Set the HTTP handler that actually returns a promise. - * - * @param callable $handler Accepts a request and array of options and - * returns a Promise. - */ - public function setHandler(callable $handler) - { - $this->handler = $handler; - $this->cached = null; - } - /** - * Returns true if the builder has a handler. - * - * @return bool - */ - public function hasHandler() - { - return (bool) $this->handler; - } - /** - * Unshift a middleware to the bottom of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function unshift(callable $middleware, $name = null) - { - \array_unshift($this->stack, [$middleware, $name]); - $this->cached = null; - } - /** - * Push a middleware to the top of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function push(callable $middleware, $name = '') - { - $this->stack[] = [$middleware, $name]; - $this->cached = null; - } - /** - * Add a middleware before another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function before($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, \true); - } - /** - * Add a middleware after another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function after($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, \false); - } - /** - * Remove a middleware by instance or name from the stack. - * - * @param callable|string $remove Middleware to remove by instance or name. - */ - public function remove($remove) - { - $this->cached = null; - $idx = \is_callable($remove) ? 0 : 1; - $this->stack = \array_values(\array_filter($this->stack, function ($tuple) use($idx, $remove) { - return $tuple[$idx] !== $remove; - })); - } - /** - * Compose the middleware and handler into a single callable function. - * - * @return callable - */ - public function resolve() - { - if (!$this->cached) { - if (!($prev = $this->handler)) { - throw new \LogicException('No handler has been specified'); - } - foreach (\array_reverse($this->stack) as $fn) { - $prev = $fn[0]($prev); - } - $this->cached = $prev; - } - return $this->cached; - } - /** - * @param string $name - * @return int - */ - private function findByName($name) - { - foreach ($this->stack as $k => $v) { - if ($v[1] === $name) { - return $k; - } - } - throw new \InvalidArgumentException("Middleware not found: {$name}"); - } - /** - * Splices a function into the middleware list at a specific position. - * - * @param string $findName - * @param string $withName - * @param callable $middleware - * @param bool $before - */ - private function splice($findName, $withName, callable $middleware, $before) - { - $this->cached = null; - $idx = $this->findByName($findName); - $tuple = [$middleware, $withName]; - if ($before) { - if ($idx === 0) { - \array_unshift($this->stack, $tuple); - } else { - $replacement = [$tuple, $this->stack[$idx]]; - \array_splice($this->stack, $idx, 1, $replacement); - } - } elseif ($idx === \count($this->stack) - 1) { - $this->stack[] = $tuple; - } else { - $replacement = [$this->stack[$idx], $tuple]; - \array_splice($this->stack, $idx, 1, $replacement); - } - } - /** - * Provides a debug string for a given callable. - * - * @param array|callable $fn Function to write as a string. - * - * @return string - */ - private function debugCallable($fn) - { - if (\is_string($fn)) { - return "callable({$fn})"; - } - if (\is_array($fn)) { - return \is_string($fn[0]) ? "callable({$fn[0]}::{$fn[1]})" : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])"; - } - return 'callable(' . \spl_object_hash($fn) . ')'; - } -} diff --git a/build/guzzle/src/MessageFormatter.php b/build/guzzle/src/MessageFormatter.php deleted file mode 100644 index b8238e6..0000000 --- a/build/guzzle/src/MessageFormatter.php +++ /dev/null @@ -1,151 +0,0 @@ ->>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; - const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; - /** @var string Template used to format log messages */ - private $template; - /** - * @param string $template Log message template - */ - public function __construct($template = self::CLF) - { - $this->template = $template ?: self::CLF; - } - /** - * Returns a formatted message string. - * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface $response Response that was received - * @param \Exception $error Exception that was received - * - * @return string - */ - public function format(\Psr\Http\Message\RequestInterface $request, \Psr\Http\Message\ResponseInterface $response = null, \Exception $error = null) - { - $cache = []; - return \preg_replace_callback('/{\\s*([A-Za-z_\\-\\.0-9]+)\\s*}/', function (array $matches) use($request, $response, $error, &$cache) { - if (isset($cache[$matches[1]])) { - return $cache[$matches[1]]; - } - $result = ''; - switch ($matches[1]) { - case 'request': - $result = \PayNL\GuzzleHttp\Psr7\str($request); - break; - case 'response': - $result = $response ? \PayNL\GuzzleHttp\Psr7\str($response) : ''; - break; - case 'req_headers': - $result = \trim($request->getMethod() . ' ' . $request->getRequestTarget()) . ' HTTP/' . $request->getProtocolVersion() . "\r\n" . $this->headers($request); - break; - case 'res_headers': - $result = $response ? \sprintf('HTTP/%s %d %s', $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase()) . "\r\n" . $this->headers($response) : 'NULL'; - break; - case 'req_body': - $result = $request->getBody(); - break; - case 'res_body': - $result = $response ? $response->getBody() : 'NULL'; - break; - case 'ts': - case 'date_iso_8601': - $result = \gmdate('c'); - break; - case 'date_common_log': - $result = \date('d/M/Y:H:i:s O'); - break; - case 'method': - $result = $request->getMethod(); - break; - case 'version': - $result = $request->getProtocolVersion(); - break; - case 'uri': - case 'url': - $result = $request->getUri(); - break; - case 'target': - $result = $request->getRequestTarget(); - break; - case 'req_version': - $result = $request->getProtocolVersion(); - break; - case 'res_version': - $result = $response ? $response->getProtocolVersion() : 'NULL'; - break; - case 'host': - $result = $request->getHeaderLine('Host'); - break; - case 'hostname': - $result = \gethostname(); - break; - case 'code': - $result = $response ? $response->getStatusCode() : 'NULL'; - break; - case 'phrase': - $result = $response ? $response->getReasonPhrase() : 'NULL'; - break; - case 'error': - $result = $error ? $error->getMessage() : 'NULL'; - break; - default: - // handle prefixed dynamic headers - if (\strpos($matches[1], 'req_header_') === 0) { - $result = $request->getHeaderLine(\substr($matches[1], 11)); - } elseif (\strpos($matches[1], 'res_header_') === 0) { - $result = $response ? $response->getHeaderLine(\substr($matches[1], 11)) : 'NULL'; - } - } - $cache[$matches[1]] = $result; - return $result; - }, $this->template); - } - private function headers(\Psr\Http\Message\MessageInterface $message) - { - $result = ''; - foreach ($message->getHeaders() as $name => $values) { - $result .= $name . ': ' . \implode(', ', $values) . "\r\n"; - } - return \trim($result); - } -} diff --git a/build/guzzle/src/Middleware.php b/build/guzzle/src/Middleware.php deleted file mode 100644 index 898adf3..0000000 --- a/build/guzzle/src/Middleware.php +++ /dev/null @@ -1,221 +0,0 @@ -withCookieHeader($request); - return $handler($request, $options)->then(function ($response) use($cookieJar, $request) { - $cookieJar->extractCookies($request, $response); - return $response; - }); - }; - }; - } - /** - * Middleware that throws exceptions for 4xx or 5xx responses when the - * "http_error" request option is set to true. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function httpErrors() - { - return function (callable $handler) { - return function ($request, array $options) use($handler) { - if (empty($options['http_errors'])) { - return $handler($request, $options); - } - return $handler($request, $options)->then(function (\Psr\Http\Message\ResponseInterface $response) use($request) { - $code = $response->getStatusCode(); - if ($code < 400) { - return $response; - } - throw \PayNL\GuzzleHttp\Exception\RequestException::create($request, $response); - }); - }; - }; - } - /** - * Middleware that pushes history data to an ArrayAccess container. - * - * @param array|\ArrayAccess $container Container to hold the history (by reference). - * - * @return callable Returns a function that accepts the next handler. - * @throws \InvalidArgumentException if container is not an array or ArrayAccess. - */ - public static function history(&$container) - { - if (!\is_array($container) && !$container instanceof \ArrayAccess) { - throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); - } - return function (callable $handler) use(&$container) { - return function ($request, array $options) use($handler, &$container) { - return $handler($request, $options)->then(function ($value) use($request, &$container, $options) { - $container[] = ['request' => $request, 'response' => $value, 'error' => null, 'options' => $options]; - return $value; - }, function ($reason) use($request, &$container, $options) { - $container[] = ['request' => $request, 'response' => null, 'error' => $reason, 'options' => $options]; - return \PayNL\GuzzleHttp\Promise\rejection_for($reason); - }); - }; - }; - } - /** - * Middleware that invokes a callback before and after sending a request. - * - * The provided listener cannot modify or alter the response. It simply - * "taps" into the chain to be notified before returning the promise. The - * before listener accepts a request and options array, and the after - * listener accepts a request, options array, and response promise. - * - * @param callable $before Function to invoke before forwarding the request. - * @param callable $after Function invoked after forwarding. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function tap(callable $before = null, callable $after = null) - { - return function (callable $handler) use($before, $after) { - return function ($request, array $options) use($handler, $before, $after) { - if ($before) { - $before($request, $options); - } - $response = $handler($request, $options); - if ($after) { - $after($request, $options, $response); - } - return $response; - }; - }; - } - /** - * Middleware that handles request redirects. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function redirect() - { - return function (callable $handler) { - return new \PayNL\GuzzleHttp\RedirectMiddleware($handler); - }; - } - /** - * Middleware that retries requests based on the boolean result of - * invoking the provided "decider" function. - * - * If no delay function is provided, a simple implementation of exponential - * backoff will be utilized. - * - * @param callable $decider Function that accepts the number of retries, - * a request, [response], and [exception] and - * returns true if the request is to be retried. - * @param callable $delay Function that accepts the number of retries and - * returns the number of milliseconds to delay. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function retry(callable $decider, callable $delay = null) - { - return function (callable $handler) use($decider, $delay) { - return new \PayNL\GuzzleHttp\RetryMiddleware($decider, $handler, $delay); - }; - } - /** - * Middleware that logs requests, responses, and errors using a message - * formatter. - * - * @param LoggerInterface $logger Logs messages. - * @param MessageFormatter $formatter Formatter used to create message strings. - * @param string $logLevel Level at which to log requests. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function log(\Psr\Log\LoggerInterface $logger, \PayNL\GuzzleHttp\MessageFormatter $formatter, $logLevel = 'info') - { - return function (callable $handler) use($logger, $formatter, $logLevel) { - return function ($request, array $options) use($handler, $logger, $formatter, $logLevel) { - return $handler($request, $options)->then(function ($response) use($logger, $request, $formatter, $logLevel) { - $message = $formatter->format($request, $response); - $logger->log($logLevel, $message); - return $response; - }, function ($reason) use($logger, $request, $formatter) { - $response = $reason instanceof \PayNL\GuzzleHttp\Exception\RequestException ? $reason->getResponse() : null; - $message = $formatter->format($request, $response, $reason); - $logger->notice($message); - return \PayNL\GuzzleHttp\Promise\rejection_for($reason); - }); - }; - }; - } - /** - * This middleware adds a default content-type if possible, a default - * content-length or transfer-encoding header, and the expect header. - * - * @return callable - */ - public static function prepareBody() - { - return function (callable $handler) { - return new \PayNL\GuzzleHttp\PrepareBodyMiddleware($handler); - }; - } - /** - * Middleware that applies a map function to the request before passing to - * the next handler. - * - * @param callable $fn Function that accepts a RequestInterface and returns - * a RequestInterface. - * @return callable - */ - public static function mapRequest(callable $fn) - { - return function (callable $handler) use($fn) { - return function ($request, array $options) use($handler, $fn) { - return $handler($fn($request), $options); - }; - }; - } - /** - * Middleware that applies a map function to the resolved promise's - * response. - * - * @param callable $fn Function that accepts a ResponseInterface and - * returns a ResponseInterface. - * @return callable - */ - public static function mapResponse(callable $fn) - { - return function (callable $handler) use($fn) { - return function ($request, array $options) use($handler, $fn) { - return $handler($request, $options)->then($fn); - }; - }; - } -} diff --git a/build/guzzle/src/Pool.php b/build/guzzle/src/Pool.php deleted file mode 100644 index a7e5884..0000000 --- a/build/guzzle/src/Pool.php +++ /dev/null @@ -1,106 +0,0 @@ - $rfn) { - if ($rfn instanceof \Psr\Http\Message\RequestInterface) { - (yield $key => $client->sendAsync($rfn, $opts)); - } elseif (\is_callable($rfn)) { - (yield $key => $rfn($opts)); - } else { - throw new \InvalidArgumentException('Each value yielded by ' . 'the iterator must be a Psr7\\Http\\Message\\RequestInterface ' . 'or a callable that returns a promise that fulfills ' . 'with a Psr7\\Message\\Http\\ResponseInterface object.'); - } - } - }; - $this->each = new \PayNL\GuzzleHttp\Promise\EachPromise($requests(), $config); - } - public function promise() - { - return $this->each->promise(); - } - /** - * Sends multiple requests concurrently and returns an array of responses - * and exceptions that uses the same ordering as the provided requests. - * - * IMPORTANT: This method keeps every request and response in memory, and - * as such, is NOT recommended when sending a large number or an - * indeterminate number of requests concurrently. - * - * @param ClientInterface $client Client used to send the requests - * @param array|\Iterator $requests Requests to send concurrently. - * @param array $options Passes through the options available in - * {@see GuzzleHttp\Pool::__construct} - * - * @return array Returns an array containing the response or an exception - * in the same order that the requests were sent. - * @throws \InvalidArgumentException if the event format is incorrect. - */ - public static function batch(\PayNL\GuzzleHttp\ClientInterface $client, $requests, array $options = []) - { - $res = []; - self::cmpCallback($options, 'fulfilled', $res); - self::cmpCallback($options, 'rejected', $res); - $pool = new static($client, $requests, $options); - $pool->promise()->wait(); - \ksort($res); - return $res; - } - private static function cmpCallback(array &$options, $name, array &$results) - { - if (!isset($options[$name])) { - $options[$name] = function ($v, $k) use(&$results) { - $results[$k] = $v; - }; - } else { - $currentFn = $options[$name]; - $options[$name] = function ($v, $k) use(&$results, $currentFn) { - $currentFn($v, $k); - $results[$k] = $v; - }; - } - } -} diff --git a/build/guzzle/src/PrepareBodyMiddleware.php b/build/guzzle/src/PrepareBodyMiddleware.php deleted file mode 100644 index beab3a5..0000000 --- a/build/guzzle/src/PrepareBodyMiddleware.php +++ /dev/null @@ -1,86 +0,0 @@ -nextHandler = $nextHandler; - } - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(\Psr\Http\Message\RequestInterface $request, array $options) - { - $fn = $this->nextHandler; - // Don't do anything if the request has no body. - if ($request->getBody()->getSize() === 0) { - return $fn($request, $options); - } - $modify = []; - // Add a default content-type if possible. - if (!$request->hasHeader('Content-Type')) { - if ($uri = $request->getBody()->getMetadata('uri')) { - if ($type = \PayNL\GuzzleHttp\Psr7\mimetype_from_filename($uri)) { - $modify['set_headers']['Content-Type'] = $type; - } - } - } - // Add a default content-length or transfer-encoding header. - if (!$request->hasHeader('Content-Length') && !$request->hasHeader('Transfer-Encoding')) { - $size = $request->getBody()->getSize(); - if ($size !== null) { - $modify['set_headers']['Content-Length'] = $size; - } else { - $modify['set_headers']['Transfer-Encoding'] = 'chunked'; - } - } - // Add the expect header if needed. - $this->addExpectHeader($request, $options, $modify); - return $fn(\PayNL\GuzzleHttp\Psr7\modify_request($request, $modify), $options); - } - private function addExpectHeader(\Psr\Http\Message\RequestInterface $request, array $options, array &$modify) - { - // Determine if the Expect header should be used - if ($request->hasHeader('Expect')) { - return; - } - $expect = isset($options['expect']) ? $options['expect'] : null; - // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 - if ($expect === \false || $request->getProtocolVersion() < 1.1) { - return; - } - // The expect header is unconditionally enabled - if ($expect === \true) { - $modify['set_headers']['Expect'] = '100-Continue'; - return; - } - // By default, send the expect header when the payload is > 1mb - if ($expect === null) { - $expect = 1048576; - } - // Always add if the body cannot be rewound, the size cannot be - // determined, or the size is greater than the cutoff threshold - $body = $request->getBody(); - $size = $body->getSize(); - if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { - $modify['set_headers']['Expect'] = '100-Continue'; - } - } -} diff --git a/build/guzzle/src/RedirectMiddleware.php b/build/guzzle/src/RedirectMiddleware.php deleted file mode 100644 index c478d58..0000000 --- a/build/guzzle/src/RedirectMiddleware.php +++ /dev/null @@ -1,160 +0,0 @@ - 5, 'protocols' => ['http', 'https'], 'strict' => \false, 'referer' => \false, 'track_redirects' => \false]; - /** @var callable */ - private $nextHandler; - /** - * @param callable $nextHandler Next handler to invoke. - */ - public function __construct(callable $nextHandler) - { - $this->nextHandler = $nextHandler; - } - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(\Psr\Http\Message\RequestInterface $request, array $options) - { - $fn = $this->nextHandler; - if (empty($options['allow_redirects'])) { - return $fn($request, $options); - } - if ($options['allow_redirects'] === \true) { - $options['allow_redirects'] = self::$defaultSettings; - } elseif (!\is_array($options['allow_redirects'])) { - throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); - } else { - // Merge the default settings with the provided settings - $options['allow_redirects'] += self::$defaultSettings; - } - if (empty($options['allow_redirects']['max'])) { - return $fn($request, $options); - } - return $fn($request, $options)->then(function (\Psr\Http\Message\ResponseInterface $response) use($request, $options) { - return $this->checkRedirect($request, $options, $response); - }); - } - /** - * @param RequestInterface $request - * @param array $options - * @param ResponseInterface|PromiseInterface $response - * - * @return ResponseInterface|PromiseInterface - */ - public function checkRedirect(\Psr\Http\Message\RequestInterface $request, array $options, \Psr\Http\Message\ResponseInterface $response) - { - if (\substr($response->getStatusCode(), 0, 1) != '3' || !$response->hasHeader('Location')) { - return $response; - } - $this->guardMax($request, $options); - $nextRequest = $this->modifyRequest($request, $options, $response); - if (isset($options['allow_redirects']['on_redirect'])) { - \call_user_func($options['allow_redirects']['on_redirect'], $request, $response, $nextRequest->getUri()); - } - /** @var PromiseInterface|ResponseInterface $promise */ - $promise = $this($nextRequest, $options); - // Add headers to be able to track history of redirects. - if (!empty($options['allow_redirects']['track_redirects'])) { - return $this->withTracking($promise, (string) $nextRequest->getUri(), $response->getStatusCode()); - } - return $promise; - } - private function withTracking(\PayNL\GuzzleHttp\Promise\PromiseInterface $promise, $uri, $statusCode) - { - return $promise->then(function (\Psr\Http\Message\ResponseInterface $response) use($uri, $statusCode) { - // Note that we are pushing to the front of the list as this - // would be an earlier response than what is currently present - // in the history header. - $historyHeader = $response->getHeader(self::HISTORY_HEADER); - $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); - \array_unshift($historyHeader, $uri); - \array_unshift($statusHeader, $statusCode); - return $response->withHeader(self::HISTORY_HEADER, $historyHeader)->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); - }); - } - private function guardMax(\Psr\Http\Message\RequestInterface $request, array &$options) - { - $current = isset($options['__redirect_count']) ? $options['__redirect_count'] : 0; - $options['__redirect_count'] = $current + 1; - $max = $options['allow_redirects']['max']; - if ($options['__redirect_count'] > $max) { - throw new \PayNL\GuzzleHttp\Exception\TooManyRedirectsException("Will not follow more than {$max} redirects", $request); - } - } - /** - * @param RequestInterface $request - * @param array $options - * @param ResponseInterface $response - * - * @return RequestInterface - */ - public function modifyRequest(\Psr\Http\Message\RequestInterface $request, array $options, \Psr\Http\Message\ResponseInterface $response) - { - // Request modifications to apply. - $modify = []; - $protocols = $options['allow_redirects']['protocols']; - // Use a GET request if this is an entity enclosing request and we are - // not forcing RFC compliance, but rather emulating what all browsers - // would do. - $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || $statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict']) { - $modify['method'] = 'GET'; - $modify['body'] = ''; - } - $modify['uri'] = $this->redirectUri($request, $response, $protocols); - \PayNL\GuzzleHttp\Psr7\rewind_body($request); - // Add the Referer header if it is told to do so and only - // add the header if we are not redirecting from https to http. - if ($options['allow_redirects']['referer'] && $modify['uri']->getScheme() === $request->getUri()->getScheme()) { - $uri = $request->getUri()->withUserInfo(''); - $modify['set_headers']['Referer'] = (string) $uri; - } else { - $modify['remove_headers'][] = 'Referer'; - } - // Remove Authorization header if host is different. - if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { - $modify['remove_headers'][] = 'Authorization'; - } - return \PayNL\GuzzleHttp\Psr7\modify_request($request, $modify); - } - /** - * Set the appropriate URL on the request based on the location header - * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param array $protocols - * - * @return UriInterface - */ - private function redirectUri(\Psr\Http\Message\RequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $protocols) - { - $location = \PayNL\GuzzleHttp\Psr7\UriResolver::resolve($request->getUri(), new \PayNL\GuzzleHttp\Psr7\Uri($response->getHeaderLine('Location'))); - // Ensure that the redirect URI is allowed based on the protocols. - if (!\in_array($location->getScheme(), $protocols)) { - throw new \PayNL\GuzzleHttp\Exception\BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response); - } - return $location; - } -} diff --git a/build/guzzle/src/RequestOptions.php b/build/guzzle/src/RequestOptions.php deleted file mode 100644 index e4c6a59..0000000 --- a/build/guzzle/src/RequestOptions.php +++ /dev/null @@ -1,228 +0,0 @@ -decider = $decider; - $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; - } - /** - * Default exponential backoff delay function. - * - * @param int $retries - * - * @return int - */ - public static function exponentialDelay($retries) - { - return (int) \pow(2, $retries - 1); - } - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(\Psr\Http\Message\RequestInterface $request, array $options) - { - if (!isset($options['retries'])) { - $options['retries'] = 0; - } - $fn = $this->nextHandler; - return $fn($request, $options)->then($this->onFulfilled($request, $options), $this->onRejected($request, $options)); - } - private function onFulfilled(\Psr\Http\Message\RequestInterface $req, array $options) - { - return function ($value) use($req, $options) { - if (!\call_user_func($this->decider, $options['retries'], $req, $value, null)) { - return $value; - } - return $this->doRetry($req, $options, $value); - }; - } - private function onRejected(\Psr\Http\Message\RequestInterface $req, array $options) - { - return function ($reason) use($req, $options) { - if (!\call_user_func($this->decider, $options['retries'], $req, null, $reason)) { - return \PayNL\GuzzleHttp\Promise\rejection_for($reason); - } - return $this->doRetry($req, $options); - }; - } - private function doRetry(\Psr\Http\Message\RequestInterface $request, array $options, \Psr\Http\Message\ResponseInterface $response = null) - { - $options['delay'] = \call_user_func($this->delay, ++$options['retries'], $response); - return $this($request, $options); - } -} diff --git a/build/guzzle/src/TransferStats.php b/build/guzzle/src/TransferStats.php deleted file mode 100644 index 172bbf9..0000000 --- a/build/guzzle/src/TransferStats.php +++ /dev/null @@ -1,110 +0,0 @@ -request = $request; - $this->response = $response; - $this->transferTime = $transferTime; - $this->handlerErrorData = $handlerErrorData; - $this->handlerStats = $handlerStats; - } - /** - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } - /** - * Returns the response that was received (if any). - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } - /** - * Returns true if a response was received. - * - * @return bool - */ - public function hasResponse() - { - return $this->response !== null; - } - /** - * Gets handler specific error data. - * - * This might be an exception, a integer representing an error code, or - * anything else. Relying on this value assumes that you know what handler - * you are using. - * - * @return mixed - */ - public function getHandlerErrorData() - { - return $this->handlerErrorData; - } - /** - * Get the effective URI the request was sent to. - * - * @return UriInterface - */ - public function getEffectiveUri() - { - return $this->request->getUri(); - } - /** - * Get the estimated time the request was being transferred by the handler. - * - * @return float Time in seconds. - */ - public function getTransferTime() - { - return $this->transferTime; - } - /** - * Gets an array of all of the handler specific transfer data. - * - * @return array - */ - public function getHandlerStats() - { - return $this->handlerStats; - } - /** - * Get a specific handler statistic from the handler by name. - * - * @param string $stat Handler specific transfer stat to retrieve. - * - * @return mixed|null - */ - public function getHandlerStat($stat) - { - return isset($this->handlerStats[$stat]) ? $this->handlerStats[$stat] : null; - } -} diff --git a/build/guzzle/src/UriTemplate.php b/build/guzzle/src/UriTemplate.php deleted file mode 100644 index 1d34d52..0000000 --- a/build/guzzle/src/UriTemplate.php +++ /dev/null @@ -1,191 +0,0 @@ - ['prefix' => '', 'joiner' => ',', 'query' => \false], '+' => ['prefix' => '', 'joiner' => ',', 'query' => \false], '#' => ['prefix' => '#', 'joiner' => ',', 'query' => \false], '.' => ['prefix' => '.', 'joiner' => '.', 'query' => \false], '/' => ['prefix' => '/', 'joiner' => '/', 'query' => \false], ';' => ['prefix' => ';', 'joiner' => ';', 'query' => \true], '?' => ['prefix' => '?', 'joiner' => '&', 'query' => \true], '&' => ['prefix' => '&', 'joiner' => '&', 'query' => \true]]; - /** @var array Delimiters */ - private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=']; - /** @var array Percent encoded delimiters */ - private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', '%3B', '%3D']; - public function expand($template, array $variables) - { - if (\false === \strpos($template, '{')) { - return $template; - } - $this->template = $template; - $this->variables = $variables; - return \preg_replace_callback('/\\{([^\\}]+)\\}/', [$this, 'expandMatch'], $this->template); - } - /** - * Parse an expression into parts - * - * @param string $expression Expression to parse - * - * @return array Returns an associative array of parts - */ - private function parseExpression($expression) - { - $result = []; - if (isset(self::$operatorHash[$expression[0]])) { - $result['operator'] = $expression[0]; - $expression = \substr($expression, 1); - } else { - $result['operator'] = ''; - } - foreach (\explode(',', $expression) as $value) { - $value = \trim($value); - $varspec = []; - if ($colonPos = \strpos($value, ':')) { - $varspec['value'] = \substr($value, 0, $colonPos); - $varspec['modifier'] = ':'; - $varspec['position'] = (int) \substr($value, $colonPos + 1); - } elseif (\substr($value, -1) === '*') { - $varspec['modifier'] = '*'; - $varspec['value'] = \substr($value, 0, -1); - } else { - $varspec['value'] = (string) $value; - $varspec['modifier'] = ''; - } - $result['values'][] = $varspec; - } - return $result; - } - /** - * Process an expansion - * - * @param array $matches Matches met in the preg_replace_callback - * - * @return string Returns the replacement string - */ - private function expandMatch(array $matches) - { - static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; - $replacements = []; - $parsed = self::parseExpression($matches[1]); - $prefix = self::$operatorHash[$parsed['operator']]['prefix']; - $joiner = self::$operatorHash[$parsed['operator']]['joiner']; - $useQuery = self::$operatorHash[$parsed['operator']]['query']; - foreach ($parsed['values'] as $value) { - if (!isset($this->variables[$value['value']])) { - continue; - } - $variable = $this->variables[$value['value']]; - $actuallyUseQuery = $useQuery; - $expanded = ''; - if (\is_array($variable)) { - $isAssoc = $this->isAssoc($variable); - $kvp = []; - foreach ($variable as $key => $var) { - if ($isAssoc) { - $key = \rawurlencode($key); - $isNestedArray = \is_array($var); - } else { - $isNestedArray = \false; - } - if (!$isNestedArray) { - $var = \rawurlencode($var); - if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { - $var = $this->decodeReserved($var); - } - } - if ($value['modifier'] === '*') { - if ($isAssoc) { - if ($isNestedArray) { - // Nested arrays must allow for deeply nested - // structures. - $var = \strtr(\http_build_query([$key => $var]), $rfc1738to3986); - } else { - $var = $key . '=' . $var; - } - } elseif ($key > 0 && $actuallyUseQuery) { - $var = $value['value'] . '=' . $var; - } - } - $kvp[$key] = $var; - } - if (empty($variable)) { - $actuallyUseQuery = \false; - } elseif ($value['modifier'] === '*') { - $expanded = \implode($joiner, $kvp); - if ($isAssoc) { - // Don't prepend the value name when using the explode - // modifier with an associative array. - $actuallyUseQuery = \false; - } - } else { - if ($isAssoc) { - // When an associative array is encountered and the - // explode modifier is not set, then the result must be - // a comma separated list of keys followed by their - // respective values. - foreach ($kvp as $k => &$v) { - $v = $k . ',' . $v; - } - } - $expanded = \implode(',', $kvp); - } - } else { - if ($value['modifier'] === ':') { - $variable = \substr($variable, 0, $value['position']); - } - $expanded = \rawurlencode($variable); - if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { - $expanded = $this->decodeReserved($expanded); - } - } - if ($actuallyUseQuery) { - if (!$expanded && $joiner !== '&') { - $expanded = $value['value']; - } else { - $expanded = $value['value'] . '=' . $expanded; - } - } - $replacements[] = $expanded; - } - $ret = \implode($joiner, $replacements); - if ($ret && $prefix) { - return $prefix . $ret; - } - return $ret; - } - /** - * Determines if an array is associative. - * - * This makes the assumption that input arrays are sequences or hashes. - * This assumption is a tradeoff for accuracy in favor of speed, but it - * should work in almost every case where input is supplied for a URI - * template. - * - * @param array $array Array to check - * - * @return bool - */ - private function isAssoc(array $array) - { - return $array && \array_keys($array)[0] !== 0; - } - /** - * Removes percent encoding on reserved characters (used with + and # - * modifiers). - * - * @param string $string String to fix - * - * @return string - */ - private function decodeReserved($string) - { - return \str_replace(self::$delimsPct, self::$delims, $string); - } -} diff --git a/build/guzzle/src/functions.php b/build/guzzle/src/functions.php deleted file mode 100644 index 5f01505..0000000 --- a/build/guzzle/src/functions.php +++ /dev/null @@ -1,305 +0,0 @@ -expand($template, $variables); -} -/** - * Debug function used to describe the provided value type and class. - * - * @param mixed $input - * - * @return string Returns a string containing the type of the variable and - * if a class is provided, the class name. - */ -function describe_type($input) -{ - switch (\gettype($input)) { - case 'object': - return 'object(' . \get_class($input) . ')'; - case 'array': - return 'array(' . \count($input) . ')'; - default: - \ob_start(); - \var_dump($input); - // normalize float vs double - return \str_replace('double(', 'float(', \rtrim(\ob_get_clean())); - } -} -/** - * Parses an array of header lines into an associative array of headers. - * - * @param array $lines Header lines array of strings in the following - * format: "Name: Value" - * @return array - */ -function headers_from_lines($lines) -{ - $headers = []; - foreach ($lines as $line) { - $parts = \explode(':', $line, 2); - $headers[\trim($parts[0])][] = isset($parts[1]) ? \trim($parts[1]) : null; - } - return $headers; -} -/** - * Returns a debug stream based on the provided variable. - * - * @param mixed $value Optional value - * - * @return resource - */ -function debug_resource($value = null) -{ - if (\is_resource($value)) { - return $value; - } elseif (\defined('STDOUT')) { - return \STDOUT; - } - return \fopen('php://output', 'w'); -} -/** - * Chooses and creates a default handler to use based on the environment. - * - * The returned handler is not wrapped by any default middlewares. - * - * @throws \RuntimeException if no viable Handler is available. - * @return callable Returns the best handler for the given system. - */ -function choose_handler() -{ - $handler = null; - if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { - $handler = \PayNL\GuzzleHttp\Handler\Proxy::wrapSync(new \PayNL\GuzzleHttp\Handler\CurlMultiHandler(), new \PayNL\GuzzleHttp\Handler\CurlHandler()); - } elseif (\function_exists('curl_exec')) { - $handler = new \PayNL\GuzzleHttp\Handler\CurlHandler(); - } elseif (\function_exists('curl_multi_exec')) { - $handler = new \PayNL\GuzzleHttp\Handler\CurlMultiHandler(); - } - if (\ini_get('allow_url_fopen')) { - $handler = $handler ? \PayNL\GuzzleHttp\Handler\Proxy::wrapStreaming($handler, new \PayNL\GuzzleHttp\Handler\StreamHandler()) : new \PayNL\GuzzleHttp\Handler\StreamHandler(); - } elseif (!$handler) { - throw new \RuntimeException('GuzzleHttp requires cURL, the ' . 'allow_url_fopen ini setting, or a custom HTTP handler.'); - } - return $handler; -} -/** - * Get the default User-Agent string to use with Guzzle - * - * @return string - */ -function default_user_agent() -{ - static $defaultAgent = ''; - if (!$defaultAgent) { - $defaultAgent = 'GuzzleHttp/' . \PayNL\GuzzleHttp\Client::VERSION; - if (\extension_loaded('curl') && \function_exists('curl_version')) { - $defaultAgent .= ' curl/' . \curl_version()['version']; - } - $defaultAgent .= ' PHP/' . \PHP_VERSION; - } - return $defaultAgent; -} -/** - * Returns the default cacert bundle for the current system. - * - * First, the openssl.cafile and curl.cainfo php.ini settings are checked. - * If those settings are not configured, then the common locations for - * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X - * and Windows are checked. If any of these file locations are found on - * disk, they will be utilized. - * - * Note: the result of this function is cached for subsequent calls. - * - * @return string - * @throws \RuntimeException if no bundle can be found. - */ -function default_ca_bundle() -{ - static $cached = null; - static $cafiles = [ - // Red Hat, CentOS, Fedora (provided by the ca-certificates package) - '/etc/pki/tls/certs/ca-bundle.crt', - // Ubuntu, Debian (provided by the ca-certificates package) - '/etc/ssl/certs/ca-certificates.crt', - // FreeBSD (provided by the ca_root_nss package) - '/usr/local/share/certs/ca-root-nss.crt', - // SLES 12 (provided by the ca-certificates package) - '/var/lib/ca-certificates/ca-bundle.pem', - // OS X provided by homebrew (using the default path) - '/usr/local/etc/openssl/cert.pem', - // Google app engine - '/etc/ca-certificates.crt', - // Windows? - 'C:\\windows\\system32\\curl-ca-bundle.crt', - 'C:\\windows\\curl-ca-bundle.crt', - ]; - if ($cached) { - return $cached; - } - if ($ca = \ini_get('openssl.cafile')) { - return $cached = $ca; - } - if ($ca = \ini_get('curl.cainfo')) { - return $cached = $ca; - } - foreach ($cafiles as $filename) { - if (\file_exists($filename)) { - return $cached = $filename; - } - } - throw new \RuntimeException(<<then(function ($v) { echo $v; }); - * - * @param callable $generatorFn Generator function to wrap into a promise. - * - * @return Promise - * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration - */ -final class Coroutine implements \PayNL\GuzzleHttp\Promise\PromiseInterface -{ - /** - * @var PromiseInterface|null - */ - private $currentPromise; - /** - * @var Generator - */ - private $generator; - /** - * @var Promise - */ - private $result; - public function __construct(callable $generatorFn) - { - $this->generator = $generatorFn(); - $this->result = new \PayNL\GuzzleHttp\Promise\Promise(function () { - while (isset($this->currentPromise)) { - $this->currentPromise->wait(); - } - }); - $this->nextCoroutine($this->generator->current()); - } - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - return $this->result->then($onFulfilled, $onRejected); - } - public function otherwise(callable $onRejected) - { - return $this->result->otherwise($onRejected); - } - public function wait($unwrap = \true) - { - return $this->result->wait($unwrap); - } - public function getState() - { - return $this->result->getState(); - } - public function resolve($value) - { - $this->result->resolve($value); - } - public function reject($reason) - { - $this->result->reject($reason); - } - public function cancel() - { - $this->currentPromise->cancel(); - $this->result->cancel(); - } - private function nextCoroutine($yielded) - { - $this->currentPromise = promise_for($yielded)->then([$this, '_handleSuccess'], [$this, '_handleFailure']); - } - /** - * @internal - */ - public function _handleSuccess($value) - { - unset($this->currentPromise); - try { - $next = $this->generator->send($value); - if ($this->generator->valid()) { - $this->nextCoroutine($next); - } else { - $this->result->resolve($value); - } - } catch (\Exception $exception) { - $this->result->reject($exception); - } catch (\Throwable $throwable) { - $this->result->reject($throwable); - } - } - /** - * @internal - */ - public function _handleFailure($reason) - { - unset($this->currentPromise); - try { - $nextYield = $this->generator->throw(exception_for($reason)); - // The throw was caught, so keep iterating on the coroutine - $this->nextCoroutine($nextYield); - } catch (\Exception $exception) { - $this->result->reject($exception); - } catch (\Throwable $throwable) { - $this->result->reject($throwable); - } - } -} diff --git a/build/promises/src/EachPromise.php b/build/promises/src/EachPromise.php deleted file mode 100644 index 42d7f92..0000000 --- a/build/promises/src/EachPromise.php +++ /dev/null @@ -1,190 +0,0 @@ -iterable = iter_for($iterable); - if (isset($config['concurrency'])) { - $this->concurrency = $config['concurrency']; - } - if (isset($config['fulfilled'])) { - $this->onFulfilled = $config['fulfilled']; - } - if (isset($config['rejected'])) { - $this->onRejected = $config['rejected']; - } - } - public function promise() - { - if ($this->aggregate) { - return $this->aggregate; - } - try { - $this->createPromise(); - $this->iterable->rewind(); - $this->refillPending(); - } catch (\Throwable $e) { - $this->aggregate->reject($e); - } catch (\Exception $e) { - $this->aggregate->reject($e); - } - return $this->aggregate; - } - private function createPromise() - { - $this->mutex = \false; - $this->aggregate = new \PayNL\GuzzleHttp\Promise\Promise(function () { - \reset($this->pending); - if (empty($this->pending) && !$this->iterable->valid()) { - $this->aggregate->resolve(null); - return; - } - // Consume a potentially fluctuating list of promises while - // ensuring that indexes are maintained (precluding array_shift). - while ($promise = \current($this->pending)) { - \next($this->pending); - $promise->wait(); - if ($this->aggregate->getState() !== \PayNL\GuzzleHttp\Promise\PromiseInterface::PENDING) { - return; - } - } - }); - // Clear the references when the promise is resolved. - $clearFn = function () { - $this->iterable = $this->concurrency = $this->pending = null; - $this->onFulfilled = $this->onRejected = null; - }; - $this->aggregate->then($clearFn, $clearFn); - } - private function refillPending() - { - if (!$this->concurrency) { - // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()) { - } - return; - } - // Add only up to N pending promises. - $concurrency = \is_callable($this->concurrency) ? \call_user_func($this->concurrency, \count($this->pending)) : $this->concurrency; - $concurrency = \max($concurrency - \count($this->pending), 0); - // Concurrency may be set to 0 to disallow new promises. - if (!$concurrency) { - return; - } - // Add the first pending promise. - $this->addPending(); - // Note this is special handling for concurrency=1 so that we do - // not advance the iterator after adding the first promise. This - // helps work around issues with generators that might not have the - // next value to yield until promise callbacks are called. - while (--$concurrency && $this->advanceIterator() && $this->addPending()) { - } - } - private function addPending() - { - if (!$this->iterable || !$this->iterable->valid()) { - return \false; - } - $promise = promise_for($this->iterable->current()); - $idx = $this->iterable->key(); - $this->pending[$idx] = $promise->then(function ($value) use($idx) { - if ($this->onFulfilled) { - \call_user_func($this->onFulfilled, $value, $idx, $this->aggregate); - } - $this->step($idx); - }, function ($reason) use($idx) { - if ($this->onRejected) { - \call_user_func($this->onRejected, $reason, $idx, $this->aggregate); - } - $this->step($idx); - }); - return \true; - } - private function advanceIterator() - { - // Place a lock on the iterator so that we ensure to not recurse, - // preventing fatal generator errors. - if ($this->mutex) { - return \false; - } - $this->mutex = \true; - try { - $this->iterable->next(); - $this->mutex = \false; - return \true; - } catch (\Throwable $e) { - $this->aggregate->reject($e); - $this->mutex = \false; - return \false; - } catch (\Exception $e) { - $this->aggregate->reject($e); - $this->mutex = \false; - return \false; - } - } - private function step($idx) - { - // If the promise was already resolved, then ignore this step. - if ($this->aggregate->getState() !== \PayNL\GuzzleHttp\Promise\PromiseInterface::PENDING) { - return; - } - unset($this->pending[$idx]); - // Only refill pending promises if we are not locked, preventing the - // EachPromise to recursively invoke the provided iterator, which - // cause a fatal error: "Cannot resume an already running generator" - if ($this->advanceIterator() && !$this->checkIfFinished()) { - // Add more pending promises if possible. - $this->refillPending(); - } - } - private function checkIfFinished() - { - if (!$this->pending && !$this->iterable->valid()) { - // Resolve the promise if there's nothing left to do. - $this->aggregate->resolve(null); - return \true; - } - return \false; - } -} diff --git a/build/promises/src/FulfilledPromise.php b/build/promises/src/FulfilledPromise.php deleted file mode 100644 index 0edaa6c..0000000 --- a/build/promises/src/FulfilledPromise.php +++ /dev/null @@ -1,69 +0,0 @@ -value = $value; - } - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - // Return itself if there is no onFulfilled function. - if (!$onFulfilled) { - return $this; - } - $queue = queue(); - $p = new \PayNL\GuzzleHttp\Promise\Promise([$queue, 'run']); - $value = $this->value; - $queue->add(static function () use($p, $value, $onFulfilled) { - if ($p->getState() === self::PENDING) { - try { - $p->resolve($onFulfilled($value)); - } catch (\Throwable $e) { - $p->reject($e); - } catch (\Exception $e) { - $p->reject($e); - } - } - }); - return $p; - } - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - public function wait($unwrap = \true, $defaultDelivery = null) - { - return $unwrap ? $this->value : null; - } - public function getState() - { - return self::FULFILLED; - } - public function resolve($value) - { - if ($value !== $this->value) { - throw new \LogicException("Cannot resolve a fulfilled promise"); - } - } - public function reject($reason) - { - throw new \LogicException("Cannot reject a fulfilled promise"); - } - public function cancel() - { - // pass - } -} diff --git a/build/promises/src/Promise.php b/build/promises/src/Promise.php deleted file mode 100644 index f92951a..0000000 --- a/build/promises/src/Promise.php +++ /dev/null @@ -1,231 +0,0 @@ -waitFn = $waitFn; - $this->cancelFn = $cancelFn; - } - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - if ($this->state === self::PENDING) { - $p = new \PayNL\GuzzleHttp\Promise\Promise(null, [$this, 'cancel']); - $this->handlers[] = [$p, $onFulfilled, $onRejected]; - $p->waitList = $this->waitList; - $p->waitList[] = $this; - return $p; - } - // Return a fulfilled promise and immediately invoke any callbacks. - if ($this->state === self::FULFILLED) { - return $onFulfilled ? promise_for($this->result)->then($onFulfilled) : promise_for($this->result); - } - // It's either cancelled or rejected, so return a rejected promise - // and immediately invoke any callbacks. - $rejection = rejection_for($this->result); - return $onRejected ? $rejection->then(null, $onRejected) : $rejection; - } - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - public function wait($unwrap = \true) - { - $this->waitIfPending(); - $inner = $this->result instanceof \PayNL\GuzzleHttp\Promise\PromiseInterface ? $this->result->wait($unwrap) : $this->result; - if ($unwrap) { - if ($this->result instanceof \PayNL\GuzzleHttp\Promise\PromiseInterface || $this->state === self::FULFILLED) { - return $inner; - } else { - // It's rejected so "unwrap" and throw an exception. - throw exception_for($inner); - } - } - } - public function getState() - { - return $this->state; - } - public function cancel() - { - if ($this->state !== self::PENDING) { - return; - } - $this->waitFn = $this->waitList = null; - if ($this->cancelFn) { - $fn = $this->cancelFn; - $this->cancelFn = null; - try { - $fn(); - } catch (\Throwable $e) { - $this->reject($e); - } catch (\Exception $e) { - $this->reject($e); - } - } - // Reject the promise only if it wasn't rejected in a then callback. - if ($this->state === self::PENDING) { - $this->reject(new \PayNL\GuzzleHttp\Promise\CancellationException('Promise has been cancelled')); - } - } - public function resolve($value) - { - $this->settle(self::FULFILLED, $value); - } - public function reject($reason) - { - $this->settle(self::REJECTED, $reason); - } - private function settle($state, $value) - { - if ($this->state !== self::PENDING) { - // Ignore calls with the same resolution. - if ($state === $this->state && $value === $this->result) { - return; - } - throw $this->state === $state ? new \LogicException("The promise is already {$state}.") : new \LogicException("Cannot change a {$this->state} promise to {$state}"); - } - if ($value === $this) { - throw new \LogicException('Cannot fulfill or reject a promise with itself'); - } - // Clear out the state of the promise but stash the handlers. - $this->state = $state; - $this->result = $value; - $handlers = $this->handlers; - $this->handlers = null; - $this->waitList = $this->waitFn = null; - $this->cancelFn = null; - if (!$handlers) { - return; - } - // If the value was not a settled promise or a thenable, then resolve - // it in the task queue using the correct ID. - if (!\method_exists($value, 'then')) { - $id = $state === self::FULFILLED ? 1 : 2; - // It's a success, so resolve the handlers in the queue. - queue()->add(static function () use($id, $value, $handlers) { - foreach ($handlers as $handler) { - self::callHandler($id, $value, $handler); - } - }); - } elseif ($value instanceof \PayNL\GuzzleHttp\Promise\Promise && $value->getState() === self::PENDING) { - // We can just merge our handlers onto the next promise. - $value->handlers = \array_merge($value->handlers, $handlers); - } else { - // Resolve the handlers when the forwarded promise is resolved. - $value->then(static function ($value) use($handlers) { - foreach ($handlers as $handler) { - self::callHandler(1, $value, $handler); - } - }, static function ($reason) use($handlers) { - foreach ($handlers as $handler) { - self::callHandler(2, $reason, $handler); - } - }); - } - } - /** - * Call a stack of handlers using a specific callback index and value. - * - * @param int $index 1 (resolve) or 2 (reject). - * @param mixed $value Value to pass to the callback. - * @param array $handler Array of handler data (promise and callbacks). - * - * @return array Returns the next group to resolve. - */ - private static function callHandler($index, $value, array $handler) - { - /** @var PromiseInterface $promise */ - $promise = $handler[0]; - // The promise may have been cancelled or resolved before placing - // this thunk in the queue. - if ($promise->getState() !== self::PENDING) { - return; - } - try { - if (isset($handler[$index])) { - $promise->resolve($handler[$index]($value)); - } elseif ($index === 1) { - // Forward resolution values as-is. - $promise->resolve($value); - } else { - // Forward rejections down the chain. - $promise->reject($value); - } - } catch (\Throwable $reason) { - $promise->reject($reason); - } catch (\Exception $reason) { - $promise->reject($reason); - } - } - private function waitIfPending() - { - if ($this->state !== self::PENDING) { - return; - } elseif ($this->waitFn) { - $this->invokeWaitFn(); - } elseif ($this->waitList) { - $this->invokeWaitList(); - } else { - // If there's not wait function, then reject the promise. - $this->reject('Cannot wait on a promise that has ' . 'no internal wait function. You must provide a wait ' . 'function when constructing the promise to be able to ' . 'wait on a promise.'); - } - queue()->run(); - if ($this->state === self::PENDING) { - $this->reject('Invoking the wait callback did not resolve the promise'); - } - } - private function invokeWaitFn() - { - try { - $wfn = $this->waitFn; - $this->waitFn = null; - $wfn(\true); - } catch (\Exception $reason) { - if ($this->state === self::PENDING) { - // The promise has not been resolved yet, so reject the promise - // with the exception. - $this->reject($reason); - } else { - // The promise was already resolved, so there's a problem in - // the application. - throw $reason; - } - } - } - private function invokeWaitList() - { - $waitList = $this->waitList; - $this->waitList = null; - foreach ($waitList as $result) { - while (\true) { - $result->waitIfPending(); - if ($result->result instanceof \PayNL\GuzzleHttp\Promise\Promise) { - $result = $result->result; - } else { - if ($result->result instanceof \PayNL\GuzzleHttp\Promise\PromiseInterface) { - $result->result->wait(\false); - } - break; - } - } - } - } -} diff --git a/build/promises/src/PromiseInterface.php b/build/promises/src/PromiseInterface.php deleted file mode 100644 index 9e8b2bd..0000000 --- a/build/promises/src/PromiseInterface.php +++ /dev/null @@ -1,84 +0,0 @@ -reason = $reason; - } - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - // If there's no onRejected callback then just return self. - if (!$onRejected) { - return $this; - } - $queue = queue(); - $reason = $this->reason; - $p = new \PayNL\GuzzleHttp\Promise\Promise([$queue, 'run']); - $queue->add(static function () use($p, $reason, $onRejected) { - if ($p->getState() === self::PENDING) { - try { - // Return a resolved promise if onRejected does not throw. - $p->resolve($onRejected($reason)); - } catch (\Throwable $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } catch (\Exception $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } - } - }); - return $p; - } - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - public function wait($unwrap = \true, $defaultDelivery = null) - { - if ($unwrap) { - throw exception_for($this->reason); - } - } - public function getState() - { - return self::REJECTED; - } - public function resolve($value) - { - throw new \LogicException("Cannot resolve a rejected promise"); - } - public function reject($reason) - { - if ($reason !== $this->reason) { - throw new \LogicException("Cannot reject a rejected promise"); - } - } - public function cancel() - { - // pass - } -} diff --git a/build/promises/src/RejectionException.php b/build/promises/src/RejectionException.php deleted file mode 100644 index 3b3446a..0000000 --- a/build/promises/src/RejectionException.php +++ /dev/null @@ -1,40 +0,0 @@ -reason = $reason; - $message = 'The promise was rejected'; - if ($description) { - $message .= ' with reason: ' . $description; - } elseif (\is_string($reason) || \is_object($reason) && \method_exists($reason, '__toString')) { - $message .= ' with reason: ' . $this->reason; - } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: ' . \json_encode($this->reason, \JSON_PRETTY_PRINT); - } - parent::__construct($message); - } - /** - * Returns the rejection reason. - * - * @return mixed - */ - public function getReason() - { - return $this->reason; - } -} diff --git a/build/promises/src/TaskQueue.php b/build/promises/src/TaskQueue.php deleted file mode 100644 index fedee94..0000000 --- a/build/promises/src/TaskQueue.php +++ /dev/null @@ -1,62 +0,0 @@ -run(); - */ -class TaskQueue implements \PayNL\GuzzleHttp\Promise\TaskQueueInterface -{ - private $enableShutdown = \true; - private $queue = []; - public function __construct($withShutdown = \true) - { - if ($withShutdown) { - \register_shutdown_function(function () { - if ($this->enableShutdown) { - // Only run the tasks if an E_ERROR didn't occur. - $err = \error_get_last(); - if (!$err || $err['type'] ^ \E_ERROR) { - $this->run(); - } - } - }); - } - } - public function isEmpty() - { - return !$this->queue; - } - public function add(callable $task) - { - $this->queue[] = $task; - } - public function run() - { - /** @var callable $task */ - while ($task = \array_shift($this->queue)) { - $task(); - } - } - /** - * The task queue will be run and exhausted by default when the process - * exits IFF the exit is not the result of a PHP E_ERROR error. - * - * You can disable running the automatic shutdown of the queue by calling - * this function. If you disable the task queue shutdown process, then you - * MUST either run the task queue (as a result of running your event loop - * or manually using the run() method) or wait on each outstanding promise. - * - * Note: This shutdown will occur before any destructors are triggered. - */ - public function disableShutdown() - { - $this->enableShutdown = \false; - } -} diff --git a/build/promises/src/TaskQueueInterface.php b/build/promises/src/TaskQueueInterface.php deleted file mode 100644 index bcfc11f..0000000 --- a/build/promises/src/TaskQueueInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * GuzzleHttp\Promise\queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - */ -function queue(\PayNL\GuzzleHttp\Promise\TaskQueueInterface $assign = null) -{ - static $queue; - if ($assign) { - $queue = $assign; - } elseif (!$queue) { - $queue = new \PayNL\GuzzleHttp\Promise\TaskQueue(); - } - return $queue; -} -/** - * Adds a function to run in the task queue when it is next `run()` and returns - * a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - */ -function task(callable $task) -{ - $queue = queue(); - $promise = new \PayNL\GuzzleHttp\Promise\Promise([$queue, 'run']); - $queue->add(function () use($task, $promise) { - try { - $promise->resolve($task()); - } catch (\Throwable $e) { - $promise->reject($e); - } catch (\Exception $e) { - $promise->reject($e); - } - }); - return $promise; -} -/** - * Creates a promise for a value if the value is not a promise. - * - * @param mixed $value Promise or value. - * - * @return PromiseInterface - */ -function promise_for($value) -{ - if ($value instanceof \PayNL\GuzzleHttp\Promise\PromiseInterface) { - return $value; - } - // Return a Guzzle promise that shadows the given promise. - if (\method_exists($value, 'then')) { - $wfn = \method_exists($value, 'wait') ? [$value, 'wait'] : null; - $cfn = \method_exists($value, 'cancel') ? [$value, 'cancel'] : null; - $promise = new \PayNL\GuzzleHttp\Promise\Promise($wfn, $cfn); - $value->then([$promise, 'resolve'], [$promise, 'reject']); - return $promise; - } - return new \PayNL\GuzzleHttp\Promise\FulfilledPromise($value); -} -/** - * Creates a rejected promise for a reason if the reason is not a promise. If - * the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - */ -function rejection_for($reason) -{ - if ($reason instanceof \PayNL\GuzzleHttp\Promise\PromiseInterface) { - return $reason; - } - return new \PayNL\GuzzleHttp\Promise\RejectedPromise($reason); -} -/** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - */ -function exception_for($reason) -{ - return $reason instanceof \Exception || $reason instanceof \Throwable ? $reason : new \PayNL\GuzzleHttp\Promise\RejectionException($reason); -} -/** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - */ -function iter_for($value) -{ - if ($value instanceof \Iterator) { - return $value; - } elseif (\is_array($value)) { - return new \ArrayIterator($value); - } else { - return new \ArrayIterator([$value]); - } -} -/** - * Synchronously waits on a promise to resolve and returns an inspection state - * array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the array - * will contain a "value" key mapping to the fulfilled value of the promise. If - * the promise is rejected, the array will contain a "reason" key mapping to - * the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - */ -function inspect(\PayNL\GuzzleHttp\Promise\PromiseInterface $promise) -{ - try { - return ['state' => \PayNL\GuzzleHttp\Promise\PromiseInterface::FULFILLED, 'value' => $promise->wait()]; - } catch (\PayNL\GuzzleHttp\Promise\RejectionException $e) { - return ['state' => \PayNL\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $e->getReason()]; - } catch (\Throwable $e) { - return ['state' => \PayNL\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $e]; - } catch (\Exception $e) { - return ['state' => \PayNL\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $e]; - } -} -/** - * Waits on all of the provided promises, but does not unwrap rejected promises - * as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - * @see GuzzleHttp\Promise\inspect for the inspection state array format. - */ -function inspect_all($promises) -{ - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = inspect($promise); - } - return $results; -} -/** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same order - * the promises were provided). An exception is thrown if any of the promises - * are rejected. - * - * @param mixed $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - */ -function unwrap($promises) -{ - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = $promise->wait(); - } - return $results; -} -/** - * Given an array of promises, return a promise that is fulfilled when all the - * items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ -function all($promises) -{ - $results = []; - return \each($promises, function ($value, $idx) use(&$results) { - $results[$idx] = $value; - }, function ($reason, $idx, \PayNL\GuzzleHttp\Promise\Promise $aggregate) { - $aggregate->reject($reason); - })->then(function () use(&$results) { - \ksort($results); - return $results; - }); -} -/** - * Initiate a competitive race between multiple promises or values (values will - * become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise is - * fulfilled with an array that contains the fulfillment values of the winners - * in order of resolution. - * - * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException} - * if the number of fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ -function some($count, $promises) -{ - $results = []; - $rejections = []; - return \each($promises, function ($value, $idx, \PayNL\GuzzleHttp\Promise\PromiseInterface $p) use(&$results, $count) { - if ($p->getState() !== \PayNL\GuzzleHttp\Promise\PromiseInterface::PENDING) { - return; - } - $results[$idx] = $value; - if (\count($results) >= $count) { - $p->resolve(null); - } - }, function ($reason) use(&$rejections) { - $rejections[] = $reason; - })->then(function () use(&$results, &$rejections, $count) { - if (\count($results) !== $count) { - throw new \PayNL\GuzzleHttp\Promise\AggregateException('Not enough promises to fulfill count', $rejections); - } - \ksort($results); - return \array_values($results); - }); -} -/** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ -function any($promises) -{ - return some(1, $promises)->then(function ($values) { - return $values[0]; - }); -} -/** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * @see GuzzleHttp\Promise\inspect for the inspection state array format. - */ -function settle($promises) -{ - $results = []; - return \each($promises, function ($value, $idx) use(&$results) { - $results[$idx] = ['state' => \PayNL\GuzzleHttp\Promise\PromiseInterface::FULFILLED, 'value' => $value]; - }, function ($reason, $idx) use(&$results) { - $results[$idx] = ['state' => \PayNL\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $reason]; - })->then(function () use(&$results) { - \ksort($results); - return $results; - }); -} -/** - * Given an iterator that yields promises or values, returns a promise that is - * fulfilled with a null value when the iterator has been consumed or the - * aggregate promise has been fulfilled or rejected. - * - * $onFulfilled is a function that accepts the fulfilled value, iterator - * index, and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate promise if needed. - * - * $onRejected is a function that accepts the rejection reason, iterator - * index, and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate promise if needed. - * - * @param mixed $iterable Iterator or array to iterate over. - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - */ -function each($iterable, callable $onFulfilled = null, callable $onRejected = null) -{ - return (new \PayNL\GuzzleHttp\Promise\EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected]))->promise(); -} -/** - * Like each, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow for - * dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - */ -function each_limit($iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null) -{ - return (new \PayNL\GuzzleHttp\Promise\EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected, 'concurrency' => $concurrency]))->promise(); -} -/** - * Like each_limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - */ -function each_limit_all($iterable, $concurrency, callable $onFulfilled = null) -{ - return each_limit($iterable, $concurrency, $onFulfilled, function ($reason, $idx, \PayNL\GuzzleHttp\Promise\PromiseInterface $aggregate) { - $aggregate->reject($reason); - }); -} -/** - * Returns true if a promise is fulfilled. - * - * @param PromiseInterface $promise - * - * @return bool - */ -function is_fulfilled(\PayNL\GuzzleHttp\Promise\PromiseInterface $promise) -{ - return $promise->getState() === \PayNL\GuzzleHttp\Promise\PromiseInterface::FULFILLED; -} -/** - * Returns true if a promise is rejected. - * - * @param PromiseInterface $promise - * - * @return bool - */ -function is_rejected(\PayNL\GuzzleHttp\Promise\PromiseInterface $promise) -{ - return $promise->getState() === \PayNL\GuzzleHttp\Promise\PromiseInterface::REJECTED; -} -/** - * Returns true if a promise is fulfilled or rejected. - * - * @param PromiseInterface $promise - * - * @return bool - */ -function is_settled(\PayNL\GuzzleHttp\Promise\PromiseInterface $promise) -{ - return $promise->getState() !== \PayNL\GuzzleHttp\Promise\PromiseInterface::PENDING; -} -/** - * @see Coroutine - * - * @param callable $generatorFn - * - * @return PromiseInterface - */ -function coroutine(callable $generatorFn) -{ - return new \PayNL\GuzzleHttp\Promise\Coroutine($generatorFn); -} diff --git a/build/promises/src/functions_include.php b/build/promises/src/functions_include.php deleted file mode 100644 index 97271a3..0000000 --- a/build/promises/src/functions_include.php +++ /dev/null @@ -1,8 +0,0 @@ -addStream($stream); - } - } - public function __toString() - { - try { - $this->rewind(); - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - /** - * Add a stream to the AppendStream - * - * @param StreamInterface $stream Stream to append. Must be readable. - * - * @throws \InvalidArgumentException if the stream is not readable - */ - public function addStream(\Psr\Http\Message\StreamInterface $stream) - { - if (!$stream->isReadable()) { - throw new \InvalidArgumentException('Each stream must be readable'); - } - // The stream is only seekable if all streams are seekable - if (!$stream->isSeekable()) { - $this->seekable = \false; - } - $this->streams[] = $stream; - } - public function getContents() - { - return copy_to_string($this); - } - /** - * Closes each attached stream. - * - * {@inheritdoc} - */ - public function close() - { - $this->pos = $this->current = 0; - $this->seekable = \true; - foreach ($this->streams as $stream) { - $stream->close(); - } - $this->streams = []; - } - /** - * Detaches each attached stream. - * - * Returns null as it's not clear which underlying stream resource to return. - * - * {@inheritdoc} - */ - public function detach() - { - $this->pos = $this->current = 0; - $this->seekable = \true; - foreach ($this->streams as $stream) { - $stream->detach(); - } - $this->streams = []; - } - public function tell() - { - return $this->pos; - } - /** - * Tries to calculate the size by adding the size of each stream. - * - * If any of the streams do not return a valid number, then the size of the - * append stream cannot be determined and null is returned. - * - * {@inheritdoc} - */ - public function getSize() - { - $size = 0; - foreach ($this->streams as $stream) { - $s = $stream->getSize(); - if ($s === null) { - return null; - } - $size += $s; - } - return $size; - } - public function eof() - { - return !$this->streams || $this->current >= \count($this->streams) - 1 && $this->streams[$this->current]->eof(); - } - public function rewind() - { - $this->seek(0); - } - /** - * Attempts to seek to the given position. Only supports SEEK_SET. - * - * {@inheritdoc} - */ - public function seek($offset, $whence = \SEEK_SET) - { - if (!$this->seekable) { - throw new \RuntimeException('This AppendStream is not seekable'); - } elseif ($whence !== \SEEK_SET) { - throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); - } - $this->pos = $this->current = 0; - // Rewind each stream - foreach ($this->streams as $i => $stream) { - try { - $stream->rewind(); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to seek stream ' . $i . ' of the AppendStream', 0, $e); - } - } - // Seek to the actual position by reading from each stream - while ($this->pos < $offset && !$this->eof()) { - $result = $this->read(\min(8096, $offset - $this->pos)); - if ($result === '') { - break; - } - } - } - /** - * Reads from all of the appended streams until the length is met or EOF. - * - * {@inheritdoc} - */ - public function read($length) - { - $buffer = ''; - $total = \count($this->streams) - 1; - $remaining = $length; - $progressToNext = \false; - while ($remaining > 0) { - // Progress to the next stream if needed. - if ($progressToNext || $this->streams[$this->current]->eof()) { - $progressToNext = \false; - if ($this->current === $total) { - break; - } - $this->current++; - } - $result = $this->streams[$this->current]->read($remaining); - // Using a loose comparison here to match on '', false, and null - if ($result == null) { - $progressToNext = \true; - continue; - } - $buffer .= $result; - $remaining = $length - \strlen($buffer); - } - $this->pos += \strlen($buffer); - return $buffer; - } - public function isReadable() - { - return \true; - } - public function isWritable() - { - return \false; - } - public function isSeekable() - { - return $this->seekable; - } - public function write($string) - { - throw new \RuntimeException('Cannot write to an AppendStream'); - } - public function getMetadata($key = null) - { - return $key ? null : []; - } -} diff --git a/build/psr7/src/BufferStream.php b/build/psr7/src/BufferStream.php deleted file mode 100644 index 2154677..0000000 --- a/build/psr7/src/BufferStream.php +++ /dev/null @@ -1,114 +0,0 @@ -hwm = $hwm; - } - public function __toString() - { - return $this->getContents(); - } - public function getContents() - { - $buffer = $this->buffer; - $this->buffer = ''; - return $buffer; - } - public function close() - { - $this->buffer = ''; - } - public function detach() - { - $this->close(); - } - public function getSize() - { - return \strlen($this->buffer); - } - public function isReadable() - { - return \true; - } - public function isWritable() - { - return \true; - } - public function isSeekable() - { - return \false; - } - public function rewind() - { - $this->seek(0); - } - public function seek($offset, $whence = \SEEK_SET) - { - throw new \RuntimeException('Cannot seek a BufferStream'); - } - public function eof() - { - return \strlen($this->buffer) === 0; - } - public function tell() - { - throw new \RuntimeException('Cannot determine the position of a BufferStream'); - } - /** - * Reads data from the buffer. - */ - public function read($length) - { - $currentLength = \strlen($this->buffer); - if ($length >= $currentLength) { - // No need to slice the buffer because we don't have enough data. - $result = $this->buffer; - $this->buffer = ''; - } else { - // Slice up the result to provide a subset of the buffer. - $result = \substr($this->buffer, 0, $length); - $this->buffer = \substr($this->buffer, $length); - } - return $result; - } - /** - * Writes data to the buffer. - */ - public function write($string) - { - $this->buffer .= $string; - if (\strlen($this->buffer) >= $this->hwm) { - return \false; - } - return \strlen($string); - } - public function getMetadata($key = null) - { - if ($key == 'hwm') { - return $this->hwm; - } - return $key ? null : []; - } -} diff --git a/build/psr7/src/CachingStream.php b/build/psr7/src/CachingStream.php deleted file mode 100644 index 4b643b7..0000000 --- a/build/psr7/src/CachingStream.php +++ /dev/null @@ -1,115 +0,0 @@ -remoteStream = $stream; - $this->stream = $target ?: new \PayNL\GuzzleHttp\Psr7\Stream(\fopen('php://temp', 'r+')); - } - public function getSize() - { - return \max($this->stream->getSize(), $this->remoteStream->getSize()); - } - public function rewind() - { - $this->seek(0); - } - public function seek($offset, $whence = \SEEK_SET) - { - if ($whence == \SEEK_SET) { - $byte = $offset; - } elseif ($whence == \SEEK_CUR) { - $byte = $offset + $this->tell(); - } elseif ($whence == \SEEK_END) { - $size = $this->remoteStream->getSize(); - if ($size === null) { - $size = $this->cacheEntireStream(); - } - $byte = $size + $offset; - } else { - throw new \InvalidArgumentException('Invalid whence'); - } - $diff = $byte - $this->stream->getSize(); - if ($diff > 0) { - // Read the remoteStream until we have read in at least the amount - // of bytes requested, or we reach the end of the file. - while ($diff > 0 && !$this->remoteStream->eof()) { - $this->read($diff); - $diff = $byte - $this->stream->getSize(); - } - } else { - // We can just do a normal seek since we've already seen this byte. - $this->stream->seek($byte); - } - } - public function read($length) - { - // Perform a regular read on any previously read data from the buffer - $data = $this->stream->read($length); - $remaining = $length - \strlen($data); - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have - // been filled from the remote stream, then we must skip bytes on - // the remote stream to emulate overwriting bytes from that - // position. This mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read($remaining + $this->skipReadBytes); - if ($this->skipReadBytes) { - $len = \strlen($remoteData); - $remoteData = \substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = \max(0, $this->skipReadBytes - $len); - } - $data .= $remoteData; - $this->stream->write($remoteData); - } - return $data; - } - public function write($string) - { - // When appending to the end of the currently read stream, you'll want - // to skip bytes from being read from the remote stream to emulate - // other stream wrappers. Basically replacing bytes of data of a fixed - // length. - $overflow = \strlen($string) + $this->tell() - $this->remoteStream->tell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - return $this->stream->write($string); - } - public function eof() - { - return $this->stream->eof() && $this->remoteStream->eof(); - } - /** - * Close both the remote stream and buffer stream - */ - public function close() - { - $this->remoteStream->close() && $this->stream->close(); - } - private function cacheEntireStream() - { - $target = new \PayNL\GuzzleHttp\Psr7\FnStream(['write' => 'strlen']); - copy_to_stream($this, $target); - return $this->tell(); - } -} diff --git a/build/psr7/src/DroppingStream.php b/build/psr7/src/DroppingStream.php deleted file mode 100644 index e942f41..0000000 --- a/build/psr7/src/DroppingStream.php +++ /dev/null @@ -1,36 +0,0 @@ -stream = $stream; - $this->maxLength = $maxLength; - } - public function write($string) - { - $diff = $this->maxLength - $this->stream->getSize(); - // Begin returning 0 when the underlying stream is too large. - if ($diff <= 0) { - return 0; - } - // Write the stream or a subset of the stream if needed. - if (\strlen($string) < $diff) { - return $this->stream->write($string); - } - return $this->stream->write(\substr($string, 0, $diff)); - } -} diff --git a/build/psr7/src/FnStream.php b/build/psr7/src/FnStream.php deleted file mode 100644 index 3095f70..0000000 --- a/build/psr7/src/FnStream.php +++ /dev/null @@ -1,132 +0,0 @@ -methods = $methods; - // Create the functions on the class - foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; - } - } - /** - * Lazily determine which methods are not implemented. - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException(\str_replace('_fn_', '', $name) . '() is not implemented in the FnStream'); - } - /** - * The close method is called on the underlying stream only if possible. - */ - public function __destruct() - { - if (isset($this->_fn_close)) { - \call_user_func($this->_fn_close); - } - } - /** - * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. - * @throws \LogicException - */ - public function __wakeup() - { - throw new \LogicException('FnStream should never be unserialized'); - } - /** - * Adds custom functionality to an underlying stream by intercepting - * specific method calls. - * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure - * - * @return FnStream - */ - public static function decorate(\Psr\Http\Message\StreamInterface $stream, array $methods) - { - // If any of the required methods were not provided, then simply - // proxy to the decorated stream. - foreach (\array_diff(self::$slots, \array_keys($methods)) as $diff) { - $methods[$diff] = [$stream, $diff]; - } - return new self($methods); - } - public function __toString() - { - return \call_user_func($this->_fn___toString); - } - public function close() - { - return \call_user_func($this->_fn_close); - } - public function detach() - { - return \call_user_func($this->_fn_detach); - } - public function getSize() - { - return \call_user_func($this->_fn_getSize); - } - public function tell() - { - return \call_user_func($this->_fn_tell); - } - public function eof() - { - return \call_user_func($this->_fn_eof); - } - public function isSeekable() - { - return \call_user_func($this->_fn_isSeekable); - } - public function rewind() - { - \call_user_func($this->_fn_rewind); - } - public function seek($offset, $whence = \SEEK_SET) - { - \call_user_func($this->_fn_seek, $offset, $whence); - } - public function isWritable() - { - return \call_user_func($this->_fn_isWritable); - } - public function write($string) - { - return \call_user_func($this->_fn_write, $string); - } - public function isReadable() - { - return \call_user_func($this->_fn_isReadable); - } - public function read($length) - { - return \call_user_func($this->_fn_read, $length); - } - public function getContents() - { - return \call_user_func($this->_fn_getContents); - } - public function getMetadata($key = null) - { - return \call_user_func($this->_fn_getMetadata, $key); - } -} diff --git a/build/psr7/src/InflateStream.php b/build/psr7/src/InflateStream.php deleted file mode 100644 index 90198d7..0000000 --- a/build/psr7/src/InflateStream.php +++ /dev/null @@ -1,48 +0,0 @@ -read(10); - $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); - // Skip the header, that is 10 + length of filename + 1 (nil) bytes - $stream = new \PayNL\GuzzleHttp\Psr7\LimitStream($stream, -1, 10 + $filenameHeaderLength); - $resource = \PayNL\GuzzleHttp\Psr7\StreamWrapper::getResource($stream); - \stream_filter_append($resource, 'zlib.inflate', \STREAM_FILTER_READ); - $this->stream = $stream->isSeekable() ? new \PayNL\GuzzleHttp\Psr7\Stream($resource) : new \PayNL\GuzzleHttp\Psr7\NoSeekStream(new \PayNL\GuzzleHttp\Psr7\Stream($resource)); - } - /** - * @param StreamInterface $stream - * @param $header - * @return int - */ - private function getLengthOfPossibleFilenameHeader(\Psr\Http\Message\StreamInterface $stream, $header) - { - $filename_header_length = 0; - if (\substr(\bin2hex($header), 6, 2) === '08') { - // we have a filename, read until nil - $filename_header_length = 1; - while ($stream->read(1) !== \chr(0)) { - $filename_header_length++; - } - } - return $filename_header_length; - } -} diff --git a/build/psr7/src/LazyOpenStream.php b/build/psr7/src/LazyOpenStream.php deleted file mode 100644 index e392002..0000000 --- a/build/psr7/src/LazyOpenStream.php +++ /dev/null @@ -1,35 +0,0 @@ -filename = $filename; - $this->mode = $mode; - } - /** - * Creates the underlying stream lazily when required. - * - * @return StreamInterface - */ - protected function createStream() - { - return stream_for(try_fopen($this->filename, $this->mode)); - } -} diff --git a/build/psr7/src/LimitStream.php b/build/psr7/src/LimitStream.php deleted file mode 100644 index 7a8ee33..0000000 --- a/build/psr7/src/LimitStream.php +++ /dev/null @@ -1,128 +0,0 @@ -stream = $stream; - $this->setLimit($limit); - $this->setOffset($offset); - } - public function eof() - { - // Always return true if the underlying stream is EOF - if ($this->stream->eof()) { - return \true; - } - // No limit and the underlying stream is not at EOF - if ($this->limit == -1) { - return \false; - } - return $this->stream->tell() >= $this->offset + $this->limit; - } - /** - * Returns the size of the limited subset of data - * {@inheritdoc} - */ - public function getSize() - { - if (null === ($length = $this->stream->getSize())) { - return null; - } elseif ($this->limit == -1) { - return $length - $this->offset; - } else { - return \min($this->limit, $length - $this->offset); - } - } - /** - * Allow for a bounded seek on the read limited stream - * {@inheritdoc} - */ - public function seek($offset, $whence = \SEEK_SET) - { - if ($whence !== \SEEK_SET || $offset < 0) { - throw new \RuntimeException(\sprintf('Cannot seek to offset %s with whence %s', $offset, $whence)); - } - $offset += $this->offset; - if ($this->limit !== -1) { - if ($offset > $this->offset + $this->limit) { - $offset = $this->offset + $this->limit; - } - } - $this->stream->seek($offset); - } - /** - * Give a relative tell() - * {@inheritdoc} - */ - public function tell() - { - return $this->stream->tell() - $this->offset; - } - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @throws \RuntimeException if the stream cannot be seeked. - */ - public function setOffset($offset) - { - $current = $this->stream->tell(); - if ($current !== $offset) { - // If the stream cannot seek to the offset position, then read to it - if ($this->stream->isSeekable()) { - $this->stream->seek($offset); - } elseif ($current > $offset) { - throw new \RuntimeException("Could not seek to stream offset {$offset}"); - } else { - $this->stream->read($offset - $current); - } - } - $this->offset = $offset; - } - /** - * Set the limit of bytes that the decorator allows to be read from the - * stream. - * - * @param int $limit Number of bytes to allow to be read from the stream. - * Use -1 for no limit. - */ - public function setLimit($limit) - { - $this->limit = $limit; - } - public function read($length) - { - if ($this->limit == -1) { - return $this->stream->read($length); - } - // Check if the current position is less than the total allowed - // bytes + original offset - $remaining = $this->offset + $this->limit - $this->stream->tell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte - // limit is not exceeded - return $this->stream->read(\min($remaining, $length)); - } - return ''; - } -} diff --git a/build/psr7/src/MessageTrait.php b/build/psr7/src/MessageTrait.php deleted file mode 100644 index e801705..0000000 --- a/build/psr7/src/MessageTrait.php +++ /dev/null @@ -1,171 +0,0 @@ - array of values */ - private $headers = []; - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; - /** @var string */ - private $protocol = '1.1'; - /** @var StreamInterface */ - private $stream; - public function getProtocolVersion() - { - return $this->protocol; - } - public function withProtocolVersion($version) - { - if ($this->protocol === $version) { - return $this; - } - $new = clone $this; - $new->protocol = $version; - return $new; - } - public function getHeaders() - { - return $this->headers; - } - public function hasHeader($header) - { - return isset($this->headerNames[\strtolower($header)]); - } - public function getHeader($header) - { - $header = \strtolower($header); - if (!isset($this->headerNames[$header])) { - return []; - } - $header = $this->headerNames[$header]; - return $this->headers[$header]; - } - public function getHeaderLine($header) - { - return \implode(', ', $this->getHeader($header)); - } - public function withHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = \strtolower($header); - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - unset($new->headers[$new->headerNames[$normalized]]); - } - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - return $new; - } - public function withAddedHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = \strtolower($header); - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $new->headers[$header] = \array_merge($this->headers[$header], $value); - } else { - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - } - return $new; - } - public function withoutHeader($header) - { - $normalized = \strtolower($header); - if (!isset($this->headerNames[$normalized])) { - return $this; - } - $header = $this->headerNames[$normalized]; - $new = clone $this; - unset($new->headers[$header], $new->headerNames[$normalized]); - return $new; - } - public function getBody() - { - if (!$this->stream) { - $this->stream = stream_for(''); - } - return $this->stream; - } - public function withBody(\Psr\Http\Message\StreamInterface $body) - { - if ($body === $this->stream) { - return $this; - } - $new = clone $this; - $new->stream = $body; - return $new; - } - private function setHeaders(array $headers) - { - $this->headerNames = $this->headers = []; - foreach ($headers as $header => $value) { - if (\is_int($header)) { - // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec - // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. - $header = (string) $header; - } - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = \strtolower($header); - if (isset($this->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $this->headers[$header] = \array_merge($this->headers[$header], $value); - } else { - $this->headerNames[$normalized] = $header; - $this->headers[$header] = $value; - } - } - } - private function normalizeHeaderValue($value) - { - if (!\is_array($value)) { - return $this->trimHeaderValues([$value]); - } - if (\count($value) === 0) { - throw new \InvalidArgumentException('Header value can not be an empty array.'); - } - return $this->trimHeaderValues($value); - } - /** - * Trims whitespace from the header values. - * - * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. - * - * header-field = field-name ":" OWS field-value OWS - * OWS = *( SP / HTAB ) - * - * @param string[] $values Header values - * - * @return string[] Trimmed header values - * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 - */ - private function trimHeaderValues(array $values) - { - return \array_map(function ($value) { - if (!\is_scalar($value) && null !== $value) { - throw new \InvalidArgumentException(\sprintf('Header value must be scalar or null but %s provided.', \is_object($value) ? \get_class($value) : \gettype($value))); - } - return \trim((string) $value, " \t"); - }, $values); - } - private function assertHeader($header) - { - if (!\is_string($header)) { - throw new \InvalidArgumentException(\sprintf('Header name must be a string but %s provided.', \is_object($header) ? \get_class($header) : \gettype($header))); - } - if ($header === '') { - throw new \InvalidArgumentException('Header name can not be empty.'); - } - } -} diff --git a/build/psr7/src/MultipartStream.php b/build/psr7/src/MultipartStream.php deleted file mode 100644 index fa6d757..0000000 --- a/build/psr7/src/MultipartStream.php +++ /dev/null @@ -1,123 +0,0 @@ -boundary = $boundary ?: \sha1(\uniqid('', \true)); - $this->stream = $this->createStream($elements); - } - /** - * Get the boundary - * - * @return string - */ - public function getBoundary() - { - return $this->boundary; - } - public function isWritable() - { - return \false; - } - /** - * Get the headers needed before transferring the content of a POST file - */ - private function getHeaders(array $headers) - { - $str = ''; - foreach ($headers as $key => $value) { - $str .= "{$key}: {$value}\r\n"; - } - return "--{$this->boundary}\r\n" . \trim($str) . "\r\n\r\n"; - } - /** - * Create the aggregate stream that will be used to upload the POST data - */ - protected function createStream(array $elements) - { - $stream = new \PayNL\GuzzleHttp\Psr7\AppendStream(); - foreach ($elements as $element) { - $this->addElement($stream, $element); - } - // Add the trailing boundary with CRLF - $stream->addStream(stream_for("--{$this->boundary}--\r\n")); - return $stream; - } - private function addElement(\PayNL\GuzzleHttp\Psr7\AppendStream $stream, array $element) - { - foreach (['contents', 'name'] as $key) { - if (!\array_key_exists($key, $element)) { - throw new \InvalidArgumentException("A '{$key}' key is required"); - } - } - $element['contents'] = stream_for($element['contents']); - if (empty($element['filename'])) { - $uri = $element['contents']->getMetadata('uri'); - if (\substr($uri, 0, 6) !== 'php://') { - $element['filename'] = $uri; - } - } - list($body, $headers) = $this->createElement($element['name'], $element['contents'], isset($element['filename']) ? $element['filename'] : null, isset($element['headers']) ? $element['headers'] : []); - $stream->addStream(stream_for($this->getHeaders($headers))); - $stream->addStream($body); - $stream->addStream(stream_for("\r\n")); - } - /** - * @return array - */ - private function createElement($name, \Psr\Http\Message\StreamInterface $stream, $filename, array $headers) - { - // Set a default content-disposition header if one was no provided - $disposition = $this->getHeader($headers, 'content-disposition'); - if (!$disposition) { - $headers['Content-Disposition'] = $filename === '0' || $filename ? \sprintf('form-data; name="%s"; filename="%s"', $name, \basename($filename)) : "form-data; name=\"{$name}\""; - } - // Set a default content-length header if one was no provided - $length = $this->getHeader($headers, 'content-length'); - if (!$length) { - if ($length = $stream->getSize()) { - $headers['Content-Length'] = (string) $length; - } - } - // Set a default Content-Type if one was not supplied - $type = $this->getHeader($headers, 'content-type'); - if (!$type && ($filename === '0' || $filename)) { - if ($type = mimetype_from_filename($filename)) { - $headers['Content-Type'] = $type; - } - } - return [$stream, $headers]; - } - private function getHeader(array $headers, $key) - { - $lowercaseHeader = \strtolower($key); - foreach ($headers as $k => $v) { - if (\strtolower($k) === $lowercaseHeader) { - return $v; - } - } - return null; - } -} diff --git a/build/psr7/src/NoSeekStream.php b/build/psr7/src/NoSeekStream.php deleted file mode 100644 index 2adbc2e..0000000 --- a/build/psr7/src/NoSeekStream.php +++ /dev/null @@ -1,20 +0,0 @@ -source = $source; - $this->size = isset($options['size']) ? $options['size'] : null; - $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; - $this->buffer = new \PayNL\GuzzleHttp\Psr7\BufferStream(); - } - public function __toString() - { - try { - return copy_to_string($this); - } catch (\Exception $e) { - return ''; - } - } - public function close() - { - $this->detach(); - } - public function detach() - { - $this->tellPos = \false; - $this->source = null; - } - public function getSize() - { - return $this->size; - } - public function tell() - { - return $this->tellPos; - } - public function eof() - { - return !$this->source; - } - public function isSeekable() - { - return \false; - } - public function rewind() - { - $this->seek(0); - } - public function seek($offset, $whence = \SEEK_SET) - { - throw new \RuntimeException('Cannot seek a PumpStream'); - } - public function isWritable() - { - return \false; - } - public function write($string) - { - throw new \RuntimeException('Cannot write to a PumpStream'); - } - public function isReadable() - { - return \true; - } - public function read($length) - { - $data = $this->buffer->read($length); - $readLen = \strlen($data); - $this->tellPos += $readLen; - $remaining = $length - $readLen; - if ($remaining) { - $this->pump($remaining); - $data .= $this->buffer->read($remaining); - $this->tellPos += \strlen($data) - $readLen; - } - return $data; - } - public function getContents() - { - $result = ''; - while (!$this->eof()) { - $result .= $this->read(1000000); - } - return $result; - } - public function getMetadata($key = null) - { - if (!$key) { - return $this->metadata; - } - return isset($this->metadata[$key]) ? $this->metadata[$key] : null; - } - private function pump($length) - { - if ($this->source) { - do { - $data = \call_user_func($this->source, $length); - if ($data === \false || $data === null) { - $this->source = null; - return; - } - $this->buffer->write($data); - $length -= \strlen($data); - } while ($length > 0); - } - } -} diff --git a/build/psr7/src/Request.php b/build/psr7/src/Request.php deleted file mode 100644 index 54f2208..0000000 --- a/build/psr7/src/Request.php +++ /dev/null @@ -1,120 +0,0 @@ -assertMethod($method); - if (!$uri instanceof \Psr\Http\Message\UriInterface) { - $uri = new \PayNL\GuzzleHttp\Psr7\Uri($uri); - } - $this->method = \strtoupper($method); - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - if (!isset($this->headerNames['host'])) { - $this->updateHostFromUri(); - } - if ($body !== '' && $body !== null) { - $this->stream = stream_for($body); - } - } - public function getRequestTarget() - { - if ($this->requestTarget !== null) { - return $this->requestTarget; - } - $target = $this->uri->getPath(); - if ($target == '') { - $target = '/'; - } - if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); - } - return $target; - } - public function withRequestTarget($requestTarget) - { - if (\preg_match('#\\s#', $requestTarget)) { - throw new \InvalidArgumentException('Invalid request target provided; cannot contain whitespace'); - } - $new = clone $this; - $new->requestTarget = $requestTarget; - return $new; - } - public function getMethod() - { - return $this->method; - } - public function withMethod($method) - { - $this->assertMethod($method); - $new = clone $this; - $new->method = \strtoupper($method); - return $new; - } - public function getUri() - { - return $this->uri; - } - public function withUri(\Psr\Http\Message\UriInterface $uri, $preserveHost = \false) - { - if ($uri === $this->uri) { - return $this; - } - $new = clone $this; - $new->uri = $uri; - if (!$preserveHost || !isset($this->headerNames['host'])) { - $new->updateHostFromUri(); - } - return $new; - } - private function updateHostFromUri() - { - $host = $this->uri->getHost(); - if ($host == '') { - return; - } - if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; - } - if (isset($this->headerNames['host'])) { - $header = $this->headerNames['host']; - } else { - $header = 'Host'; - $this->headerNames['host'] = 'Host'; - } - // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 - $this->headers = [$header => [$host]] + $this->headers; - } - private function assertMethod($method) - { - if (!\is_string($method) || $method === '') { - throw new \InvalidArgumentException('Method must be a non-empty string.'); - } - } -} diff --git a/build/psr7/src/Response.php b/build/psr7/src/Response.php deleted file mode 100644 index 65a9ed9..0000000 --- a/build/psr7/src/Response.php +++ /dev/null @@ -1,76 +0,0 @@ - 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-status', 208 => 'Already Reported', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 511 => 'Network Authentication Required']; - /** @var string */ - private $reasonPhrase = ''; - /** @var int */ - private $statusCode = 200; - /** - * @param int $status Status code - * @param array $headers Response headers - * @param string|null|resource|StreamInterface $body Response body - * @param string $version Protocol version - * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) - */ - public function __construct($status = 200, array $headers = [], $body = null, $version = '1.1', $reason = null) - { - $this->assertStatusCodeIsInteger($status); - $status = (int) $status; - $this->assertStatusCodeRange($status); - $this->statusCode = $status; - if ($body !== '' && $body !== null) { - $this->stream = stream_for($body); - } - $this->setHeaders($headers); - if ($reason == '' && isset(self::$phrases[$this->statusCode])) { - $this->reasonPhrase = self::$phrases[$this->statusCode]; - } else { - $this->reasonPhrase = (string) $reason; - } - $this->protocol = $version; - } - public function getStatusCode() - { - return $this->statusCode; - } - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - public function withStatus($code, $reasonPhrase = '') - { - $this->assertStatusCodeIsInteger($code); - $code = (int) $code; - $this->assertStatusCodeRange($code); - $new = clone $this; - $new->statusCode = $code; - if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { - $reasonPhrase = self::$phrases[$new->statusCode]; - } - $new->reasonPhrase = $reasonPhrase; - return $new; - } - private function assertStatusCodeIsInteger($statusCode) - { - if (\filter_var($statusCode, \FILTER_VALIDATE_INT) === \false) { - throw new \InvalidArgumentException('Status code must be an integer value.'); - } - } - private function assertStatusCodeRange($statusCode) - { - if ($statusCode < 100 || $statusCode >= 600) { - throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); - } - } -} diff --git a/build/psr7/src/Rfc7230.php b/build/psr7/src/Rfc7230.php deleted file mode 100644 index e52a5d7..0000000 --- a/build/psr7/src/Rfc7230.php +++ /dev/null @@ -1,18 +0,0 @@ -@,;:\\\"/[\\]?={}\1- ]++):[ \t]*+((?:[ \t]*+[!-~€-ÿ]++)*+)[ \t]*+\r?\n)m"; - const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; -} diff --git a/build/psr7/src/ServerRequest.php b/build/psr7/src/ServerRequest.php deleted file mode 100644 index 8348ef6..0000000 --- a/build/psr7/src/ServerRequest.php +++ /dev/null @@ -1,302 +0,0 @@ -serverParams = $serverParams; - parent::__construct($method, $uri, $headers, $body, $version); - } - /** - * Return an UploadedFile instance array. - * - * @param array $files A array which respect $_FILES structure - * @throws InvalidArgumentException for unrecognized values - * @return array - */ - public static function normalizeFiles(array $files) - { - $normalized = []; - foreach ($files as $key => $value) { - if ($value instanceof \Psr\Http\Message\UploadedFileInterface) { - $normalized[$key] = $value; - } elseif (\is_array($value) && isset($value['tmp_name'])) { - $normalized[$key] = self::createUploadedFileFromSpec($value); - } elseif (\is_array($value)) { - $normalized[$key] = self::normalizeFiles($value); - continue; - } else { - throw new \InvalidArgumentException('Invalid value in files specification'); - } - } - return $normalized; - } - /** - * Create and return an UploadedFile instance from a $_FILES specification. - * - * If the specification represents an array of values, this method will - * delegate to normalizeNestedFileSpec() and return that return value. - * - * @param array $value $_FILES struct - * @return array|UploadedFileInterface - */ - private static function createUploadedFileFromSpec(array $value) - { - if (\is_array($value['tmp_name'])) { - return self::normalizeNestedFileSpec($value); - } - return new \PayNL\GuzzleHttp\Psr7\UploadedFile($value['tmp_name'], (int) $value['size'], (int) $value['error'], $value['name'], $value['type']); - } - /** - * Normalize an array of file specifications. - * - * Loops through all nested files and returns a normalized array of - * UploadedFileInterface instances. - * - * @param array $files - * @return UploadedFileInterface[] - */ - private static function normalizeNestedFileSpec(array $files = []) - { - $normalizedFiles = []; - foreach (\array_keys($files['tmp_name']) as $key) { - $spec = ['tmp_name' => $files['tmp_name'][$key], 'size' => $files['size'][$key], 'error' => $files['error'][$key], 'name' => $files['name'][$key], 'type' => $files['type'][$key]]; - $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); - } - return $normalizedFiles; - } - /** - * Return a ServerRequest populated with superglobals: - * $_GET - * $_POST - * $_COOKIE - * $_FILES - * $_SERVER - * - * @return ServerRequestInterface - */ - public static function fromGlobals() - { - $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; - $headers = getallheaders(); - $uri = self::getUriFromGlobals(); - $body = new \PayNL\GuzzleHttp\Psr7\CachingStream(new \PayNL\GuzzleHttp\Psr7\LazyOpenStream('php://input', 'r+')); - $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? \str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; - $serverRequest = new \PayNL\GuzzleHttp\Psr7\ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); - return $serverRequest->withCookieParams($_COOKIE)->withQueryParams($_GET)->withParsedBody($_POST)->withUploadedFiles(self::normalizeFiles($_FILES)); - } - private static function extractHostAndPortFromAuthority($authority) - { - $uri = 'http://' . $authority; - $parts = \parse_url($uri); - if (\false === $parts) { - return [null, null]; - } - $host = isset($parts['host']) ? $parts['host'] : null; - $port = isset($parts['port']) ? $parts['port'] : null; - return [$host, $port]; - } - /** - * Get a Uri populated with values from $_SERVER. - * - * @return UriInterface - */ - public static function getUriFromGlobals() - { - $uri = new \PayNL\GuzzleHttp\Psr7\Uri(''); - $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); - $hasPort = \false; - if (isset($_SERVER['HTTP_HOST'])) { - list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); - if ($host !== null) { - $uri = $uri->withHost($host); - } - if ($port !== null) { - $hasPort = \true; - $uri = $uri->withPort($port); - } - } elseif (isset($_SERVER['SERVER_NAME'])) { - $uri = $uri->withHost($_SERVER['SERVER_NAME']); - } elseif (isset($_SERVER['SERVER_ADDR'])) { - $uri = $uri->withHost($_SERVER['SERVER_ADDR']); - } - if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { - $uri = $uri->withPort($_SERVER['SERVER_PORT']); - } - $hasQuery = \false; - if (isset($_SERVER['REQUEST_URI'])) { - $requestUriParts = \explode('?', $_SERVER['REQUEST_URI'], 2); - $uri = $uri->withPath($requestUriParts[0]); - if (isset($requestUriParts[1])) { - $hasQuery = \true; - $uri = $uri->withQuery($requestUriParts[1]); - } - } - if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { - $uri = $uri->withQuery($_SERVER['QUERY_STRING']); - } - return $uri; - } - /** - * {@inheritdoc} - */ - public function getServerParams() - { - return $this->serverParams; - } - /** - * {@inheritdoc} - */ - public function getUploadedFiles() - { - return $this->uploadedFiles; - } - /** - * {@inheritdoc} - */ - public function withUploadedFiles(array $uploadedFiles) - { - $new = clone $this; - $new->uploadedFiles = $uploadedFiles; - return $new; - } - /** - * {@inheritdoc} - */ - public function getCookieParams() - { - return $this->cookieParams; - } - /** - * {@inheritdoc} - */ - public function withCookieParams(array $cookies) - { - $new = clone $this; - $new->cookieParams = $cookies; - return $new; - } - /** - * {@inheritdoc} - */ - public function getQueryParams() - { - return $this->queryParams; - } - /** - * {@inheritdoc} - */ - public function withQueryParams(array $query) - { - $new = clone $this; - $new->queryParams = $query; - return $new; - } - /** - * {@inheritdoc} - */ - public function getParsedBody() - { - return $this->parsedBody; - } - /** - * {@inheritdoc} - */ - public function withParsedBody($data) - { - $new = clone $this; - $new->parsedBody = $data; - return $new; - } - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - /** - * {@inheritdoc} - */ - public function getAttribute($attribute, $default = null) - { - if (\false === \array_key_exists($attribute, $this->attributes)) { - return $default; - } - return $this->attributes[$attribute]; - } - /** - * {@inheritdoc} - */ - public function withAttribute($attribute, $value) - { - $new = clone $this; - $new->attributes[$attribute] = $value; - return $new; - } - /** - * {@inheritdoc} - */ - public function withoutAttribute($attribute) - { - if (\false === \array_key_exists($attribute, $this->attributes)) { - return $this; - } - $new = clone $this; - unset($new->attributes[$attribute]); - return $new; - } -} diff --git a/build/psr7/src/Stream.php b/build/psr7/src/Stream.php deleted file mode 100644 index 76491f6..0000000 --- a/build/psr7/src/Stream.php +++ /dev/null @@ -1,221 +0,0 @@ -size = $options['size']; - } - $this->customMetadata = isset($options['metadata']) ? $options['metadata'] : []; - $this->stream = $stream; - $meta = \stream_get_meta_data($this->stream); - $this->seekable = $meta['seekable']; - $this->readable = (bool) \preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool) \preg_match(self::WRITABLE_MODES, $meta['mode']); - $this->uri = $this->getMetadata('uri'); - } - /** - * Closes the stream when the destructed - */ - public function __destruct() - { - $this->close(); - } - public function __toString() - { - try { - $this->seek(0); - return (string) \stream_get_contents($this->stream); - } catch (\Exception $e) { - return ''; - } - } - public function getContents() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - $contents = \stream_get_contents($this->stream); - if ($contents === \false) { - throw new \RuntimeException('Unable to read stream contents'); - } - return $contents; - } - public function close() - { - if (isset($this->stream)) { - if (\is_resource($this->stream)) { - \fclose($this->stream); - } - $this->detach(); - } - } - public function detach() - { - if (!isset($this->stream)) { - return null; - } - $result = $this->stream; - unset($this->stream); - $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = \false; - return $result; - } - public function getSize() - { - if ($this->size !== null) { - return $this->size; - } - if (!isset($this->stream)) { - return null; - } - // Clear the stat cache if the stream has a URI - if ($this->uri) { - \clearstatcache(\true, $this->uri); - } - $stats = \fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } - return null; - } - public function isReadable() - { - return $this->readable; - } - public function isWritable() - { - return $this->writable; - } - public function isSeekable() - { - return $this->seekable; - } - public function eof() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - return \feof($this->stream); - } - public function tell() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - $result = \ftell($this->stream); - if ($result === \false) { - throw new \RuntimeException('Unable to determine stream position'); - } - return $result; - } - public function rewind() - { - $this->seek(0); - } - public function seek($offset, $whence = \SEEK_SET) - { - $whence = (int) $whence; - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->seekable) { - throw new \RuntimeException('Stream is not seekable'); - } - if (\fseek($this->stream, $offset, $whence) === -1) { - throw new \RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . \var_export($whence, \true)); - } - } - public function read($length) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - if ($length < 0) { - throw new \RuntimeException('Length parameter cannot be negative'); - } - if (0 === $length) { - return ''; - } - $string = \fread($this->stream, $length); - if (\false === $string) { - throw new \RuntimeException('Unable to read from stream'); - } - return $string; - } - public function write($string) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->writable) { - throw new \RuntimeException('Cannot write to a non-writable stream'); - } - // We can't know the size after writing anything - $this->size = null; - $result = \fwrite($this->stream, $string); - if ($result === \false) { - throw new \RuntimeException('Unable to write to stream'); - } - return $result; - } - public function getMetadata($key = null) - { - if (!isset($this->stream)) { - return $key ? null : []; - } elseif (!$key) { - return $this->customMetadata + \stream_get_meta_data($this->stream); - } elseif (isset($this->customMetadata[$key])) { - return $this->customMetadata[$key]; - } - $meta = \stream_get_meta_data($this->stream); - return isset($meta[$key]) ? $meta[$key] : null; - } -} diff --git a/build/psr7/src/StreamDecoratorTrait.php b/build/psr7/src/StreamDecoratorTrait.php deleted file mode 100644 index ea83934..0000000 --- a/build/psr7/src/StreamDecoratorTrait.php +++ /dev/null @@ -1,128 +0,0 @@ -stream = $stream; - } - /** - * Magic method used to create a new stream if streams are not added in - * the constructor of a decorator (e.g., LazyOpenStream). - * - * @param string $name Name of the property (allows "stream" only). - * - * @return StreamInterface - */ - public function __get($name) - { - if ($name == 'stream') { - $this->stream = $this->createStream(); - return $this->stream; - } - throw new \UnexpectedValueException("{$name} not found on class"); - } - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - // Really, PHP? https://bugs.php.net/bug.php?id=53648 - \trigger_error('StreamDecorator::__toString exception: ' . (string) $e, \E_USER_ERROR); - return ''; - } - } - public function getContents() - { - return copy_to_string($this); - } - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - */ - public function __call($method, array $args) - { - $result = \call_user_func_array([$this->stream, $method], $args); - // Always return the wrapped object if the result is a return $this - return $result === $this->stream ? $this : $result; - } - public function close() - { - $this->stream->close(); - } - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } - public function detach() - { - return $this->stream->detach(); - } - public function getSize() - { - return $this->stream->getSize(); - } - public function eof() - { - return $this->stream->eof(); - } - public function tell() - { - return $this->stream->tell(); - } - public function isReadable() - { - return $this->stream->isReadable(); - } - public function isWritable() - { - return $this->stream->isWritable(); - } - public function isSeekable() - { - return $this->stream->isSeekable(); - } - public function rewind() - { - $this->seek(0); - } - public function seek($offset, $whence = \SEEK_SET) - { - $this->stream->seek($offset, $whence); - } - public function read($length) - { - return $this->stream->read($length); - } - public function write($string) - { - return $this->stream->write($string); - } - /** - * Implement in subclasses to dynamically create streams when requested. - * - * @return StreamInterface - * @throws \BadMethodCallException - */ - protected function createStream() - { - throw new \BadMethodCallException('Not implemented'); - } -} diff --git a/build/psr7/src/StreamWrapper.php b/build/psr7/src/StreamWrapper.php deleted file mode 100644 index 6a7e0ff..0000000 --- a/build/psr7/src/StreamWrapper.php +++ /dev/null @@ -1,102 +0,0 @@ -isReadable()) { - $mode = $stream->isWritable() ? 'r+' : 'r'; - } elseif ($stream->isWritable()) { - $mode = 'w'; - } else { - throw new \InvalidArgumentException('The stream must be readable, ' . 'writable, or both.'); - } - return \fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); - } - /** - * Creates a stream context that can be used to open a stream as a php stream resource. - * - * @param StreamInterface $stream - * - * @return resource - */ - public static function createStreamContext(\Psr\Http\Message\StreamInterface $stream) - { - return \stream_context_create(['guzzle' => ['stream' => $stream]]); - } - /** - * Registers the stream wrapper if needed - */ - public static function register() - { - if (!\in_array('guzzle', \stream_get_wrappers())) { - \stream_wrapper_register('guzzle', __CLASS__); - } - } - public function stream_open($path, $mode, $options, &$opened_path) - { - $options = \stream_context_get_options($this->context); - if (!isset($options['guzzle']['stream'])) { - return \false; - } - $this->mode = $mode; - $this->stream = $options['guzzle']['stream']; - return \true; - } - public function stream_read($count) - { - return $this->stream->read($count); - } - public function stream_write($data) - { - return (int) $this->stream->write($data); - } - public function stream_tell() - { - return $this->stream->tell(); - } - public function stream_eof() - { - return $this->stream->eof(); - } - public function stream_seek($offset, $whence) - { - $this->stream->seek($offset, $whence); - return \true; - } - public function stream_cast($cast_as) - { - $stream = clone $this->stream; - return $stream->detach(); - } - public function stream_stat() - { - static $modeMap = ['r' => 33060, 'rb' => 33060, 'r+' => 33206, 'w' => 33188, 'wb' => 33188]; - return ['dev' => 0, 'ino' => 0, 'mode' => $modeMap[$this->mode], 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => $this->stream->getSize() ?: 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0]; - } - public function url_stat($path, $flags) - { - return ['dev' => 0, 'ino' => 0, 'mode' => 0, 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0]; - } -} diff --git a/build/psr7/src/UploadedFile.php b/build/psr7/src/UploadedFile.php deleted file mode 100644 index efd3788..0000000 --- a/build/psr7/src/UploadedFile.php +++ /dev/null @@ -1,244 +0,0 @@ -setError($errorStatus); - $this->setSize($size); - $this->setClientFilename($clientFilename); - $this->setClientMediaType($clientMediaType); - if ($this->isOk()) { - $this->setStreamOrFile($streamOrFile); - } - } - /** - * Depending on the value set file or stream variable - * - * @param mixed $streamOrFile - * @throws InvalidArgumentException - */ - private function setStreamOrFile($streamOrFile) - { - if (\is_string($streamOrFile)) { - $this->file = $streamOrFile; - } elseif (\is_resource($streamOrFile)) { - $this->stream = new \PayNL\GuzzleHttp\Psr7\Stream($streamOrFile); - } elseif ($streamOrFile instanceof \Psr\Http\Message\StreamInterface) { - $this->stream = $streamOrFile; - } else { - throw new \InvalidArgumentException('Invalid stream or file provided for UploadedFile'); - } - } - /** - * @param int $error - * @throws InvalidArgumentException - */ - private function setError($error) - { - if (\false === \is_int($error)) { - throw new \InvalidArgumentException('Upload file error status must be an integer'); - } - if (\false === \in_array($error, \PayNL\GuzzleHttp\Psr7\UploadedFile::$errors)) { - throw new \InvalidArgumentException('Invalid error status for UploadedFile'); - } - $this->error = $error; - } - /** - * @param int $size - * @throws InvalidArgumentException - */ - private function setSize($size) - { - if (\false === \is_int($size)) { - throw new \InvalidArgumentException('Upload file size must be an integer'); - } - $this->size = $size; - } - /** - * @param mixed $param - * @return boolean - */ - private function isStringOrNull($param) - { - return \in_array(\gettype($param), ['string', 'NULL']); - } - /** - * @param mixed $param - * @return boolean - */ - private function isStringNotEmpty($param) - { - return \is_string($param) && \false === empty($param); - } - /** - * @param string|null $clientFilename - * @throws InvalidArgumentException - */ - private function setClientFilename($clientFilename) - { - if (\false === $this->isStringOrNull($clientFilename)) { - throw new \InvalidArgumentException('Upload file client filename must be a string or null'); - } - $this->clientFilename = $clientFilename; - } - /** - * @param string|null $clientMediaType - * @throws InvalidArgumentException - */ - private function setClientMediaType($clientMediaType) - { - if (\false === $this->isStringOrNull($clientMediaType)) { - throw new \InvalidArgumentException('Upload file client media type must be a string or null'); - } - $this->clientMediaType = $clientMediaType; - } - /** - * Return true if there is no upload error - * - * @return boolean - */ - private function isOk() - { - return $this->error === \UPLOAD_ERR_OK; - } - /** - * @return boolean - */ - public function isMoved() - { - return $this->moved; - } - /** - * @throws RuntimeException if is moved or not ok - */ - private function validateActive() - { - if (\false === $this->isOk()) { - throw new \RuntimeException('Cannot retrieve stream due to upload error'); - } - if ($this->isMoved()) { - throw new \RuntimeException('Cannot retrieve stream after it has already been moved'); - } - } - /** - * {@inheritdoc} - * @throws RuntimeException if the upload was not successful. - */ - public function getStream() - { - $this->validateActive(); - if ($this->stream instanceof \Psr\Http\Message\StreamInterface) { - return $this->stream; - } - return new \PayNL\GuzzleHttp\Psr7\LazyOpenStream($this->file, 'r+'); - } - /** - * {@inheritdoc} - * - * @see http://php.net/is_uploaded_file - * @see http://php.net/move_uploaded_file - * @param string $targetPath Path to which to move the uploaded file. - * @throws RuntimeException if the upload was not successful. - * @throws InvalidArgumentException if the $path specified is invalid. - * @throws RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. - */ - public function moveTo($targetPath) - { - $this->validateActive(); - if (\false === $this->isStringNotEmpty($targetPath)) { - throw new \InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string'); - } - if ($this->file) { - $this->moved = \php_sapi_name() == 'cli' ? \rename($this->file, $targetPath) : \move_uploaded_file($this->file, $targetPath); - } else { - copy_to_stream($this->getStream(), new \PayNL\GuzzleHttp\Psr7\LazyOpenStream($targetPath, 'w')); - $this->moved = \true; - } - if (\false === $this->moved) { - throw new \RuntimeException(\sprintf('Uploaded file could not be moved to %s', $targetPath)); - } - } - /** - * {@inheritdoc} - * - * @return int|null The file size in bytes or null if unknown. - */ - public function getSize() - { - return $this->size; - } - /** - * {@inheritdoc} - * - * @see http://php.net/manual/en/features.file-upload.errors.php - * @return int One of PHP's UPLOAD_ERR_XXX constants. - */ - public function getError() - { - return $this->error; - } - /** - * {@inheritdoc} - * - * @return string|null The filename sent by the client or null if none - * was provided. - */ - public function getClientFilename() - { - return $this->clientFilename; - } - /** - * {@inheritdoc} - */ - public function getClientMediaType() - { - return $this->clientMediaType; - } -} diff --git a/build/psr7/src/Uri.php b/build/psr7/src/Uri.php deleted file mode 100644 index d5226f1..0000000 --- a/build/psr7/src/Uri.php +++ /dev/null @@ -1,598 +0,0 @@ - 80, 'https' => 443, 'ftp' => 21, 'gopher' => 70, 'nntp' => 119, 'news' => 119, 'telnet' => 23, 'tn3270' => 23, 'imap' => 143, 'pop' => 110, 'ldap' => 389]; - private static $charUnreserved = 'a-zA-Z0-9_\\-\\.~'; - private static $charSubDelims = '!\\$&\'\\(\\)\\*\\+,;='; - private static $replaceQuery = ['=' => '%3D', '&' => '%26']; - /** @var string Uri scheme. */ - private $scheme = ''; - /** @var string Uri user info. */ - private $userInfo = ''; - /** @var string Uri host. */ - private $host = ''; - /** @var int|null Uri port. */ - private $port; - /** @var string Uri path. */ - private $path = ''; - /** @var string Uri query string. */ - private $query = ''; - /** @var string Uri fragment. */ - private $fragment = ''; - /** - * @param string $uri URI to parse - */ - public function __construct($uri = '') - { - // weak type check to also accept null until we can add scalar type hints - if ($uri != '') { - $parts = \parse_url($uri); - if ($parts === \false) { - throw new \InvalidArgumentException("Unable to parse URI: {$uri}"); - } - $this->applyParts($parts); - } - } - public function __toString() - { - return self::composeComponents($this->scheme, $this->getAuthority(), $this->path, $this->query, $this->fragment); - } - /** - * Composes a URI reference string from its various components. - * - * Usually this method does not need to be called manually but instead is used indirectly via - * `Psr\Http\Message\UriInterface::__toString`. - * - * PSR-7 UriInterface treats an empty component the same as a missing component as - * getQuery(), getFragment() etc. always return a string. This explains the slight - * difference to RFC 3986 Section 5.3. - * - * Another adjustment is that the authority separator is added even when the authority is missing/empty - * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with - * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But - * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to - * that format). - * - * @param string $scheme - * @param string $authority - * @param string $path - * @param string $query - * @param string $fragment - * - * @return string - * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 - */ - public static function composeComponents($scheme, $authority, $path, $query, $fragment) - { - $uri = ''; - // weak type checks to also accept null until we can add scalar type hints - if ($scheme != '') { - $uri .= $scheme . ':'; - } - if ($authority != '' || $scheme === 'file') { - $uri .= '//' . $authority; - } - $uri .= $path; - if ($query != '') { - $uri .= '?' . $query; - } - if ($fragment != '') { - $uri .= '#' . $fragment; - } - return $uri; - } - /** - * Whether the URI has the default port of the current scheme. - * - * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used - * independently of the implementation. - * - * @param UriInterface $uri - * - * @return bool - */ - public static function isDefaultPort(\Psr\Http\Message\UriInterface $uri) - { - return $uri->getPort() === null || isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]; - } - /** - * Whether the URI is absolute, i.e. it has a scheme. - * - * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true - * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative - * to another URI, the base URI. Relative references can be divided into several forms: - * - network-path references, e.g. '//example.com/path' - * - absolute-path references, e.g. '/path' - * - relative-path references, e.g. 'subpath' - * - * @param UriInterface $uri - * - * @return bool - * @see Uri::isNetworkPathReference - * @see Uri::isAbsolutePathReference - * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 - */ - public static function isAbsolute(\Psr\Http\Message\UriInterface $uri) - { - return $uri->getScheme() !== ''; - } - /** - * Whether the URI is a network-path reference. - * - * A relative reference that begins with two slash characters is termed an network-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isNetworkPathReference(\Psr\Http\Message\UriInterface $uri) - { - return $uri->getScheme() === '' && $uri->getAuthority() !== ''; - } - /** - * Whether the URI is a absolute-path reference. - * - * A relative reference that begins with a single slash character is termed an absolute-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isAbsolutePathReference(\Psr\Http\Message\UriInterface $uri) - { - return $uri->getScheme() === '' && $uri->getAuthority() === '' && isset($uri->getPath()[0]) && $uri->getPath()[0] === '/'; - } - /** - * Whether the URI is a relative-path reference. - * - * A relative reference that does not begin with a slash character is termed a relative-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isRelativePathReference(\Psr\Http\Message\UriInterface $uri) - { - return $uri->getScheme() === '' && $uri->getAuthority() === '' && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); - } - /** - * Whether the URI is a same-document reference. - * - * A same-document reference refers to a URI that is, aside from its fragment - * component, identical to the base URI. When no base URI is given, only an empty - * URI reference (apart from its fragment) is considered a same-document reference. - * - * @param UriInterface $uri The URI to check - * @param UriInterface|null $base An optional base URI to compare against - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.4 - */ - public static function isSameDocumentReference(\Psr\Http\Message\UriInterface $uri, \Psr\Http\Message\UriInterface $base = null) - { - if ($base !== null) { - $uri = \PayNL\GuzzleHttp\Psr7\UriResolver::resolve($base, $uri); - return $uri->getScheme() === $base->getScheme() && $uri->getAuthority() === $base->getAuthority() && $uri->getPath() === $base->getPath() && $uri->getQuery() === $base->getQuery(); - } - return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; - } - /** - * Removes dot segments from a path and returns the new path. - * - * @param string $path - * - * @return string - * - * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. - * @see UriResolver::removeDotSegments - */ - public static function removeDotSegments($path) - { - return \PayNL\GuzzleHttp\Psr7\UriResolver::removeDotSegments($path); - } - /** - * Converts the relative URI into a new URI that is resolved against the base URI. - * - * @param UriInterface $base Base URI - * @param string|UriInterface $rel Relative URI - * - * @return UriInterface - * - * @deprecated since version 1.4. Use UriResolver::resolve instead. - * @see UriResolver::resolve - */ - public static function resolve(\Psr\Http\Message\UriInterface $base, $rel) - { - if (!$rel instanceof \Psr\Http\Message\UriInterface) { - $rel = new self($rel); - } - return \PayNL\GuzzleHttp\Psr7\UriResolver::resolve($base, $rel); - } - /** - * Creates a new URI with a specific query string value removed. - * - * Any existing query string values that exactly match the provided key are - * removed. - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Query string key to remove. - * - * @return UriInterface - */ - public static function withoutQueryValue(\Psr\Http\Message\UriInterface $uri, $key) - { - $result = self::getFilteredQueryString($uri, [$key]); - return $uri->withQuery(\implode('&', $result)); - } - /** - * Creates a new URI with a specific query string value. - * - * Any existing query string values that exactly match the provided key are - * removed and replaced with the given key value pair. - * - * A value of null will set the query string key without a value, e.g. "key" - * instead of "key=value". - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Key to set. - * @param string|null $value Value to set - * - * @return UriInterface - */ - public static function withQueryValue(\Psr\Http\Message\UriInterface $uri, $key, $value) - { - $result = self::getFilteredQueryString($uri, [$key]); - $result[] = self::generateQueryString($key, $value); - return $uri->withQuery(\implode('&', $result)); - } - /** - * Creates a new URI with multiple specific query string values. - * - * It has the same behavior as withQueryValue() but for an associative array of key => value. - * - * @param UriInterface $uri URI to use as a base. - * @param array $keyValueArray Associative array of key and values - * - * @return UriInterface - */ - public static function withQueryValues(\Psr\Http\Message\UriInterface $uri, array $keyValueArray) - { - $result = self::getFilteredQueryString($uri, \array_keys($keyValueArray)); - foreach ($keyValueArray as $key => $value) { - $result[] = self::generateQueryString($key, $value); - } - return $uri->withQuery(\implode('&', $result)); - } - /** - * Creates a URI from a hash of `parse_url` components. - * - * @param array $parts - * - * @return UriInterface - * @link http://php.net/manual/en/function.parse-url.php - * - * @throws \InvalidArgumentException If the components do not form a valid URI. - */ - public static function fromParts(array $parts) - { - $uri = new self(); - $uri->applyParts($parts); - $uri->validateState(); - return $uri; - } - public function getScheme() - { - return $this->scheme; - } - public function getAuthority() - { - $authority = $this->host; - if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; - } - if ($this->port !== null) { - $authority .= ':' . $this->port; - } - return $authority; - } - public function getUserInfo() - { - return $this->userInfo; - } - public function getHost() - { - return $this->host; - } - public function getPort() - { - return $this->port; - } - public function getPath() - { - return $this->path; - } - public function getQuery() - { - return $this->query; - } - public function getFragment() - { - return $this->fragment; - } - public function withScheme($scheme) - { - $scheme = $this->filterScheme($scheme); - if ($this->scheme === $scheme) { - return $this; - } - $new = clone $this; - $new->scheme = $scheme; - $new->removeDefaultPort(); - $new->validateState(); - return $new; - } - public function withUserInfo($user, $password = null) - { - $info = $this->filterUserInfoComponent($user); - if ($password !== null) { - $info .= ':' . $this->filterUserInfoComponent($password); - } - if ($this->userInfo === $info) { - return $this; - } - $new = clone $this; - $new->userInfo = $info; - $new->validateState(); - return $new; - } - public function withHost($host) - { - $host = $this->filterHost($host); - if ($this->host === $host) { - return $this; - } - $new = clone $this; - $new->host = $host; - $new->validateState(); - return $new; - } - public function withPort($port) - { - $port = $this->filterPort($port); - if ($this->port === $port) { - return $this; - } - $new = clone $this; - $new->port = $port; - $new->removeDefaultPort(); - $new->validateState(); - return $new; - } - public function withPath($path) - { - $path = $this->filterPath($path); - if ($this->path === $path) { - return $this; - } - $new = clone $this; - $new->path = $path; - $new->validateState(); - return $new; - } - public function withQuery($query) - { - $query = $this->filterQueryAndFragment($query); - if ($this->query === $query) { - return $this; - } - $new = clone $this; - $new->query = $query; - return $new; - } - public function withFragment($fragment) - { - $fragment = $this->filterQueryAndFragment($fragment); - if ($this->fragment === $fragment) { - return $this; - } - $new = clone $this; - $new->fragment = $fragment; - return $new; - } - /** - * Apply parse_url parts to a URI. - * - * @param array $parts Array of parse_url parts to apply. - */ - private function applyParts(array $parts) - { - $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : ''; - $this->userInfo = isset($parts['user']) ? $this->filterUserInfoComponent($parts['user']) : ''; - $this->host = isset($parts['host']) ? $this->filterHost($parts['host']) : ''; - $this->port = isset($parts['port']) ? $this->filterPort($parts['port']) : null; - $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : ''; - $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : ''; - $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : ''; - if (isset($parts['pass'])) { - $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); - } - $this->removeDefaultPort(); - } - /** - * @param string $scheme - * - * @return string - * - * @throws \InvalidArgumentException If the scheme is invalid. - */ - private function filterScheme($scheme) - { - if (!\is_string($scheme)) { - throw new \InvalidArgumentException('Scheme must be a string'); - } - return \strtolower($scheme); - } - /** - * @param string $component - * - * @return string - * - * @throws \InvalidArgumentException If the user info is invalid. - */ - private function filterUserInfoComponent($component) - { - if (!\is_string($component)) { - throw new \InvalidArgumentException('User info must be a string'); - } - return \preg_replace_callback('/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $component); - } - /** - * @param string $host - * - * @return string - * - * @throws \InvalidArgumentException If the host is invalid. - */ - private function filterHost($host) - { - if (!\is_string($host)) { - throw new \InvalidArgumentException('Host must be a string'); - } - return \strtolower($host); - } - /** - * @param int|null $port - * - * @return int|null - * - * @throws \InvalidArgumentException If the port is invalid. - */ - private function filterPort($port) - { - if ($port === null) { - return null; - } - $port = (int) $port; - if (0 > $port || 0xffff < $port) { - throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 0 and 65535', $port)); - } - return $port; - } - /** - * @param UriInterface $uri - * @param array $keys - * - * @return array - */ - private static function getFilteredQueryString(\Psr\Http\Message\UriInterface $uri, array $keys) - { - $current = $uri->getQuery(); - if ($current === '') { - return []; - } - $decodedKeys = \array_map('rawurldecode', $keys); - return \array_filter(\explode('&', $current), function ($part) use($decodedKeys) { - return !\in_array(\rawurldecode(\explode('=', $part)[0]), $decodedKeys, \true); - }); - } - /** - * @param string $key - * @param string|null $value - * - * @return string - */ - private static function generateQueryString($key, $value) - { - // Query string separators ("=", "&") within the key or value need to be encoded - // (while preventing double-encoding) before setting the query string. All other - // chars that need percent-encoding will be encoded by withQuery(). - $queryString = \strtr($key, self::$replaceQuery); - if ($value !== null) { - $queryString .= '=' . \strtr($value, self::$replaceQuery); - } - return $queryString; - } - private function removeDefaultPort() - { - if ($this->port !== null && self::isDefaultPort($this)) { - $this->port = null; - } - } - /** - * Filters the path of a URI - * - * @param string $path - * - * @return string - * - * @throws \InvalidArgumentException If the path is invalid. - */ - private function filterPath($path) - { - if (!\is_string($path)) { - throw new \InvalidArgumentException('Path must be a string'); - } - return \preg_replace_callback('/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\\/]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $path); - } - /** - * Filters the query string or fragment of a URI. - * - * @param string $str - * - * @return string - * - * @throws \InvalidArgumentException If the query or fragment is invalid. - */ - private function filterQueryAndFragment($str) - { - if (!\is_string($str)) { - throw new \InvalidArgumentException('Query and fragment must be a string'); - } - return \preg_replace_callback('/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\\/\\?]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $str); - } - private function rawurlencodeMatchZero(array $match) - { - return \rawurlencode($match[0]); - } - private function validateState() - { - if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { - $this->host = self::HTTP_DEFAULT_HOST; - } - if ($this->getAuthority() === '') { - if (0 === \strpos($this->path, '//')) { - throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); - } - if ($this->scheme === '' && \false !== \strpos(\explode('/', $this->path, 2)[0], ':')) { - throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); - } - } elseif (isset($this->path[0]) && $this->path[0] !== '/') { - @\trigger_error('The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', \E_USER_DEPRECATED); - $this->path = '/' . $this->path; - //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); - } - } -} diff --git a/build/psr7/src/UriNormalizer.php b/build/psr7/src/UriNormalizer.php deleted file mode 100644 index b47e4c7..0000000 --- a/build/psr7/src/UriNormalizer.php +++ /dev/null @@ -1,179 +0,0 @@ -getPath() === '' && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')) { - $uri = $uri->withPath('/'); - } - if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { - $uri = $uri->withHost(''); - } - if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && \PayNL\GuzzleHttp\Psr7\Uri::isDefaultPort($uri)) { - $uri = $uri->withPort(null); - } - if ($flags & self::REMOVE_DOT_SEGMENTS && !\PayNL\GuzzleHttp\Psr7\Uri::isRelativePathReference($uri)) { - $uri = $uri->withPath(\PayNL\GuzzleHttp\Psr7\UriResolver::removeDotSegments($uri->getPath())); - } - if ($flags & self::REMOVE_DUPLICATE_SLASHES) { - $uri = $uri->withPath(\preg_replace('#//++#', '/', $uri->getPath())); - } - if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { - $queryKeyValues = \explode('&', $uri->getQuery()); - \sort($queryKeyValues); - $uri = $uri->withQuery(\implode('&', $queryKeyValues)); - } - return $uri; - } - /** - * Whether two URIs can be considered equivalent. - * - * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also - * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be - * resolved against the same base URI. If this is not the case, determination of equivalence or difference of - * relative references does not mean anything. - * - * @param UriInterface $uri1 An URI to compare - * @param UriInterface $uri2 An URI to compare - * @param int $normalizations A bitmask of normalizations to apply, see constants - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-6.1 - */ - public static function isEquivalent(\Psr\Http\Message\UriInterface $uri1, \Psr\Http\Message\UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) - { - return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); - } - private static function capitalizePercentEncoding(\Psr\Http\Message\UriInterface $uri) - { - $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - $callback = function (array $match) { - return \strtoupper($match[0]); - }; - return $uri->withPath(\preg_replace_callback($regex, $callback, $uri->getPath()))->withQuery(\preg_replace_callback($regex, $callback, $uri->getQuery())); - } - private static function decodeUnreservedCharacters(\Psr\Http\Message\UriInterface $uri) - { - $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - $callback = function (array $match) { - return \rawurldecode($match[0]); - }; - return $uri->withPath(\preg_replace_callback($regex, $callback, $uri->getPath()))->withQuery(\preg_replace_callback($regex, $callback, $uri->getQuery())); - } - private function __construct() - { - // cannot be instantiated - } -} diff --git a/build/psr7/src/UriResolver.php b/build/psr7/src/UriResolver.php deleted file mode 100644 index e0d0758..0000000 --- a/build/psr7/src/UriResolver.php +++ /dev/null @@ -1,190 +0,0 @@ -getScheme() != '') { - return $rel->withPath(self::removeDotSegments($rel->getPath())); - } - if ($rel->getAuthority() != '') { - $targetAuthority = $rel->getAuthority(); - $targetPath = self::removeDotSegments($rel->getPath()); - $targetQuery = $rel->getQuery(); - } else { - $targetAuthority = $base->getAuthority(); - if ($rel->getPath() === '') { - $targetPath = $base->getPath(); - $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); - } else { - if ($rel->getPath()[0] === '/') { - $targetPath = $rel->getPath(); - } else { - if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); - } else { - $lastSlashPos = \strrpos($base->getPath(), '/'); - if ($lastSlashPos === \false) { - $targetPath = $rel->getPath(); - } else { - $targetPath = \substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); - } - } - } - $targetPath = self::removeDotSegments($targetPath); - $targetQuery = $rel->getQuery(); - } - } - return new \PayNL\GuzzleHttp\Psr7\Uri(\PayNL\GuzzleHttp\Psr7\Uri::composeComponents($base->getScheme(), $targetAuthority, $targetPath, $targetQuery, $rel->getFragment())); - } - /** - * Returns the target URI as a relative reference from the base URI. - * - * This method is the counterpart to resolve(): - * - * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) - * - * One use-case is to use the current request URI as base URI and then generate relative links in your documents - * to reduce the document size or offer self-contained downloadable document archives. - * - * $base = new Uri('http://example.com/a/b/'); - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. - * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. - * - * This method also accepts a target that is already relative and will try to relativize it further. Only a - * relative-path reference will be returned as-is. - * - * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well - * - * @param UriInterface $base Base URI - * @param UriInterface $target Target URI - * - * @return UriInterface The relative URI reference - */ - public static function relativize(\Psr\Http\Message\UriInterface $base, \Psr\Http\Message\UriInterface $target) - { - if ($target->getScheme() !== '' && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')) { - return $target; - } - if (\PayNL\GuzzleHttp\Psr7\Uri::isRelativePathReference($target)) { - // As the target is already highly relative we return it as-is. It would be possible to resolve - // the target with `$target = self::resolve($base, $target);` and then try make it more relative - // by removing a duplicate query. But let's not do that automatically. - return $target; - } - if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { - return $target->withScheme(''); - } - // We must remove the path before removing the authority because if the path starts with two slashes, the URI - // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also - // invalid. - $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); - if ($base->getPath() !== $target->getPath()) { - return $emptyPathUri->withPath(self::getRelativePath($base, $target)); - } - if ($base->getQuery() === $target->getQuery()) { - // Only the target fragment is left. And it must be returned even if base and target fragment are the same. - return $emptyPathUri->withQuery(''); - } - // If the base URI has a query but the target has none, we cannot return an empty path reference as it would - // inherit the base query component when resolving. - if ($target->getQuery() === '') { - $segments = \explode('/', $target->getPath()); - $lastSegment = \end($segments); - return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); - } - return $emptyPathUri; - } - private static function getRelativePath(\Psr\Http\Message\UriInterface $base, \Psr\Http\Message\UriInterface $target) - { - $sourceSegments = \explode('/', $base->getPath()); - $targetSegments = \explode('/', $target->getPath()); - \array_pop($sourceSegments); - $targetLastSegment = \array_pop($targetSegments); - foreach ($sourceSegments as $i => $segment) { - if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { - unset($sourceSegments[$i], $targetSegments[$i]); - } else { - break; - } - } - $targetSegments[] = $targetLastSegment; - $relativePath = \str_repeat('../', \count($sourceSegments)) . \implode('/', $targetSegments); - // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. - if ('' === $relativePath || \false !== \strpos(\explode('/', $relativePath, 2)[0], ':')) { - $relativePath = "./{$relativePath}"; - } elseif ('/' === $relativePath[0]) { - if ($base->getAuthority() != '' && $base->getPath() === '') { - // In this case an extra slash is added by resolve() automatically. So we must not add one here. - $relativePath = ".{$relativePath}"; - } else { - $relativePath = "./{$relativePath}"; - } - } - return $relativePath; - } - private function __construct() - { - // cannot be instantiated - } -} diff --git a/build/psr7/src/functions.php b/build/psr7/src/functions.php deleted file mode 100644 index 73613ce..0000000 --- a/build/psr7/src/functions.php +++ /dev/null @@ -1,657 +0,0 @@ -getMethod() . ' ' . $message->getRequestTarget()) . ' HTTP/' . $message->getProtocolVersion(); - if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); - } - } elseif ($message instanceof \Psr\Http\Message\ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' . $message->getStatusCode() . ' ' . $message->getReasonPhrase(); - } else { - throw new \InvalidArgumentException('Unknown message type'); - } - foreach ($message->getHeaders() as $name => $values) { - $msg .= "\r\n{$name}: " . \implode(', ', $values); - } - return "{$msg}\r\n\r\n" . $message->getBody(); -} -/** - * Returns a UriInterface for the given value. - * - * This function accepts a string or {@see Psr\Http\Message\UriInterface} and - * returns a UriInterface for the given value. If the value is already a - * `UriInterface`, it is returned as-is. - * - * @param string|UriInterface $uri - * - * @return UriInterface - * @throws \InvalidArgumentException - */ -function uri_for($uri) -{ - if ($uri instanceof \Psr\Http\Message\UriInterface) { - return $uri; - } elseif (\is_string($uri)) { - return new \PayNL\GuzzleHttp\Psr7\Uri($uri); - } - throw new \InvalidArgumentException('URI must be a string or UriInterface'); -} -/** - * Create a new stream based on the input type. - * - * Options is an associative array that can contain the following keys: - * - metadata: Array of custom metadata. - * - size: Size of the stream. - * - * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data - * @param array $options Additional options - * - * @return StreamInterface - * @throws \InvalidArgumentException if the $resource arg is not valid. - */ -function stream_for($resource = '', array $options = []) -{ - if (\is_scalar($resource)) { - $stream = \fopen('php://temp', 'r+'); - if ($resource !== '') { - \fwrite($stream, $resource); - \fseek($stream, 0); - } - return new \PayNL\GuzzleHttp\Psr7\Stream($stream, $options); - } - switch (\gettype($resource)) { - case 'resource': - return new \PayNL\GuzzleHttp\Psr7\Stream($resource, $options); - case 'object': - if ($resource instanceof \Psr\Http\Message\StreamInterface) { - return $resource; - } elseif ($resource instanceof \Iterator) { - return new \PayNL\GuzzleHttp\Psr7\PumpStream(function () use($resource) { - if (!$resource->valid()) { - return \false; - } - $result = $resource->current(); - $resource->next(); - return $result; - }, $options); - } elseif (\method_exists($resource, '__toString')) { - return stream_for((string) $resource, $options); - } - break; - case 'NULL': - return new \PayNL\GuzzleHttp\Psr7\Stream(\fopen('php://temp', 'r+'), $options); - } - if (\is_callable($resource)) { - return new \PayNL\GuzzleHttp\Psr7\PumpStream($resource, $options); - } - throw new \InvalidArgumentException('Invalid resource type: ' . \gettype($resource)); -} -/** - * Parse an array of header values containing ";" separated data into an - * array of associative arrays representing the header key value pair - * data of the header. When a parameter does not contain a value, but just - * contains a key, this function will inject a key with a '' string value. - * - * @param string|array $header Header to parse into components. - * - * @return array Returns the parsed header values. - */ -function parse_header($header) -{ - static $trimmed = "\"' \n\t\r"; - $params = $matches = []; - foreach (normalize_header($header) as $val) { - $part = []; - foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { - if (\preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[\trim($m[0], $trimmed)] = \trim($m[1], $trimmed); - } else { - $part[] = \trim($m[0], $trimmed); - } - } - } - if ($part) { - $params[] = $part; - } - } - return $params; -} -/** - * Converts an array of header values that may contain comma separated - * headers into an array of headers with no comma separated values. - * - * @param string|array $header Header to normalize. - * - * @return array Returns the normalized header field values. - */ -function normalize_header($header) -{ - if (!\is_array($header)) { - return \array_map('trim', \explode(',', $header)); - } - $result = []; - foreach ($header as $value) { - foreach ((array) $value as $v) { - if (\strpos($v, ',') === \false) { - $result[] = $v; - continue; - } - foreach (\preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { - $result[] = \trim($vv); - } - } - } - return $result; -} -/** - * Clone and modify a request with the given changes. - * - * The changes can be one of: - * - method: (string) Changes the HTTP method. - * - set_headers: (array) Sets the given headers. - * - remove_headers: (array) Remove the given headers. - * - body: (mixed) Sets the given body. - * - uri: (UriInterface) Set the URI. - * - query: (string) Set the query string value of the URI. - * - version: (string) Set the protocol version. - * - * @param RequestInterface $request Request to clone and modify. - * @param array $changes Changes to apply. - * - * @return RequestInterface - */ -function modify_request(\Psr\Http\Message\RequestInterface $request, array $changes) -{ - if (!$changes) { - return $request; - } - $headers = $request->getHeaders(); - if (!isset($changes['uri'])) { - $uri = $request->getUri(); - } else { - // Remove the host header if one is on the URI - if ($host = $changes['uri']->getHost()) { - $changes['set_headers']['Host'] = $host; - if ($port = $changes['uri']->getPort()) { - $standardPorts = ['http' => 80, 'https' => 443]; - $scheme = $changes['uri']->getScheme(); - if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':' . $port; - } - } - } - $uri = $changes['uri']; - } - if (!empty($changes['remove_headers'])) { - $headers = _caseless_remove($changes['remove_headers'], $headers); - } - if (!empty($changes['set_headers'])) { - $headers = _caseless_remove(\array_keys($changes['set_headers']), $headers); - $headers = $changes['set_headers'] + $headers; - } - if (isset($changes['query'])) { - $uri = $uri->withQuery($changes['query']); - } - if ($request instanceof \Psr\Http\Message\ServerRequestInterface) { - return (new \PayNL\GuzzleHttp\Psr7\ServerRequest(isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, isset($changes['body']) ? $changes['body'] : $request->getBody(), isset($changes['version']) ? $changes['version'] : $request->getProtocolVersion(), $request->getServerParams()))->withParsedBody($request->getParsedBody())->withQueryParams($request->getQueryParams())->withCookieParams($request->getCookieParams())->withUploadedFiles($request->getUploadedFiles()); - } - return new \PayNL\GuzzleHttp\Psr7\Request(isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, isset($changes['body']) ? $changes['body'] : $request->getBody(), isset($changes['version']) ? $changes['version'] : $request->getProtocolVersion()); -} -/** - * Attempts to rewind a message body and throws an exception on failure. - * - * The body of the message will only be rewound if a call to `tell()` returns a - * value other than `0`. - * - * @param MessageInterface $message Message to rewind - * - * @throws \RuntimeException - */ -function rewind_body(\Psr\Http\Message\MessageInterface $message) -{ - $body = $message->getBody(); - if ($body->tell()) { - $body->rewind(); - } -} -/** - * Safely opens a PHP stream resource using a filename. - * - * When fopen fails, PHP normally raises a warning. This function adds an - * error handler that checks for errors and throws an exception instead. - * - * @param string $filename File to open - * @param string $mode Mode used to open the file - * - * @return resource - * @throws \RuntimeException if the file cannot be opened - */ -function try_fopen($filename, $mode) -{ - $ex = null; - \set_error_handler(function () use($filename, $mode, &$ex) { - $ex = new \RuntimeException(\sprintf('Unable to open %s using mode %s: %s', $filename, $mode, \func_get_args()[1])); - }); - $handle = \fopen($filename, $mode); - \restore_error_handler(); - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - return $handle; -} -/** - * Copy the contents of a stream into a string until the given number of - * bytes have been read. - * - * @param StreamInterface $stream Stream to read - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * @return string - * @throws \RuntimeException on error. - */ -function copy_to_string(\Psr\Http\Message\StreamInterface $stream, $maxLen = -1) -{ - $buffer = ''; - if ($maxLen === -1) { - while (!$stream->eof()) { - $buf = $stream->read(1048576); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - } - return $buffer; - } - $len = 0; - while (!$stream->eof() && $len < $maxLen) { - $buf = $stream->read($maxLen - $len); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - $len = \strlen($buffer); - } - return $buffer; -} -/** - * Copy the contents of a stream into another stream until the given number - * of bytes have been read. - * - * @param StreamInterface $source Stream to read from - * @param StreamInterface $dest Stream to write to - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @throws \RuntimeException on error. - */ -function copy_to_stream(\Psr\Http\Message\StreamInterface $source, \Psr\Http\Message\StreamInterface $dest, $maxLen = -1) -{ - $bufferSize = 8192; - if ($maxLen === -1) { - while (!$source->eof()) { - if (!$dest->write($source->read($bufferSize))) { - break; - } - } - } else { - $remaining = $maxLen; - while ($remaining > 0 && !$source->eof()) { - $buf = $source->read(\min($bufferSize, $remaining)); - $len = \strlen($buf); - if (!$len) { - break; - } - $remaining -= $len; - $dest->write($buf); - } - } -} -/** - * Calculate a hash of a Stream - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @return string Returns the hash of the stream - * @throws \RuntimeException on error. - */ -function hash(\Psr\Http\Message\StreamInterface $stream, $algo, $rawOutput = \false) -{ - $pos = $stream->tell(); - if ($pos > 0) { - $stream->rewind(); - } - $ctx = \hash_init($algo); - while (!$stream->eof()) { - \hash_update($ctx, $stream->read(1048576)); - } - $out = \hash_final($ctx, (bool) $rawOutput); - $stream->seek($pos); - return $out; -} -/** - * Read a line from the stream up to the maximum allowed buffer length - * - * @param StreamInterface $stream Stream to read from - * @param int $maxLength Maximum buffer length - * - * @return string - */ -function readline(\Psr\Http\Message\StreamInterface $stream, $maxLength = null) -{ - $buffer = ''; - $size = 0; - while (!$stream->eof()) { - // Using a loose equality here to match on '' and false. - if (null == ($byte = $stream->read(1))) { - return $buffer; - } - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte === "\n" || ++$size === $maxLength - 1) { - break; - } - } - return $buffer; -} -/** - * Parses a request message string into a request object. - * - * @param string $message Request message string. - * - * @return Request - */ -function parse_request($message) -{ - $data = _parse_message($message); - $matches = []; - if (!\preg_match('/^[\\S]+\\s+([a-zA-Z]+:\\/\\/|\\/).*/', $data['start-line'], $matches)) { - throw new \InvalidArgumentException('Invalid request string'); - } - $parts = \explode(' ', $data['start-line'], 3); - $version = isset($parts[2]) ? \explode('/', $parts[2])[1] : '1.1'; - $request = new \PayNL\GuzzleHttp\Psr7\Request($parts[0], $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1], $data['headers'], $data['body'], $version); - return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); -} -/** - * Parses a response message string into a response object. - * - * @param string $message Response message string. - * - * @return Response - */ -function parse_response($message) -{ - $data = _parse_message($message); - // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space - // between status-code and reason-phrase is required. But browsers accept - // responses without space and reason as well. - if (!\preg_match('/^HTTP\\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); - } - $parts = \explode(' ', $data['start-line'], 3); - return new \PayNL\GuzzleHttp\Psr7\Response($parts[1], $data['headers'], $data['body'], \explode('/', $parts[0])[1], isset($parts[2]) ? $parts[2] : null); -} -/** - * Parse a query string into an associative array. - * - * If multiple values are found for the same key, the value of that key - * value pair will become an array. This function does not parse nested - * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will - * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']). - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - * - * @return array - */ -function parse_query($str, $urlEncoding = \true) -{ - $result = []; - if ($str === '') { - return $result; - } - if ($urlEncoding === \true) { - $decoder = function ($value) { - return \rawurldecode(\str_replace('+', ' ', $value)); - }; - } elseif ($urlEncoding === \PHP_QUERY_RFC3986) { - $decoder = 'rawurldecode'; - } elseif ($urlEncoding === \PHP_QUERY_RFC1738) { - $decoder = 'urldecode'; - } else { - $decoder = function ($str) { - return $str; - }; - } - foreach (\explode('&', $str) as $kvp) { - $parts = \explode('=', $kvp, 2); - $key = $decoder($parts[0]); - $value = isset($parts[1]) ? $decoder($parts[1]) : null; - if (!isset($result[$key])) { - $result[$key] = $value; - } else { - if (!\is_array($result[$key])) { - $result[$key] = [$result[$key]]; - } - $result[$key][] = $value; - } - } - return $result; -} -/** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of parse_query() to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like http_build_query would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * @return string - */ -function build_query(array $params, $encoding = \PHP_QUERY_RFC3986) -{ - if (!$params) { - return ''; - } - if ($encoding === \false) { - $encoder = function ($str) { - return $str; - }; - } elseif ($encoding === \PHP_QUERY_RFC3986) { - $encoder = 'rawurlencode'; - } elseif ($encoding === \PHP_QUERY_RFC1738) { - $encoder = 'urlencode'; - } else { - throw new \InvalidArgumentException('Invalid type'); - } - $qs = ''; - foreach ($params as $k => $v) { - $k = $encoder($k); - if (!\is_array($v)) { - $qs .= $k; - if ($v !== null) { - $qs .= '=' . $encoder($v); - } - $qs .= '&'; - } else { - foreach ($v as $vv) { - $qs .= $k; - if ($vv !== null) { - $qs .= '=' . $encoder($vv); - } - $qs .= '&'; - } - } - } - return $qs ? (string) \substr($qs, 0, -1) : ''; -} -/** - * Determines the mimetype of a file by looking at its extension. - * - * @param $filename - * - * @return null|string - */ -function mimetype_from_filename($filename) -{ - return mimetype_from_extension(\pathinfo($filename, \PATHINFO_EXTENSION)); -} -/** - * Maps a file extensions to a mimetype. - * - * @param $extension string The file extension. - * - * @return string|null - * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types - */ -function mimetype_from_extension($extension) -{ - static $mimetypes = ['3gp' => 'video/3gpp', '7z' => 'application/x-7z-compressed', 'aac' => 'audio/x-aac', 'ai' => 'application/postscript', 'aif' => 'audio/x-aiff', 'asc' => 'text/plain', 'asf' => 'video/x-ms-asf', 'atom' => 'application/atom+xml', 'avi' => 'video/x-msvideo', 'bmp' => 'image/bmp', 'bz2' => 'application/x-bzip2', 'cer' => 'application/pkix-cert', 'crl' => 'application/pkix-crl', 'crt' => 'application/x-x509-ca-cert', 'css' => 'text/css', 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'deb' => 'application/x-debian-package', 'doc' => 'application/msword', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'dvi' => 'application/x-dvi', 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', 'etx' => 'text/x-setext', 'flac' => 'audio/flac', 'flv' => 'video/x-flv', 'gif' => 'image/gif', 'gz' => 'application/gzip', 'htm' => 'text/html', 'html' => 'text/html', 'ico' => 'image/x-icon', 'ics' => 'text/calendar', 'ini' => 'text/plain', 'iso' => 'application/x-iso9660-image', 'jar' => 'application/java-archive', 'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'js' => 'text/javascript', 'json' => 'application/json', 'latex' => 'application/x-latex', 'log' => 'text/plain', 'm4a' => 'audio/mp4', 'm4v' => 'video/mp4', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mov' => 'video/quicktime', 'mkv' => 'video/x-matroska', 'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4', 'mp4a' => 'audio/mp4', 'mp4v' => 'video/mp4', 'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpg4' => 'video/mp4', 'oga' => 'audio/ogg', 'ogg' => 'audio/ogg', 'ogv' => 'video/ogg', 'ogx' => 'application/ogg', 'pbm' => 'image/x-portable-bitmap', 'pdf' => 'application/pdf', 'pgm' => 'image/x-portable-graymap', 'png' => 'image/png', 'pnm' => 'image/x-portable-anymap', 'ppm' => 'image/x-portable-pixmap', 'ppt' => 'application/vnd.ms-powerpoint', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'ps' => 'application/postscript', 'qt' => 'video/quicktime', 'rar' => 'application/x-rar-compressed', 'ras' => 'image/x-cmu-raster', 'rss' => 'application/rss+xml', 'rtf' => 'application/rtf', 'sgm' => 'text/sgml', 'sgml' => 'text/sgml', 'svg' => 'image/svg+xml', 'swf' => 'application/x-shockwave-flash', 'tar' => 'application/x-tar', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'torrent' => 'application/x-bittorrent', 'ttf' => 'application/x-font-ttf', 'txt' => 'text/plain', 'wav' => 'audio/x-wav', 'webm' => 'video/webm', 'webp' => 'image/webp', 'wma' => 'audio/x-ms-wma', 'wmv' => 'video/x-ms-wmv', 'woff' => 'application/x-font-woff', 'wsdl' => 'application/wsdl+xml', 'xbm' => 'image/x-xbitmap', 'xls' => 'application/vnd.ms-excel', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xml' => 'application/xml', 'xpm' => 'image/x-xpixmap', 'xwd' => 'image/x-xwindowdump', 'yaml' => 'text/yaml', 'yml' => 'text/yaml', 'zip' => 'application/zip']; - $extension = \strtolower($extension); - return isset($mimetypes[$extension]) ? $mimetypes[$extension] : null; -} -/** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - * @internal - */ -function _parse_message($message) -{ - if (!$message) { - throw new \InvalidArgumentException('Invalid message'); - } - $message = \ltrim($message, "\r\n"); - $messageParts = \preg_split("/\r?\n\r?\n/", $message, 2); - if ($messageParts === \false || \count($messageParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); - } - list($rawHeaders, $body) = $messageParts; - $rawHeaders .= "\r\n"; - // Put back the delimiter we split previously - $headerParts = \preg_split("/\r?\n/", $rawHeaders, 2); - if ($headerParts === \false || \count($headerParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing status line'); - } - list($startLine, $rawHeaders) = $headerParts; - if (\preg_match("/(?:^HTTP\\/|^[A-Z]+ \\S+ HTTP\\/)(\\d+(?:\\.\\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { - // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 - $rawHeaders = \preg_replace(\PayNL\GuzzleHttp\Psr7\Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); - } - /** @var array[] $headerLines */ - $count = \preg_match_all(\PayNL\GuzzleHttp\Psr7\Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, \PREG_SET_ORDER); - // If these aren't the same, then one line didn't match and there's an invalid header. - if ($count !== \substr_count($rawHeaders, "\n")) { - // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 - if (\preg_match(\PayNL\GuzzleHttp\Psr7\Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { - throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); - } - throw new \InvalidArgumentException('Invalid header syntax'); - } - $headers = []; - foreach ($headerLines as $headerLine) { - $headers[$headerLine[1]][] = $headerLine[2]; - } - return ['start-line' => $startLine, 'headers' => $headers, 'body' => $body]; -} -/** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - * @internal - */ -function _parse_request_uri($path, array $headers) -{ - $hostKey = \array_filter(\array_keys($headers), function ($k) { - return \strtolower($k) === 'host'; - }); - // If no host is found, then a full URI cannot be constructed. - if (!$hostKey) { - return $path; - } - $host = $headers[\reset($hostKey)][0]; - $scheme = \substr($host, -4) === ':443' ? 'https' : 'http'; - return $scheme . '://' . $host . '/' . \ltrim($path, '/'); -} -/** - * Get a short summary of the message body - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - * - * @return null|string - */ -function get_message_body_summary(\Psr\Http\Message\MessageInterface $message, $truncateAt = 120) -{ - $body = $message->getBody(); - if (!$body->isSeekable() || !$body->isReadable()) { - return null; - } - $size = $body->getSize(); - if ($size === 0) { - return null; - } - $summary = $body->read($truncateAt); - $body->rewind(); - if ($size > $truncateAt) { - $summary .= ' (truncated...)'; - } - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (\preg_match('/[^\\pL\\pM\\pN\\pP\\pS\\pZ\\n\\r\\t]/', $summary)) { - return null; - } - return $summary; -} -/** @internal */ -function _caseless_remove($keys, array $data) -{ - $result = []; - foreach ($keys as &$key) { - $key = \strtolower($key); - } - foreach ($data as $k => $v) { - if (!\in_array(\strtolower($k), $keys)) { - $result[$k] = $v; - } - } - return $result; -} diff --git a/build/psr7/src/functions_include.php b/build/psr7/src/functions_include.php deleted file mode 100644 index 742dc99..0000000 --- a/build/psr7/src/functions_include.php +++ /dev/null @@ -1,8 +0,0 @@ - Date: Mon, 9 Dec 2024 12:51:37 +0100 Subject: [PATCH 08/46] autoloader update without build dir --- composer.json | 5 +---- src/Api/Api.php | 16 ++++++++-------- src/Api/Factory.php | 4 ++-- src/Request/AbstractRequest.php | 11 ++++------- src/Request/RequestInterface.php | 2 +- 5 files changed, 16 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index 851929c..2724e93 100644 --- a/composer.json +++ b/composer.json @@ -32,10 +32,7 @@ }, "autoload": { "psr-4": { - "PayNL\\Sdk\\": "src/", - "PayNL\\GuzzleHttp\\": "build/guzzle/src", - "PayNL\\GuzzleHttp\\Promise\\": "build/promises/src", - "PayNL\\GuzzleHttp\\Psr7\\": "build/psr7/src" + "PayNL\\Sdk\\": "src/" }, "files": [ "./src/Resources/functions/text.php", diff --git a/src/Api/Api.php b/src/Api/Api.php index dfe43cc..e1daa04 100644 --- a/src/Api/Api.php +++ b/src/Api/Api.php @@ -4,7 +4,6 @@ namespace PayNL\Sdk\Api; -use PayNL\GuzzleHttp\Client as GuzzleClient; use PayNL\Sdk\{ AuthAdapter\AdapterInterface as AuthAdapterInterface, Common\DebugAwareInterface, @@ -16,6 +15,7 @@ Request\RequestInterface, Response\ResponseInterface }; +use GuzzleHttp\Client; /** * Class Api @@ -28,7 +28,7 @@ class Api implements OptionsAwareInterface, DebugAwareInterface use OptionsAwareTrait; /** - * @var GuzzleClient + * @var Client */ protected $client; @@ -41,10 +41,10 @@ class Api implements OptionsAwareInterface, DebugAwareInterface * Api constructor. * * @param AuthAdapterInterface $authenticationAdapter - * @param GuzzleClient $client + * @param Client $client * @param array $options */ - public function __construct(AuthAdapterInterface $authenticationAdapter, GuzzleClient $client, array $options = []) + public function __construct(AuthAdapterInterface $authenticationAdapter, Client $client, array $options = []) { $this->setAuthAdapter($authenticationAdapter) ->setClient($client) @@ -53,20 +53,20 @@ public function __construct(AuthAdapterInterface $authenticationAdapter, GuzzleC } /** - * @param GuzzleClient $client + * @param Client $client * * @return Api */ - protected function setClient(GuzzleClient $client): self + protected function setClient(Client $client): self { $this->client = $client; return $this; } /** - * @return GuzzleClient + * @return Client */ - public function getClient(): GuzzleClient + public function getClient(): Client { return $this->client; } diff --git a/src/Api/Factory.php b/src/Api/Factory.php index 1beac0f..800d3ad 100644 --- a/src/Api/Factory.php +++ b/src/Api/Factory.php @@ -4,8 +4,8 @@ namespace PayNL\Sdk\Api; +use GuzzleHttp\Client; use Psr\Container\ContainerInterface; -use PayNL\GuzzleHttp\Client as GuzzleClient; use PayNL\Sdk\{ AuthAdapter\AdapterInterface as AuthAdapterInterface, Config\Config, @@ -59,7 +59,7 @@ public function __invoke(ContainerInterface $container, string $requestedName, a $version = $options->get('api')->get('version'); $pathVersion = empty($version) ? '' : '/v' . $version; - $guzzleClient = new GuzzleClient([ + $guzzleClient = new Client([ 'base_uri' => $filteredApiUrl . "{$pathVersion}/", ]); diff --git a/src/Request/AbstractRequest.php b/src/Request/AbstractRequest.php index 1c6267b..983c769 100644 --- a/src/Request/AbstractRequest.php +++ b/src/Request/AbstractRequest.php @@ -4,12 +4,6 @@ namespace PayNL\Sdk\Request; -use PayNL\GuzzleHttp\{ - Client, - Psr7\Request, - Exception\RequestException, - Exception\GuzzleException -}; use PayNL\Sdk\{ Common\DebugAwareInterface, Common\DebugAwareTrait, @@ -28,6 +22,9 @@ Validator\ValidatorManagerAwareInterface, Validator\ValidatorManagerAwareTrait }; +use GuzzleHttp\Client; +use GuzzleHttp\Exception\GuzzleException; +use GuzzleHttp\Exception\RequestException; use PayNL\Sdk\Packages\Symfony\Serializer\Encoder\{ JsonEncoder, XmlEncoder @@ -488,7 +485,7 @@ public function execute(Response $response): void $requestBody = $this->getBody(); # Create a Guzzle PSR 7 Request - $guzzleRequest = new Request($this->getMethod(), $uri, $this->getHeaders(), $requestBody); + $guzzleRequest = new \GuzzleHttp\Psr7\Request($this->getMethod(), $uri, $this->getHeaders(), $requestBody); $curlRequest = 'curl -X ' . $this->getMethod() . ' ' . $guzzleClient->getConfig('base_uri') . $uri; foreach ($this->getHeaders() as $headerfield => $headervalue) { diff --git a/src/Request/RequestInterface.php b/src/Request/RequestInterface.php index d23d904..4783578 100644 --- a/src/Request/RequestInterface.php +++ b/src/Request/RequestInterface.php @@ -4,9 +4,9 @@ namespace PayNL\Sdk\Request; +use GuzzleHttp\Client; use PayNL\Sdk\Common\FormatAwareInterface; use PayNL\Sdk\Response\Response; -use PayNL\GuzzleHttp\Client; /** * Interface RequestInterface From 638472819258c6aff7cd32ec9eb515bb6276c9a0 Mon Sep 17 00:00:00 2001 From: Rik Alexander Girbes Date: Mon, 9 Dec 2024 13:04:51 +0100 Subject: [PATCH 09/46] autoloader update without build dir --- composer.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 2724e93..2d4aaa8 100644 --- a/composer.json +++ b/composer.json @@ -36,10 +36,7 @@ }, "files": [ "./src/Resources/functions/text.php", - "./src/Resources/functions/vat.php", - "./build/guzzle/src/functions_include.php", - "./build/promises/src/functions_include.php", - "./build/psr7/src/functions_include.php" + "./src/Resources/functions/vat.php" ] }, "minimum-stability": "dev", From 7e51c581930b1c06a8a4b918db937367dedf96b3 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 23 Jan 2025 12:31:46 +0100 Subject: [PATCH 10/46] Updates --- README.md | 5 ----- composer.json | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index a948def..110979f 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,10 @@ Use this SDK to implement Pay. into your PHP integration. JSON extension installed CURL extension installed -#### Installation - If requirements are met, go ahead with the [installation and set-up](https://github.com/paynl/php-sdk/wiki/Install) of the SDK! -#### Usage To get you started, you should check these [Samples](https://github.com/paynl/SDK-PHP/blob/main/samples). -#### Documentation - For more detailed information, have a look at the [Wiki](https://github.com/paynl/php-sdk/wiki/) page. diff --git a/composer.json b/composer.json index 2d4aaa8..aa90a6a 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "version": "0.1.0", "type": "library", "require": { - "php": "^8.3", + "php": "^8.2", "ext-curl": "*", "ext-json": "*", "psr/container": "^2", From 5a3304901592e82ddd27ead861353c886c3687c9 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 23 Jan 2025 12:43:58 +0100 Subject: [PATCH 11/46] Updates --- README.md | 17 ++++++++++------- composer.json | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 110979f..100207f 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,23 @@ -
- Pay NL SDK -

PHP SDK

-
+

PHP SDK

+ Use this SDK to implement Pay. into your PHP integration. +
#### Requirements -> PHP 8.3+ -JSON extension installed -CURL extension installed +> PHP 8.2+ +> JSON extension installed +> CURL extension installed + +
If requirements are met, go ahead with the [installation and set-up](https://github.com/paynl/php-sdk/wiki/Install) of the SDK! +
To get you started, you should check these [Samples](https://github.com/paynl/SDK-PHP/blob/main/samples). +
For more detailed information, have a look at the [Wiki](https://github.com/paynl/php-sdk/wiki/) page. diff --git a/composer.json b/composer.json index aa90a6a..0788098 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": "^8.2", "ext-curl": "*", "ext-json": "*", - "psr/container": "^2", + "psr/container": "<2", "psr/http-message": "^2" }, "license": "MIT", From 34cb61d912caa92d09f95ebe0c7882eb18f95f29 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 23 Jan 2025 12:46:47 +0100 Subject: [PATCH 12/46] Updates --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0788098..548f40f 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "ext-curl": "*", "ext-json": "*", "psr/container": "<2", - "psr/http-message": "^2" + "psr/http-message": "<2" }, "license": "MIT", "support": { From 3898a5df9b1eed87eef99c96e0f7c649a7dbd4aa Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 23 Jan 2025 12:48:31 +0100 Subject: [PATCH 13/46] Updates --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 548f40f..203eb93 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "paynl/php-sdk", "description": "Software Development Kit for implementing Pay.'s API version 3", - "version": "0.1.0", + "version": "0.2.0", "type": "library", "require": { "php": "^8.2", From 24f1641f009e2ffe007a09c572d7c98599cb010c Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 23 Jan 2025 13:38:37 +0100 Subject: [PATCH 14/46] Updates --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 203eb93..e59e88d 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,8 @@ "php": "^8.2", "ext-curl": "*", "ext-json": "*", - "psr/container": "<2", - "psr/http-message": "<2" + "psr/container": "^2 || ^1", + "psr/http-message": "^2 || ^1" }, "license": "MIT", "support": { From 8827b784a1188132ee9706d6558e33529570872b Mon Sep 17 00:00:00 2001 From: woutse Date: Sat, 25 Jan 2025 11:30:10 +0100 Subject: [PATCH 15/46] Updates --- src/Api/Factory.php | 8 ++++---- src/Request/AbstractRequest.php | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Api/Factory.php b/src/Api/Factory.php index 800d3ad..052650c 100644 --- a/src/Api/Factory.php +++ b/src/Api/Factory.php @@ -23,10 +23,10 @@ class Factory implements FactoryInterface { /** - * @inheritDoc - * - * @throws ServiceNotFoundException - * @throws InvalidArgumentException + * @param ContainerInterface $container + * @param string $requestedName + * @param array|null $options + * @return Api|Service */ public function __invoke(ContainerInterface $container, string $requestedName, array $options = null) { diff --git a/src/Request/AbstractRequest.php b/src/Request/AbstractRequest.php index 983c769..9bcedbd 100644 --- a/src/Request/AbstractRequest.php +++ b/src/Request/AbstractRequest.php @@ -1,4 +1,6 @@ -setOptions($options); - if (true === $this->hasOption('format') - && true === is_string($this->getOption('format')) - ) { + if (true === $this->hasOption('format') && true === is_string($this->getOption('format'))) { $this->setFormat($this->getOption('format')); } @@ -151,7 +151,7 @@ public function getParam($name) } /** - * @param string|int $name + * @param string|integer $name * * @return bool */ @@ -498,7 +498,7 @@ public function execute(Response $response): void $this->dumpPreString(rtrim((string)$guzzleClient->getConfig('base_uri'), '/') . '/' . $guzzleRequest->getUri(), 'Requested URL'); $this->dumpPreString(implode(PHP_EOL, array_map(static function ($item, $key) { return "{$key}: {$item}"; - }, $this->getHeaders(), array_keys($this->getHeaders()))) , 'Headers'); + }, $this->getHeaders(), array_keys($this->getHeaders()))), 'Headers'); $guzzleResponse = $guzzleClient->send($guzzleRequest); @@ -544,7 +544,7 @@ public function execute(Response $response): void /** * @param string $responseFormat - * @param int $statusCode + * @param integer $statusCode * @param string $rawBody * * @return string From 83e1e756616f33c3f3c798d09807df84e7afb5ac Mon Sep 17 00:00:00 2001 From: woutse Date: Sat, 25 Jan 2025 11:40:39 +0100 Subject: [PATCH 16/46] Updates --- src/Request/AbstractRequest.php | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/Request/AbstractRequest.php b/src/Request/AbstractRequest.php index 9bcedbd..97033b3 100644 --- a/src/Request/AbstractRequest.php +++ b/src/Request/AbstractRequest.php @@ -111,9 +111,7 @@ public function __construct(array $options = []) $this->setFormat($this->getOption('format')); } - if (true === $this->hasOption('headers') - && true === is_array($this->getOption('headers')) - ) { + if (true === $this->hasOption('headers') && true === is_array($this->getOption('headers'))) { $this->setHeaders($this->getOption('headers')); } @@ -138,7 +136,7 @@ public function getParams(): array } /** - * @param string|int $name + * @param string|integer $name * * @return mixed|null */ @@ -153,7 +151,7 @@ public function getParam($name) /** * @param string|integer $name * - * @return bool + * @return boolean */ public function hasParam($name): bool { @@ -188,7 +186,7 @@ public function setParams(array $params): self $optionalParams = []; foreach ($this->getOptionalParams() as $paramName => $paramDefinition) { # If optional paramater is provided... - if(isset($params[$paramName])) { + if (isset($params[$paramName])) { if (true === is_string($paramDefinition) && '' !== $paramDefinition && 1 !== preg_match("/^{$paramDefinition}$/", $this->getParam($paramName))) { throw new InvalidArgumentException(sprintf('Optional param %s is not valid. It must match "%s"', $paramName, $paramDefinition)); } @@ -204,7 +202,7 @@ public function setParams(array $params): self } /** - * @inheritDoc + * @return string */ public function getUri(): string { @@ -223,7 +221,7 @@ public function setUri(string $uri): self } /** - * @inheritDoc + * @return string */ public function getMethod(): string { @@ -346,16 +344,15 @@ public function getBody(): string * * @return AbstractRequest */ - public function setBody($body): self + public function setBody(mixed $body): self { $this->body = $body; return $this; } /** - * @inheritDoc - * - * @return AbstractRequest + * @param Client $client + * @return $this */ public function applyClient(Client $client): self { @@ -433,7 +430,7 @@ public function addFilter(FilterInterface $filter): self * * @return string */ - private function encodeBody($body): string + private function encodeBody(mixed $body): string { $encoder = new JsonEncoder(); $contentTypeHeader = 'application/json'; @@ -616,7 +613,7 @@ protected function flattenErrors(array $errors, string $context = ''): array * * @return void */ - protected function validateBody($body): void + protected function validateBody(mixed $body): void { if (true === is_string($body)) { return; From b6822df991ad83ddadef59e7366f24531d813245 Mon Sep 17 00:00:00 2001 From: Wouter Jonker Date: Mon, 27 Jan 2025 11:57:55 +0100 Subject: [PATCH 17/46] Update composer.json --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e59e88d..6f94f63 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "ext-curl": "*", "ext-json": "*", "psr/container": "^2 || ^1", - "psr/http-message": "^2 || ^1" + "psr/http-message": "^2 || ^1", + "guzzlehttp/guzzle": "^7" }, "license": "MIT", "support": { @@ -21,8 +22,7 @@ "plugins" ], "require-dev": { - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^7", + "ext-simplexml": "*", "phpmd/phpmd": "^2", "phpstan/phpstan": "^2", "phpunit/phpunit": "^11", From 15eeab2421c776644567c8e20b7644a728ea6199 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 27 Jan 2025 12:22:38 +0100 Subject: [PATCH 18/46] Updated composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e59e88d..f41907c 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "ext-curl": "*", "ext-json": "*", "psr/container": "^2 || ^1", - "psr/http-message": "^2 || ^1" + "psr/http-message": "^2 || ^1", + "guzzlehttp/guzzle": "^7" }, "license": "MIT", "support": { @@ -22,7 +23,6 @@ ], "require-dev": { "ext-simplexml": "*", - "guzzlehttp/guzzle": "^7", "phpmd/phpmd": "^2", "phpstan/phpstan": "^2", "phpunit/phpunit": "^11", From e2194b14c64e51c4e62b0edae06fd538aa368ad7 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 27 Jan 2025 16:59:09 +0100 Subject: [PATCH 19/46] Updates for unit tests --- composer.json | 5 + src/Config/Config.php | 1042 +++++++++----------------- src/Request/RequestData.php | 20 +- tests/TerminalsBrowseRequestTest.php | 41 + 4 files changed, 399 insertions(+), 709 deletions(-) create mode 100644 tests/TerminalsBrowseRequestTest.php diff --git a/composer.json b/composer.json index f41907c..ad7f6d3 100644 --- a/composer.json +++ b/composer.json @@ -39,6 +39,11 @@ "./src/Resources/functions/vat.php" ] }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, "minimum-stability": "dev", "prefer-stable": true, "repositories": [ diff --git a/src/Config/Config.php b/src/Config/Config.php index a334f0f..c2270ff 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -8,779 +8,405 @@ use Iterator; use ArrayAccess; -if (PHP_VERSION_ID >= 80000) { - /** - * Class Config - * - * @package PayNL\Sdk - * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - */ - class Config implements Countable, Iterator, ArrayAccess - { - const TGU1 = 'https://connect.pay.nl'; - const TGU2 = 'https://connect.payments.nl'; - const TGU3 = 'https://connect.achterelkebetaling.nl'; - - protected array $data = []; - private static Config $configObject; - - /** - * Config constructor. - * - * @param array $data - */ - public function __construct(array $data = []) - { - foreach ($data as $key => $value) { - if (true === is_array($value)) { - $value = new self($value); - } - $this->data[$key] = $value; - } - } - - /** - * @return void - */ - public function __clone() - { - $data = []; - - foreach ($this->data as $key => $value) { - if ($value instanceof self) { - $value = clone $value; - } - $data[$key] = $value; - } - $this->data = $data; - } +/** + * Class Config + * + * @package PayNL\Sdk + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) + */ +class Config implements Countable, Iterator, ArrayAccess +{ + const TGU1 = 'https://connect.pay.nl'; + const TGU2 = 'https://connect.payments.nl'; + const TGU3 = 'https://connect.achterelkebetaling.nl'; + + protected array $data = []; + private static Config $configObject; - /** - * @param $key - * @param null $default - */ - public function get($key, $default = null) - { - return $this->data[$key] ?? $default; - } - - /** - * @param string|int $key - */ - public function __get($key) - { - return $this->get($key); - } - - /** - * @param string|int $key - * @param $value - * - * @return void - */ - public function set($key, $value): void - { + /** + * Config constructor. + * + * @param array $data + */ + public function __construct(array $data = []) + { + foreach ($data as $key => $value) { if (true === is_array($value)) { $value = new self($value); } - $this->data[$key] = $value; } + } - /** - * @param string|int $key - * @param $value - * - * @return void - */ - public function __set($key, $value): void - { - $this->set($key, $value); - } + /** + * @return void + */ + public function __clone() + { + $data = []; - /** - * @param string|int $key - * - * @return void - */ - public function remove($key): void - { - if (true === $this->has($key)) { - unset($this->data[$key]); + foreach ($this->data as $key => $value) { + if ($value instanceof self) { + $value = clone $value; } + $data[$key] = $value; } - /** - * @param string|int $key - * - * @return void - */ - public function __unset($key): void - { - $this->remove($key); - } - - /** - * @param string|int $key - * - * @return bool - */ - public function has($key): bool - { - return isset($this->data[$key]); - } - - /** - * @param string|int $key - * - * @return bool - */ - public function __isset($key): bool - { - return $this->has($key); - } - - /** - * @return array - */ - public function toArray(): array - { - $array = []; - $data = $this->data; - - foreach ($data as $key => $value) { - if ($value instanceof self) { - $value = $value->toArray(); - } - $array[$key] = $value; - } - - return $array; - } - - /** - * @inheritDoc - */ - public function current(): mixed - { - return current($this->data); - } + $this->data = $data; + } + /** + * @param $key + * @param null $default + */ + public function get($key, $default = null) + { + return $this->data[$key] ?? $default; + } - /** - * @inheritDoc - * - * @return void - */ - public function next(): void - { - next($this->data); - } + /** + * @param string|int $key + */ + public function __get($key) + { + return $this->get($key); + } - /** - * @inheritDoc - * - * @return - */ - public function key(): mixed - { - return key($this->data); + /** + * @param string|int $key + * @param $value + * + * @return void + */ + public function set($key, $value): void + { + if (true === is_array($value)) { + $value = new self($value); } - /** - * @inheritDoc - * - * @return bool - */ - public function valid(): bool - { - return null !== $this->key(); - } + $this->data[$key] = $value; + } - /** - * @inheritDoc - * - * @return void - */ - public function rewind(): void - { - reset($this->data); - } + /** + * @param string|int $key + * @param $value + * + * @return void + */ + public function __set($key, $value): void + { + $this->set($key, $value); + } - /** - * @inheritDoc - * - * @return bool - */ - public function offsetExists($offset): bool - { - return $this->has($offset); + /** + * @param string|int $key + * + * @return void + */ + public function remove($key): void + { + if (true === $this->has($key)) { + unset($this->data[$key]); } + } - /** - * @inheritDoc - * - * @return - */ - public function offsetGet($offset): mixed - { - return $this->get($offset); - } + /** + * @param string|int $key + * + * @return void + */ + public function __unset($key): void + { + $this->remove($key); + } - /** - * @inheritDoc - * - * @return void - */ - public function offsetSet($offset, $value): void - { - $this->set($offset, $value); - } + /** + * @param string|int $key + * + * @return bool + */ + public function has($key): bool + { + return isset($this->data[$key]); + } - /** - * @inheritDoc - * - * @return void - */ - public function offsetUnset($offset): void - { - $this->remove($offset); - } + /** + * @param string|int $key + * + * @return bool + */ + public function __isset($key): bool + { + return $this->has($key); + } - /** - * @inheritDoc - */ - public function count(): int - { - return count($this->data); - } + /** + * @return array + */ + public function toArray(): array + { + $array = []; + $data = $this->data; - /** - * Merge the current config object with the given one - * - * @param Config $mergeConfig - * - * @return Config - */ - public function merge(Config $mergeConfig): self - { - foreach ($mergeConfig as $key => $value) { - $currentValue = $this->get($key); - if ($value instanceof self && $currentValue instanceof self) { - $value = $currentValue->merge($value); - } - if (is_array($value)) { - foreach ($value as $k => $v) { - $currentValue[$k] = $v; - } - $value = $currentValue; - } - $this->set($key, $value); + foreach ($data as $key => $value) { + if ($value instanceof self) { + $value = $value->toArray(); } - return $this; + $array[$key] = $value; } - /** - * @param bool $debug - * @return $this - */ - public function setDebug(bool $debug): self - { - $this->data['debug'] = $debug; - return $this; - } + return $array; + } - /** - * @return bool - */ - public function getDebug(): bool - { - return $this->data['debug'] == 1; - } + /** + * @inheritDoc + */ + public function current(): mixed + { + return current($this->data); + } - /** - * @return string - */ - public function getFailoverUrl(): string - { - if (!empty($this->data['failoverUrl'])) { - return trim($this->data['failoverUrl']); - } - return ''; - } - /** - * Set destination(core) url - * - * @param string $url - * @return void - */ - public function setCore(string $url): self - { - if (!empty($url)) { - $this->data['api']['url'] = $url; - } - return $this; - } + /** + * @inheritDoc + * + * @return void + */ + public function next(): void + { + next($this->data); + } - /** - * Set version of API URL - * - * @param integer $version - * @return $this - */ - public function setVersion(int $version): self - { - $this->data['api']['version'] = $version; - return $this; - } + /** + * @inheritDoc + * + * @return + */ + public function key(): mixed + { + return key($this->data); + } - /** - * @return string - */ - public function getCore(): string - { - return $this->data['api']['url'] ?? ''; - } + /** + * @inheritDoc + * + * @return bool + */ + public function valid(): bool + { + return null !== $this->key(); + } - /** - * @param string $username - * @return $this - */ - public function setUsername(string $username): self - { - $this->data['authentication']['username'] = $username; - return $this; - } + /** + * @inheritDoc + * + * @return void + */ + public function rewind(): void + { + reset($this->data); + } - /** - * @return string - */ - public function getUsername() - { - return $this->data['authentication']['username'] ?? ''; - } + /** + * @inheritDoc + * + * @return bool + */ + public function offsetExists($offset): bool + { + return $this->has($offset); + } - /** - * @param string $password - * @return $this - */ - public function setPassword(string $password): self - { - $this->data['authentication']['password'] = $password; - return $this; - } + /** + * @inheritDoc + * + * @return + */ + public function offsetGet($offset): mixed + { + return $this->get($offset); + } - /** - * @return string - */ - public function getPassword() - { - return $this->data['authentication']['password'] ?? ''; - } + /** + * @inheritDoc + * + * @return void + */ + public function offsetSet($offset, $value): void + { + $this->set($offset, $value); + } - /** - * Get global config - * - * @return Config - */ - public static function getConfig() - { - if (empty(self::$configObject)) { - self::$configObject = (new Config(require __DIR__ . '/../../config/config.global.php')); - } - return self::$configObject; - } + /** + * @inheritDoc + * + * @return void + */ + public function offsetUnset($offset): void + { + $this->remove($offset); + } + /** + * @inheritDoc + */ + public function count(): int + { + return count($this->data); } -} else { + /** - * Class Config + * Merge the current config object with the given one * - * @package PayNL\Sdk + * @param Config $mergeConfig * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - */ - class Config implements Countable, Iterator, ArrayAccess - { - const TGU1 = 'https://connect.pay.nl'; - const TGU2 = 'https://connect.payments.nl'; - const TGU3 = 'https://connect.achterelkebetaling.nl'; - - protected array $data = []; - private static Config $configObject; - - /** - * Config constructor. - * - * @param array $data - */ - public function __construct(array $data = []) - { - foreach ($data as $key => $value) { - if (true === is_array($value)) { - $value = new self($value); - } - $this->data[$key] = $value; + * @return Config + */ + public function merge(Config $mergeConfig): self + { + foreach ($mergeConfig as $key => $value) { + $currentValue = $this->get($key); + if ($value instanceof self && $currentValue instanceof self) { + $value = $currentValue->merge($value); } - } - - /** - * @return void - */ - public function __clone() - { - $data = []; - - foreach ($this->data as $key => $value) { - if ($value instanceof self) { - $value = clone $value; + if (is_array($value)) { + foreach ($value as $k => $v) { + $currentValue[$k] = $v; } - $data[$key] = $value; + $value = $currentValue; } - - $this->data = $data; - } - - /** - * @param $key - * @param null $default - */ - public function get($key, $default = null) - { - return $this->data[$key] ?? $default; - } - - /** - * @param string|int $key - */ - public function __get($key) - { - return $this->get($key); - } - - /** - * @param string|int $key - * @param $value - * - * @return void - */ - public function set($key, $value): void - { - if (true === is_array($value)) { - $value = new self($value); - } - - $this->data[$key] = $value; - } - - /** - * @param string|int $key - * @param $value - * - * @return void - */ - public function __set($key, $value): void - { $this->set($key, $value); } + return $this; + } - /** - * @param string|int $key - * - * @return void - */ - public function remove($key): void - { - if (true === $this->has($key)) { - unset($this->data[$key]); - } - } - - /** - * @param string|int $key - * - * @return void - */ - public function __unset($key): void - { - $this->remove($key); - } - - /** - * @param string|int $key - * - * @return bool - */ - public function has($key): bool - { - return isset($this->data[$key]); - } - - /** - * @param string|int $key - * - * @return bool - */ - public function __isset($key): bool - { - return $this->has($key); - } - - /** - * @return array - */ - public function toArray(): array - { - $array = []; - $data = $this->data; - - foreach ($data as $key => $value) { - if ($value instanceof self) { - $value = $value->toArray(); - } - $array[$key] = $value; - } - - return $array; - } - - /** - * @inheritDoc - */ - public function current() - { - return current($this->data); - } - - - /** - * @inheritDoc - * - * @return void - */ - public function next(): void - { - next($this->data); - } - - /** - * @inheritDoc - * - * @return - */ - public function key() - { - return key($this->data); - } - - /** - * @inheritDoc - * - * @return bool - */ - public function valid(): bool - { - return null !== $this->key(); - } - - /** - * @inheritDoc - * - * @return void - */ - public function rewind(): void - { - reset($this->data); - } - - /** - * @inheritDoc - * - * @return bool - */ - public function offsetExists($offset): bool - { - return $this->has($offset); - } - - /** - * @inheritDoc - * - * @return - */ - public function offsetGet($offset) - { - return $this->get($offset); - } - - /** - * @inheritDoc - * - * @return void - */ - public function offsetSet($offset, $value): void - { - $this->set($offset, $value); - } - - /** - * @inheritDoc - * - * @return void - */ - public function offsetUnset($offset): void - { - $this->remove($offset); - } + /** + * @param bool $debug + * @return $this + */ + public function setDebug(bool $debug): self + { + $this->data['debug'] = $debug; + return $this; + } - /** - * @inheritDoc - */ - public function count(): int - { - return count($this->data); - } + /** + * @return bool + */ + public function getDebug(): bool + { + return $this->data['debug'] == 1; + } - /** - * Merge the current config object with the given one - * - * @param Config $mergeConfig - * - * @return Config - */ - public function merge(Config $mergeConfig): self - { - foreach ($mergeConfig as $key => $value) { - $currentValue = $this->get($key); - if ($value instanceof self && $currentValue instanceof self) { - $value = $currentValue->merge($value); - } - if (is_array($value)) { - foreach ($value as $k => $v) { - $currentValue[$k] = $v; - } - $value = $currentValue; - } - $this->set($key, $value); - } - return $this; + /** + * @return string + */ + public function getFailoverUrl(): string + { + if (!empty($this->data['failoverUrl'])) { + return trim($this->data['failoverUrl']); } + return ''; + } - /** - * @param bool $debug - * @return $this - */ - public function setDebug(bool $debug): self - { - $this->data['debug'] = $debug; - return $this; + /** + * Set destination(core) url + * + * @param string $url + * @return void + */ + public function setCore(string $url): self + { + if (!empty($url)) { + $this->data['api']['url'] = $url; } + return $this; + } - /** - * @return bool - */ - public function getDebug(): bool - { - return $this->data['debug'] == 1; - } + /** + * Set version of API URL + * + * @param integer $version + * @return $this + */ + public function setVersion(int $version): self + { + $this->data['api']['version'] = $version; + return $this; + } - /** - * @return string - */ - public function getFailoverUrl(): string - { - if (!empty($this->data['failoverUrl'])) { - return trim($this->data['failoverUrl']); - } - return ''; - } + /** + * @return string + */ + public function getCore(): string + { + return $this->data['api']['url'] ?? ''; + } - /** - * Set destination(core) url - * - * @param string $url - * @return void - */ - public function setCore(string $url): self - { - if (!empty($url)) { - $this->data['api']['url'] = $url; - } - return $this; - } + /** + * @param string $username + * @return $this + */ + public function setUsername(string $username): self + { + $this->data['authentication']['username'] = $username; + return $this; + } - /** - * Set version of API URL - * - * @param integer $version - * @return $this - */ - public function setVersion(int $version): self - { - $this->data['api']['version'] = $version; - return $this; + /** + * @return bool + */ + public function isEmpty() + { + if (empty($this->data['authentication']['password']) || + empty($this->data['authentication']['username'])) { + return true; } + return false; + } - /** - * @return string - */ - public function getCore(): string - { - return $this->data['api']['url'] ?? ''; - } + /** + * @return string + */ + public function getUsername() + { + return $this->data['authentication']['username'] ?? ''; + } - /** - * @param string $username - * @return $this - */ - public function setUsername(string $username): self - { - $this->data['authentication']['username'] = $username; - return $this; - } + /** + * @param string $password + * @return $this + */ + public function setPassword(string $password): self + { + $this->data['authentication']['password'] = $password; + return $this; + } - /** - * @return string - */ - public function getUsername() - { - return $this->data['authentication']['username'] ?? ''; - } + /** + * @return string + */ + public function getPassword() + { + return $this->data['authentication']['password'] ?? ''; + } - /** - * @param string $password - * @return $this - */ - public function setPassword(string $password): self - { - $this->data['authentication']['password'] = $password; - return $this; + /** + * Get global config + * + * @return Config + */ + public static function getConfig() + { + if (empty(self::$configObject)) { + self::$configObject = (new Config(require __DIR__ . '/../../config/config.global.php')); } + return self::$configObject; + } - /** - * @return string - */ - public function getPassword() - { - return $this->data['authentication']['password'] ?? ''; - } +} - /** - * Get global config - * - * @return Config - */ - public static function getConfig() - { - if (empty(self::$configObject)) { - self::$configObject = (new Config(require __DIR__ . '/../../config/config.global.php')); - } - return self::$configObject; - } - } -} diff --git a/src/Request/RequestData.php b/src/Request/RequestData.php index 83a5220..cd72147 100644 --- a/src/Request/RequestData.php +++ b/src/Request/RequestData.php @@ -18,6 +18,7 @@ */ abstract class RequestData implements RequestDataInterface { + protected $application; protected string $mapperName = ''; protected string $uri = ''; protected string $methodType = 'GET'; @@ -46,6 +47,15 @@ public function setConfig(Config $config): self return $this; } + /** + * @param $application + * @return void + */ + public function setApplication($application) + { + $this->application = $application; + } + /** * @return mixed * @throws PayException @@ -62,8 +72,16 @@ public function start() $config->setCore($config->getFailoverUrl()); } + if ($config->isEmpty()) { + throw new PayException('Please check your config', 0, 0); + } + try { - $response = (Application::init($config))->request($this)->run(); + if (empty($this->application)) { + $this->application = Application::init($config); + } + + $response = $this->application->request($this)->run(); } catch (\Throwable $e) { throw (new PayException('Could not initiate API call:' . $e->getMessage(), 0, 0)) ->setFriendlyMessage(Text::getFriendlyMessage($e->getMessage())); diff --git a/tests/TerminalsBrowseRequestTest.php b/tests/TerminalsBrowseRequestTest.php new file mode 100644 index 0000000..ad1f41b --- /dev/null +++ b/tests/TerminalsBrowseRequestTest.php @@ -0,0 +1,41 @@ +createMock(Application::class); + + $mockApplication->expects($this->never())->method('request'); + + $request = new TerminalsBrowseRequest(); + $request->setApplication($mockApplication); + + $this->expectException(PayException::class); + $this->expectExceptionMessage('Please check your config'); + + $request->start(); + } + + public function testStartWrongConfig() + { + $mockApplication = $this->createMock(Application::class); + + $request = new TerminalsBrowseRequest(); + $request->setApplication($mockApplication); + + $config = (new Config())->setUsername('test')->setPassword('test'); + + try { + $request->setConfig($config)->start(); + } catch (PayException $e) { + $this->assertEquals('Wrong credentials', $e->getFriendlyMessage()); + } + } +} \ No newline at end of file From 84b4ddce77ae03a97283259190f0396814a4121a Mon Sep 17 00:00:00 2001 From: woutse Date: Tue, 28 Jan 2025 15:52:35 +0100 Subject: [PATCH 20/46] Updates for unit tests --- tests/OrderCreateRequestTest.php | 150 +++++++++++++++++++++++++++++++ tests/OrderStatusRequestTest.php | 52 +++++++++++ 2 files changed, 202 insertions(+) create mode 100644 tests/OrderCreateRequestTest.php create mode 100644 tests/OrderStatusRequestTest.php diff --git a/tests/OrderCreateRequestTest.php b/tests/OrderCreateRequestTest.php new file mode 100644 index 0000000..aa3c8e5 --- /dev/null +++ b/tests/OrderCreateRequestTest.php @@ -0,0 +1,150 @@ +enableFastCheckout(false, true, false); + + $reflection = new \ReflectionClass($request); + $optimizeProperty = $reflection->getProperty('optimize'); + $optimizeProperty->setAccessible(true); + + $this->assertEquals([ + 'flow' => 'fastCheckout', + 'shippingAddress' => false, + 'billingAddress' => true, + 'contactDetails' => false, + ], $optimizeProperty->getValue($request)); + } + + public function testSetReturnUrl(): void + { + $request = new OrderCreateRequest(); + $request->setReturnurl('https://example.com/return'); + + $reflection = new \ReflectionClass($request); + $returnUrlProperty = $reflection->getProperty('returnUrl'); + $returnUrlProperty->setAccessible(true); + + $this->assertEquals('https://example.com/return', $returnUrlProperty->getValue($request)); + } + + public function testSetAmount(): void + { + $request = new OrderCreateRequest(); + $request->setAmount(123.45); + + $reflection = new \ReflectionClass($request); + $amountProperty = $reflection->getProperty('amount'); + $amountProperty->setAccessible(true); + + $this->assertEquals(12345, $amountProperty->getValue($request)); + } + + public function testSetReference(): void + { + $request = new OrderCreateRequest(); + + $request->setReference('Order123'); + + $reflection = new \ReflectionClass($request); + $referenceProperty = $reflection->getProperty('reference'); + $referenceProperty->setAccessible(true); + + $this->assertEquals('Order123', $referenceProperty->getValue($request)); + } + + public function testSetReferenceThrowsExceptionForInvalidReference(): void + { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Reference should consist of all letters or digits'); + + $request = new OrderCreateRequest(); + $request->setReference('Order#123'); + } + + public function testSetNotification(): void + { + $request = new OrderCreateRequest(); + + $request->setNotification('email', 'test@example.com'); + + $reflection = new \ReflectionClass($request); + $notificationTypeProperty = $reflection->getProperty('notificationType'); + $notificationTypeProperty->setAccessible(true); + $notificationRecipientProperty = $reflection->getProperty('notificationRecipient'); + $notificationRecipientProperty->setAccessible(true); + + $this->assertEquals('email', $notificationTypeProperty->getValue($request)); + $this->assertEquals('test@example.com', $notificationRecipientProperty->getValue($request)); + } + + public function testSetNotificationThrowsExceptionForInvalidEmail(): void + { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Valid email format expected as notification recipient'); + + $request = new OrderCreateRequest(); + $request->setNotification('email', 'invalid-email'); + } + + public function testSetNotificationThrowsExceptionForInvalidPushRecipient(): void + { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Recepient expected to be AD-####-#### code'); + + $request = new OrderCreateRequest(); + $request->setNotification('push', '1234'); + } + + public function testSetCustomer(): void + { + $mockCustomer = $this->createMock(Customer::class); + $request = new OrderCreateRequest(); + $request->setCustomer($mockCustomer); + + $reflection = new \ReflectionClass($request); + $customerProperty = $reflection->getProperty('customer'); + $customerProperty->setAccessible(true); + + $this->assertSame($mockCustomer, $customerProperty->getValue($request)); + } + + public function testSetOrder(): void + { + $mockOrder = $this->createMock(Order::class); + $request = new OrderCreateRequest(); + $request->setOrder($mockOrder); + + $reflection = new \ReflectionClass($request); + $orderProperty = $reflection->getProperty('order'); + $orderProperty->setAccessible(true); + + $this->assertSame($mockOrder, $orderProperty->getValue($request)); + } + + public function testSetStats(): void + { + $mockStats = $this->createMock(Stats::class); + $request = new OrderCreateRequest(); + $request->setStats($mockStats); + + $reflection = new \ReflectionClass($request); + $statsProperty = $reflection->getProperty('stats'); + $statsProperty->setAccessible(true); + + $this->assertSame($mockStats, $statsProperty->getValue($request)); + } +} diff --git a/tests/OrderStatusRequestTest.php b/tests/OrderStatusRequestTest.php new file mode 100644 index 0000000..44e4c27 --- /dev/null +++ b/tests/OrderStatusRequestTest.php @@ -0,0 +1,52 @@ +assertEquals(['transactionId' => $orderId], $request->getPathParameters()); + } + + public function testGetPathParameters(): void + { + $orderId = '67890'; + $request = new OrderStatusRequest($orderId); + + $expected = ['transactionId' => $orderId]; + $this->assertEquals($expected, $request->getPathParameters()); + } + + public function testGetBodyParametersReturnsEmptyArray(): void + { + $orderId = '67890'; + $request = new OrderStatusRequest($orderId); + + $this->assertEquals([], $request->getBodyParameters()); + } + + public function testStartReturnsPayOrder(): void + { + $orderId = '12345'; + + $mockPayOrder = $this->createMock(PayOrder::class); + + $request = $this->getMockBuilder(OrderStatusRequest::class) + ->setConstructorArgs([$orderId]) + ->onlyMethods(['start']) + ->getMock(); + + $request->method('start')->willReturn($mockPayOrder); + + $result = $request->start(); + + $this->assertInstanceOf(PayOrder::class, $result); + } +} From d988ae4d5376372d4a442f78a7e4d3b2600d9272 Mon Sep 17 00:00:00 2001 From: woutse Date: Tue, 28 Jan 2025 16:07:15 +0100 Subject: [PATCH 21/46] Updates for unit tests --- tests/OrderAbortRequestTest.php | 58 +++++++++++++++ tests/OrderApproveRequestTest.php | 58 +++++++++++++++ tests/OrderCaptureRequestTest.php | 102 ++++++++++++++++++++++++++ tests/ServiceGetConfigRequestTest.php | 70 ++++++++++++++++++ tests/TerminalsBrowseRequestTest.php | 2 +- 5 files changed, 289 insertions(+), 1 deletion(-) create mode 100644 tests/OrderAbortRequestTest.php create mode 100644 tests/OrderApproveRequestTest.php create mode 100644 tests/OrderCaptureRequestTest.php create mode 100644 tests/ServiceGetConfigRequestTest.php diff --git a/tests/OrderAbortRequestTest.php b/tests/OrderAbortRequestTest.php new file mode 100644 index 0000000..3c45fa4 --- /dev/null +++ b/tests/OrderAbortRequestTest.php @@ -0,0 +1,58 @@ +assertInstanceOf(OrderAbortRequest::class, $orderAbortRequest); + } + + public function testGetPathParameters(): void + { + $transactionId = '123456'; + $orderAbortRequest = new OrderAbortRequest($transactionId); + + $pathParameters = $orderAbortRequest->getPathParameters(); + + $this->assertIsArray($pathParameters); + $this->assertArrayHasKey('transactionId', $pathParameters); + $this->assertSame($transactionId, $pathParameters['transactionId']); + } + + public function testGetBodyParameters(): void + { + $transactionId = '123456'; + $orderAbortRequest = new OrderAbortRequest($transactionId); + + $bodyParameters = $orderAbortRequest->getBodyParameters(); + + $this->assertIsArray($bodyParameters); + $this->assertEmpty($bodyParameters); + } + + public function testStart(): void + { + $transactionId = '123456'; + $orderAbortRequest = $this->getMockBuilder(OrderAbortRequest::class) + ->setConstructorArgs([$transactionId]) + ->onlyMethods(['start']) + ->getMock(); + + $mockPayOrder = $this->createMock(PayOrder::class); + + $orderAbortRequest->method('start')->willReturn($mockPayOrder); + + $result = $orderAbortRequest->start(); + + $this->assertInstanceOf(PayOrder::class, $result); + } + +} \ No newline at end of file diff --git a/tests/OrderApproveRequestTest.php b/tests/OrderApproveRequestTest.php new file mode 100644 index 0000000..0adb60a --- /dev/null +++ b/tests/OrderApproveRequestTest.php @@ -0,0 +1,58 @@ +assertInstanceOf(OrderApproveRequest::class, $orderApproveRequest); + } + + public function testGetPathParameters(): void + { + $transactionId = '123456'; + $orderApproveRequest = new OrderApproveRequest($transactionId); + + $pathParameters = $orderApproveRequest->getPathParameters(); + + $this->assertIsArray($pathParameters); + $this->assertArrayHasKey('transactionId', $pathParameters); + $this->assertSame($transactionId, $pathParameters['transactionId']); + } + + public function testGetBodyParameters(): void + { + $transactionId = '123456'; + $orderApproveRequest = new OrderApproveRequest($transactionId); + + $bodyParameters = $orderApproveRequest->getBodyParameters(); + + $this->assertIsArray($bodyParameters); + $this->assertEmpty($bodyParameters); + } + + public function testStart(): void + { + $transactionId = '123456'; + $orderApproveRequest = $this->getMockBuilder(OrderApproveRequest::class) + ->setConstructorArgs([$transactionId]) + ->onlyMethods(['start']) + ->getMock(); + + $mockPayOrder = $this->createMock(PayOrder::class); + + $orderApproveRequest->method('start')->willReturn($mockPayOrder); + + $result = $orderApproveRequest->start(); + + $this->assertInstanceOf(PayOrder::class, $result); + } + +} \ No newline at end of file diff --git a/tests/OrderCaptureRequestTest.php b/tests/OrderCaptureRequestTest.php new file mode 100644 index 0000000..bebffce --- /dev/null +++ b/tests/OrderCaptureRequestTest.php @@ -0,0 +1,102 @@ +assertInstanceOf(OrderCaptureRequest::class, $orderCaptureRequest); + } + + public function testGetPathParameters(): void + { + $transactionId = '123456'; + $orderCaptureRequest = new OrderCaptureRequest($transactionId); + + $pathParameters = $orderCaptureRequest->getPathParameters(); + + $this->assertIsArray($pathParameters); + $this->assertArrayHasKey('transactionId', $pathParameters); + $this->assertSame($transactionId, $pathParameters['transactionId']); + } + + public function testGetBodyParametersWithAmount(): void + { + $transactionId = '123456'; + $amount = 150.75; + $orderCaptureRequest = new OrderCaptureRequest($transactionId, $amount); + + $bodyParameters = $orderCaptureRequest->getBodyParameters(); + + $this->assertIsArray($bodyParameters); + $this->assertArrayHasKey('amount', $bodyParameters); + $this->assertSame((int)round($amount * 100), $bodyParameters['amount']); + } + + public function testSetProduct(): void + { + $transactionId = '123456'; + $orderCaptureRequest = new OrderCaptureRequest($transactionId); + + $productId = 'prod-001'; + $quantity = 2; + + $orderCaptureRequest->setProduct($productId, $quantity); + + $bodyParameters = $orderCaptureRequest->getBodyParameters(); + + $this->assertIsArray($bodyParameters); + $this->assertArrayHasKey('products', $bodyParameters); + $this->assertCount(1, $bodyParameters['products']); + $this->assertSame($productId, $bodyParameters['products'][0]['id']); + $this->assertSame($quantity, $bodyParameters['products'][0]['quantity']); + } + + public function testStartWithAmount(): void + { + $transactionId = '123456'; + $amount = 200.00; + $orderCaptureRequest = $this->getMockBuilder(OrderCaptureRequest::class) + ->setConstructorArgs([$transactionId, $amount]) + ->onlyMethods(['start']) + ->getMock(); + + $mockPayOrder = $this->createMock(PayOrder::class); + + $orderCaptureRequest->method('start')->willReturn($mockPayOrder); + + $result = $orderCaptureRequest->start(); + + $this->assertInstanceOf(PayOrder::class, $result); + } + + public function testStartWithProduct(): void + { + $transactionId = '123456'; + $orderCaptureRequest = $this->getMockBuilder(OrderCaptureRequest::class) + ->setConstructorArgs([$transactionId]) + ->onlyMethods(['start']) + ->getMock(); + + $productId = 'prod-002'; + $quantity = 3; + $orderCaptureRequest->setProduct($productId, $quantity); + + $mockPayOrder = $this->createMock(PayOrder::class); + + $orderCaptureRequest->method('start')->willReturn($mockPayOrder); + + $result = $orderCaptureRequest->start(); + + $this->assertInstanceOf(PayOrder::class, $result); + } + +} \ No newline at end of file diff --git a/tests/ServiceGetConfigRequestTest.php b/tests/ServiceGetConfigRequestTest.php new file mode 100644 index 0000000..d69365b --- /dev/null +++ b/tests/ServiceGetConfigRequestTest.php @@ -0,0 +1,70 @@ +assertInstanceOf(ServiceGetConfigRequest::class, $serviceGetConfigRequest); + } + + /** + * @return void + */ + public function testGetPathParametersWithServiceId(): void + { + $serviceId = 'service123'; + $serviceGetConfigRequest = new ServiceGetConfigRequest($serviceId); + + $pathParameters = $serviceGetConfigRequest->getPathParameters(); + + $this->assertIsArray($pathParameters); + $this->assertArrayHasKey('serviceId', $pathParameters); + $this->assertSame($serviceId, $pathParameters['serviceId']); + } + + public function testGetPathParametersWithoutServiceId(): void + { + $serviceGetConfigRequest = new ServiceGetConfigRequest(); + + $pathParameters = $serviceGetConfigRequest->getPathParameters(); + + $this->assertIsArray($pathParameters); + $this->assertEmpty($pathParameters); + } + + public function testGetBodyParameters(): void + { + $serviceGetConfigRequest = new ServiceGetConfigRequest('service123'); + + $bodyParameters = $serviceGetConfigRequest->getBodyParameters(); + + $this->assertIsArray($bodyParameters); + $this->assertEmpty($bodyParameters); + } + + public function testStart(): void + { + $serviceId = 'service123'; + $serviceGetConfigRequest = $this->getMockBuilder(ServiceGetConfigRequest::class) + ->setConstructorArgs([$serviceId]) + ->onlyMethods(['start']) + ->getMock(); + + $mockResponse = $this->createMock(ServiceGetConfigResponse::class); + + $serviceGetConfigRequest->method('start')->willReturn($mockResponse); + + $result = $serviceGetConfigRequest->start(); + + $this->assertInstanceOf(ServiceGetConfigResponse::class, $result); + } + +} \ No newline at end of file diff --git a/tests/TerminalsBrowseRequestTest.php b/tests/TerminalsBrowseRequestTest.php index ad1f41b..56a49d5 100644 --- a/tests/TerminalsBrowseRequestTest.php +++ b/tests/TerminalsBrowseRequestTest.php @@ -35,7 +35,7 @@ public function testStartWrongConfig() try { $request->setConfig($config)->start(); } catch (PayException $e) { - $this->assertEquals('Wrong credentials', $e->getFriendlyMessage()); + $this->assertEquals('Something went wrong', $e->getFriendlyMessage()); } } } \ No newline at end of file From 1d84b3b8055f4fb66bb3ba7027d44e7620586448 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 30 Jan 2025 12:11:34 +0100 Subject: [PATCH 22/46] Code polish --- src/Request/RequestData.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Request/RequestData.php b/src/Request/RequestData.php index cd72147..f357fad 100644 --- a/src/Request/RequestData.php +++ b/src/Request/RequestData.php @@ -18,7 +18,7 @@ */ abstract class RequestData implements RequestDataInterface { - protected $application; + protected Application $application; protected string $mapperName = ''; protected string $uri = ''; protected string $methodType = 'GET'; @@ -48,10 +48,10 @@ public function setConfig(Config $config): self } /** - * @param $application + * @param Application $application * @return void */ - public function setApplication($application) + public function setApplication(Application $application): void { $this->application = $application; } @@ -113,14 +113,13 @@ public function start() } } - - /* - * For defining the arguments used in the requestpath + /** + * @return array */ abstract public function getPathParameters(): array; - /* - * For defining the arguments used in the body of the request + /** + * @return array */ abstract public function getBodyParameters(): array; @@ -147,4 +146,4 @@ public function getMethodName(): string { return $this->mapperName; } -} \ No newline at end of file +} From 9de819882a9ebe39cf54053d160267d210ced9f0 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 30 Jan 2025 12:11:52 +0100 Subject: [PATCH 23/46] Updated min php version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ad7f6d3..60a934f 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "version": "0.2.0", "type": "library", "require": { - "php": "^8.2", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "psr/container": "^2 || ^1", From 6f55d5f8ae905ca1dd0b4e83fd5f600d7a3dff2d Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 30 Jan 2025 12:23:03 +0100 Subject: [PATCH 24/46] Moved tests --- .../Unit}/OrderAbortRequestTest.php | 24 +++++++++++++++---- .../Unit}/OrderApproveRequestTest.php | 7 +++--- .../Unit}/OrderCaptureRequestTest.php | 7 +++--- .../Unit}/OrderCreateRequestTest.php | 10 ++++---- .../Unit}/OrderStatusRequestTest.php | 10 ++++---- .../Unit}/ServiceGetConfigRequestTest.php | 5 ++-- .../Unit}/TerminalsBrowseRequestTest.php | 4 +++- 7 files changed, 44 insertions(+), 23 deletions(-) rename {tests => Tests/Unit}/OrderAbortRequestTest.php (86%) rename {tests => Tests/Unit}/OrderApproveRequestTest.php (97%) rename {tests => Tests/Unit}/OrderCaptureRequestTest.php (98%) rename {tests => Tests/Unit}/OrderCreateRequestTest.php (98%) rename {tests => Tests/Unit}/OrderStatusRequestTest.php (93%) rename {tests => Tests/Unit}/ServiceGetConfigRequestTest.php (98%) rename {tests => Tests/Unit}/TerminalsBrowseRequestTest.php (98%) diff --git a/tests/OrderAbortRequestTest.php b/Tests/Unit/OrderAbortRequestTest.php similarity index 86% rename from tests/OrderAbortRequestTest.php rename to Tests/Unit/OrderAbortRequestTest.php index 3c45fa4..d7a42be 100644 --- a/tests/OrderAbortRequestTest.php +++ b/Tests/Unit/OrderAbortRequestTest.php @@ -1,12 +1,16 @@ assertInstanceOf(OrderAbortRequest::class, $orderAbortRequest); } + /** + * @return void + */ public function testGetPathParameters(): void { $transactionId = '123456'; @@ -27,6 +34,9 @@ public function testGetPathParameters(): void $this->assertSame($transactionId, $pathParameters['transactionId']); } + /** + * @return void + */ public function testGetBodyParameters(): void { $transactionId = '123456'; @@ -38,6 +48,11 @@ public function testGetBodyParameters(): void $this->assertEmpty($bodyParameters); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + * @throws \PayNL\Sdk\Exception\PayException + */ public function testStart(): void { $transactionId = '123456'; @@ -54,5 +69,4 @@ public function testStart(): void $this->assertInstanceOf(PayOrder::class, $result); } - -} \ No newline at end of file +} diff --git a/tests/OrderApproveRequestTest.php b/Tests/Unit/OrderApproveRequestTest.php similarity index 97% rename from tests/OrderApproveRequestTest.php rename to Tests/Unit/OrderApproveRequestTest.php index 0adb60a..510f496 100644 --- a/tests/OrderApproveRequestTest.php +++ b/Tests/Unit/OrderApproveRequestTest.php @@ -1,9 +1,10 @@ Date: Thu, 30 Jan 2025 14:02:15 +0100 Subject: [PATCH 25/46] Code polish --- Tests/Unit/OrderApproveRequestTest.php | 17 +++- Tests/Unit/OrderCaptureRequestTest.php | 25 +++++- Tests/Unit/OrderCreateRequestTest.php | 41 +++++++++ Tests/Unit/OrderStatusRequestTest.php | 16 +++- Tests/Unit/ServiceGetConfigRequestTest.php | 17 +++- Tests/Unit/TerminalsBrowseRequestTest.php | 11 ++- src/Config/Config.php | 100 ++++++++++----------- 7 files changed, 163 insertions(+), 64 deletions(-) diff --git a/Tests/Unit/OrderApproveRequestTest.php b/Tests/Unit/OrderApproveRequestTest.php index 510f496..367bd9c 100644 --- a/Tests/Unit/OrderApproveRequestTest.php +++ b/Tests/Unit/OrderApproveRequestTest.php @@ -8,6 +8,9 @@ class OrderApproveRequestTest extends TestCase { + /** + * @return void + */ public function testConstructor(): void { $transactionId = '123456'; @@ -16,6 +19,9 @@ public function testConstructor(): void $this->assertInstanceOf(OrderApproveRequest::class, $orderApproveRequest); } + /** + * @return void + */ public function testGetPathParameters(): void { $transactionId = '123456'; @@ -28,6 +34,9 @@ public function testGetPathParameters(): void $this->assertSame($transactionId, $pathParameters['transactionId']); } + /** + * @return void + */ public function testGetBodyParameters(): void { $transactionId = '123456'; @@ -39,6 +48,11 @@ public function testGetBodyParameters(): void $this->assertEmpty($bodyParameters); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + * @throws \PayNL\Sdk\Exception\PayException + */ public function testStart(): void { $transactionId = '123456'; @@ -55,5 +69,4 @@ public function testStart(): void $this->assertInstanceOf(PayOrder::class, $result); } - -} \ No newline at end of file +} diff --git a/Tests/Unit/OrderCaptureRequestTest.php b/Tests/Unit/OrderCaptureRequestTest.php index 1d63207..eed0e68 100644 --- a/Tests/Unit/OrderCaptureRequestTest.php +++ b/Tests/Unit/OrderCaptureRequestTest.php @@ -8,6 +8,9 @@ class OrderCaptureRequestTest extends TestCase { + /** + * @return void + */ public function testConstructor(): void { $transactionId = '123456'; @@ -17,6 +20,9 @@ public function testConstructor(): void $this->assertInstanceOf(OrderCaptureRequest::class, $orderCaptureRequest); } + /** + * @return void + */ public function testGetPathParameters(): void { $transactionId = '123456'; @@ -29,6 +35,9 @@ public function testGetPathParameters(): void $this->assertSame($transactionId, $pathParameters['transactionId']); } + /** + * @return void + */ public function testGetBodyParametersWithAmount(): void { $transactionId = '123456'; @@ -42,6 +51,9 @@ public function testGetBodyParametersWithAmount(): void $this->assertSame((int)round($amount * 100), $bodyParameters['amount']); } + /** + * @return void + */ public function testSetProduct(): void { $transactionId = '123456'; @@ -61,6 +73,11 @@ public function testSetProduct(): void $this->assertSame($quantity, $bodyParameters['products'][0]['quantity']); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + * @throws \PayNL\Sdk\Exception\PayException + */ public function testStartWithAmount(): void { $transactionId = '123456'; @@ -79,6 +96,11 @@ public function testStartWithAmount(): void $this->assertInstanceOf(PayOrder::class, $result); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + * @throws \PayNL\Sdk\Exception\PayException + */ public function testStartWithProduct(): void { $transactionId = '123456'; @@ -99,5 +121,4 @@ public function testStartWithProduct(): void $this->assertInstanceOf(PayOrder::class, $result); } - -} \ No newline at end of file +} diff --git a/Tests/Unit/OrderCreateRequestTest.php b/Tests/Unit/OrderCreateRequestTest.php index c796767..3c0746f 100644 --- a/Tests/Unit/OrderCreateRequestTest.php +++ b/Tests/Unit/OrderCreateRequestTest.php @@ -12,6 +12,9 @@ class OrderCreateRequestTest extends TestCase { + /** + * @return void + */ public function testEnableFastCheckout(): void { $request = new OrderCreateRequest(); @@ -29,6 +32,9 @@ public function testEnableFastCheckout(): void ], $optimizeProperty->getValue($request)); } + /** + * @return void + */ public function testSetReturnUrl(): void { $request = new OrderCreateRequest(); @@ -41,6 +47,9 @@ public function testSetReturnUrl(): void $this->assertEquals('https://example.com/return', $returnUrlProperty->getValue($request)); } + /** + * @return void + */ public function testSetAmount(): void { $request = new OrderCreateRequest(); @@ -53,6 +62,10 @@ public function testSetAmount(): void $this->assertEquals(12345, $amountProperty->getValue($request)); } + /** + * @return void + * @throws \Exception + */ public function testSetReference(): void { $request = new OrderCreateRequest(); @@ -66,6 +79,10 @@ public function testSetReference(): void $this->assertEquals('Order123', $referenceProperty->getValue($request)); } + /** + * @return void + * @throws \Exception + */ public function testSetReferenceThrowsExceptionForInvalidReference(): void { $this->expectException(\Exception::class); @@ -75,6 +92,10 @@ public function testSetReferenceThrowsExceptionForInvalidReference(): void $request->setReference('Order#123'); } + /** + * @return void + * @throws \Exception + */ public function testSetNotification(): void { $request = new OrderCreateRequest(); @@ -91,6 +112,10 @@ public function testSetNotification(): void $this->assertEquals('test@example.com', $notificationRecipientProperty->getValue($request)); } + /** + * @return void + * @throws \Exception + */ public function testSetNotificationThrowsExceptionForInvalidEmail(): void { $this->expectException(\Exception::class); @@ -100,6 +125,10 @@ public function testSetNotificationThrowsExceptionForInvalidEmail(): void $request->setNotification('email', 'invalid-email'); } + /** + * @return void + * @throws \Exception + */ public function testSetNotificationThrowsExceptionForInvalidPushRecipient(): void { $this->expectException(\Exception::class); @@ -109,6 +138,10 @@ public function testSetNotificationThrowsExceptionForInvalidPushRecipient(): voi $request->setNotification('push', '1234'); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + */ public function testSetCustomer(): void { $mockCustomer = $this->createMock(Customer::class); @@ -122,6 +155,10 @@ public function testSetCustomer(): void $this->assertSame($mockCustomer, $customerProperty->getValue($request)); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + */ public function testSetOrder(): void { $mockOrder = $this->createMock(Order::class); @@ -135,6 +172,10 @@ public function testSetOrder(): void $this->assertSame($mockOrder, $orderProperty->getValue($request)); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + */ public function testSetStats(): void { $mockStats = $this->createMock(Stats::class); diff --git a/Tests/Unit/OrderStatusRequestTest.php b/Tests/Unit/OrderStatusRequestTest.php index 2e35100..a46acaf 100644 --- a/Tests/Unit/OrderStatusRequestTest.php +++ b/Tests/Unit/OrderStatusRequestTest.php @@ -6,10 +6,11 @@ use PayNL\Sdk\Model\Request\OrderStatusRequest; use PHPUnit\Framework\TestCase; -; - class OrderStatusRequestTest extends TestCase { + /** + * @return void + */ public function testConstructorInitializesCorrectly(): void { $orderId = '12345'; @@ -17,6 +18,9 @@ public function testConstructorInitializesCorrectly(): void $this->assertEquals(['transactionId' => $orderId], $request->getPathParameters()); } + /** + * @return void + */ public function testGetPathParameters(): void { $orderId = '67890'; @@ -26,6 +30,9 @@ public function testGetPathParameters(): void $this->assertEquals($expected, $request->getPathParameters()); } + /** + * @return void + */ public function testGetBodyParametersReturnsEmptyArray(): void { $orderId = '67890'; @@ -34,6 +41,11 @@ public function testGetBodyParametersReturnsEmptyArray(): void $this->assertEquals([], $request->getBodyParameters()); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + * @throws \PayNL\Sdk\Exception\PayException + */ public function testStartReturnsPayOrder(): void { $orderId = '12345'; diff --git a/Tests/Unit/ServiceGetConfigRequestTest.php b/Tests/Unit/ServiceGetConfigRequestTest.php index dfa9e38..bb9ebca 100644 --- a/Tests/Unit/ServiceGetConfigRequestTest.php +++ b/Tests/Unit/ServiceGetConfigRequestTest.php @@ -8,6 +8,9 @@ class ServiceGetConfigRequestTest extends TestCase { + /** + * @return void + */ public function testConstructor(): void { $serviceId = 'service123'; @@ -31,6 +34,9 @@ public function testGetPathParametersWithServiceId(): void $this->assertSame($serviceId, $pathParameters['serviceId']); } + /** + * @return void + */ public function testGetPathParametersWithoutServiceId(): void { $serviceGetConfigRequest = new ServiceGetConfigRequest(); @@ -41,6 +47,9 @@ public function testGetPathParametersWithoutServiceId(): void $this->assertEmpty($pathParameters); } + /** + * @return void + */ public function testGetBodyParameters(): void { $serviceGetConfigRequest = new ServiceGetConfigRequest('service123'); @@ -51,6 +60,11 @@ public function testGetBodyParameters(): void $this->assertEmpty($bodyParameters); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + * @throws \PayNL\Sdk\Exception\PayException + */ public function testStart(): void { $serviceId = 'service123'; @@ -67,5 +81,4 @@ public function testStart(): void $this->assertInstanceOf(ServiceGetConfigResponse::class, $result); } - -} \ No newline at end of file +} diff --git a/Tests/Unit/TerminalsBrowseRequestTest.php b/Tests/Unit/TerminalsBrowseRequestTest.php index d03e12b..14b1004 100644 --- a/Tests/Unit/TerminalsBrowseRequestTest.php +++ b/Tests/Unit/TerminalsBrowseRequestTest.php @@ -10,6 +10,11 @@ class TerminalsBrowseRequestTest extends TestCase { + /** + * @return void + * @throws PayException + * @throws \PHPUnit\Framework\MockObject\Exception + */ public function testStartThrowsExceptionWithoutConfig() { $mockApplication = $this->createMock(Application::class); @@ -25,6 +30,10 @@ public function testStartThrowsExceptionWithoutConfig() $request->start(); } + /** + * @return void + * @throws \PHPUnit\Framework\MockObject\Exception + */ public function testStartWrongConfig() { $mockApplication = $this->createMock(Application::class); @@ -40,4 +49,4 @@ public function testStartWrongConfig() $this->assertEquals('Something went wrong', $e->getFriendlyMessage()); } } -} \ No newline at end of file +} diff --git a/src/Config/Config.php b/src/Config/Config.php index c2270ff..fef78fc 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -8,7 +8,6 @@ use Iterator; use ArrayAccess; - /** * Class Config * @@ -18,9 +17,9 @@ */ class Config implements Countable, Iterator, ArrayAccess { - const TGU1 = 'https://connect.pay.nl'; - const TGU2 = 'https://connect.payments.nl'; - const TGU3 = 'https://connect.achterelkebetaling.nl'; + protected const TGU1 = 'https://connect.pay.nl'; + protected const TGU2 = 'https://connect.payments.nl'; + protected const TGU3 = 'https://connect.achterelkebetaling.nl'; protected array $data = []; private static Config $configObject; @@ -58,29 +57,30 @@ public function __clone() } /** - * @param $key - * @param null $default + * @param mixed $key + * @param mixed $default + * @return mixed|null */ - public function get($key, $default = null) + public function get(mixed $key, mixed $default = null) { return $this->data[$key] ?? $default; } /** - * @param string|int $key + * @param string|integer $key + * @return mixed|null */ - public function __get($key) + public function __get($key) // phpcs:ignore { return $this->get($key); } /** - * @param string|int $key - * @param $value - * + * @param mixed $key + * @param mixed $value * @return void */ - public function set($key, $value): void + public function set(mixed $key, mixed $value): void { if (true === is_array($value)) { $value = new self($value); @@ -90,18 +90,17 @@ public function set($key, $value): void } /** - * @param string|int $key - * @param $value - * + * @param mixed $key + * @param mixed $value * @return void */ - public function __set($key, $value): void + public function __set($key, $value): void // phpcs:ignore { $this->set($key, $value); } /** - * @param string|int $key + * @param string|integer $key * * @return void */ @@ -113,7 +112,7 @@ public function remove($key): void } /** - * @param string|int $key + * @param string|integer $key * * @return void */ @@ -123,9 +122,9 @@ public function __unset($key): void } /** - * @param string|int $key + * @param string|integer $key * - * @return bool + * @return boolean */ public function has($key): bool { @@ -133,9 +132,9 @@ public function has($key): bool } /** - * @param string|int $key + * @param string|integer $key * - * @return bool + * @return boolean */ public function __isset($key): bool { @@ -161,7 +160,7 @@ public function toArray(): array } /** - * @inheritDoc + * @return mixed */ public function current(): mixed { @@ -180,9 +179,7 @@ public function next(): void } /** - * @inheritDoc - * - * @return + * @return mixed */ public function key(): mixed { @@ -191,8 +188,7 @@ public function key(): mixed /** * @inheritDoc - * - * @return bool + * @return boolean */ public function valid(): bool { @@ -210,47 +206,44 @@ public function rewind(): void } /** - * @inheritDoc - * - * @return bool + * @param mixed $offset + * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists($offset): bool // phpcs:ignore { return $this->has($offset); } /** - * @inheritDoc - * - * @return + * @param mixed $offset + * @return mixed */ - public function offsetGet($offset): mixed + public function offsetGet(mixed $offset): mixed { return $this->get($offset); } /** - * @inheritDoc - * + * @param mixed $offset + * @param mixed $value * @return void */ - public function offsetSet($offset, $value): void + public function offsetSet($offset, $value): void // phpcs:ignore { $this->set($offset, $value); } /** - * @inheritDoc - * + * @param mixed $offset * @return void */ - public function offsetUnset($offset): void + public function offsetUnset($offset): void // phpcs:ignore { $this->remove($offset); } /** - * @inheritDoc + * @return integer */ public function count(): int { @@ -283,7 +276,7 @@ public function merge(Config $mergeConfig): self } /** - * @param bool $debug + * @param boolean $debug * @return $this */ public function setDebug(bool $debug): self @@ -293,7 +286,7 @@ public function setDebug(bool $debug): self } /** - * @return bool + * @return boolean */ public function getDebug(): bool { @@ -313,9 +306,8 @@ public function getFailoverUrl(): string /** * Set destination(core) url - * * @param string $url - * @return void + * @return $this */ public function setCore(string $url): self { @@ -356,12 +348,14 @@ public function setUsername(string $username): self } /** - * @return bool + * @return boolean */ public function isEmpty() { - if (empty($this->data['authentication']['password']) || - empty($this->data['authentication']['username'])) { + if ( + empty($this->data['authentication']['password']) || + empty($this->data['authentication']['username']) + ) { return true; } return false; @@ -405,8 +399,4 @@ public static function getConfig() } return self::$configObject; } - } - - - From 4a2f198e05b93e14834dd15229a7074490032cc5 Mon Sep 17 00:00:00 2001 From: Wouter Jonker Date: Fri, 31 Jan 2025 18:57:50 +0100 Subject: [PATCH 26/46] Update Config.php --- src/Config/Config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Config/Config.php b/src/Config/Config.php index fef78fc..7b0ae1b 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -17,9 +17,9 @@ */ class Config implements Countable, Iterator, ArrayAccess { - protected const TGU1 = 'https://connect.pay.nl'; - protected const TGU2 = 'https://connect.payments.nl'; - protected const TGU3 = 'https://connect.achterelkebetaling.nl'; + public const TGU1 = 'https://connect.pay.nl'; + public const TGU2 = 'https://connect.payments.nl'; + public const TGU3 = 'https://connect.achterelkebetaling.nl'; protected array $data = []; private static Config $configObject; From 891dc43e7a06d78c352ff2046986ca8ed1fafee8 Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 31 Jan 2025 18:59:35 +0100 Subject: [PATCH 27/46] Updates for unit tests --- src/Config/Config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Config/Config.php b/src/Config/Config.php index fef78fc..7b0ae1b 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -17,9 +17,9 @@ */ class Config implements Countable, Iterator, ArrayAccess { - protected const TGU1 = 'https://connect.pay.nl'; - protected const TGU2 = 'https://connect.payments.nl'; - protected const TGU3 = 'https://connect.achterelkebetaling.nl'; + public const TGU1 = 'https://connect.pay.nl'; + public const TGU2 = 'https://connect.payments.nl'; + public const TGU3 = 'https://connect.achterelkebetaling.nl'; protected array $data = []; private static Config $configObject; From ab1e3aa5ca715d312f128a0ecc0293f341a3c460 Mon Sep 17 00:00:00 2001 From: Wouter Jonker Date: Fri, 31 Jan 2025 19:52:13 +0100 Subject: [PATCH 28/46] Update Exchange.php --- src/Util/Exchange.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Util/Exchange.php b/src/Util/Exchange.php index cae6240..248e5d3 100644 --- a/src/Util/Exchange.php +++ b/src/Util/Exchange.php @@ -142,7 +142,7 @@ public function getPayLoad() } else { $rawBody = file_get_contents('php://input'); if (empty(trim($rawBody))) { - throw new Exception('Empty payload', 8002); + throw new Exception('Empty or incomplete payload', 8002); } $tguData = json_decode($rawBody, true, 512, 4194304); @@ -326,4 +326,4 @@ private function getRequestHeaders() return $this->headers; } -} \ No newline at end of file +} From f9e4030ad2fce4093f4bcca5b7f452ad9e64412a Mon Sep 17 00:00:00 2001 From: woutse Date: Sat, 1 Feb 2025 14:32:32 +0100 Subject: [PATCH 29/46] Updates for unit tests --- composer.json | 3 +- src/Config/Config.php | 18 ++++----- src/Model/Order.php | 10 +++++ src/Resources/functions/misc.php | 30 +++++++++++++++ src/Util/Exchange.php | 2 +- src/Util/Misc.php | 65 ++++++++++++++++++++++++++++++-- src/Util/Text.php | 32 ---------------- 7 files changed, 113 insertions(+), 47 deletions(-) create mode 100644 src/Resources/functions/misc.php diff --git a/composer.json b/composer.json index 60a934f..9e91e0b 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,8 @@ }, "files": [ "./src/Resources/functions/text.php", - "./src/Resources/functions/vat.php" + "./src/Resources/functions/vat.php", + "./src/Resources/functions/misc.php" ] }, "autoload-dev": { diff --git a/src/Config/Config.php b/src/Config/Config.php index 7b0ae1b..a718991 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -70,7 +70,7 @@ public function get(mixed $key, mixed $default = null) * @param string|integer $key * @return mixed|null */ - public function __get($key) // phpcs:ignore + public function __get(string|int $key) { return $this->get($key); } @@ -94,7 +94,7 @@ public function set(mixed $key, mixed $value): void * @param mixed $value * @return void */ - public function __set($key, $value): void // phpcs:ignore + public function __set(mixed $key, mixed $value): void { $this->set($key, $value); } @@ -104,7 +104,7 @@ public function __set($key, $value): void // phpcs:ignore * * @return void */ - public function remove($key): void + public function remove(string|int $key): void { if (true === $this->has($key)) { unset($this->data[$key]); @@ -116,7 +116,7 @@ public function remove($key): void * * @return void */ - public function __unset($key): void + public function __unset(string|int $key): void { $this->remove($key); } @@ -126,7 +126,7 @@ public function __unset($key): void * * @return boolean */ - public function has($key): bool + public function has(string|int $key): bool { return isset($this->data[$key]); } @@ -136,7 +136,7 @@ public function has($key): bool * * @return boolean */ - public function __isset($key): bool + public function __isset(string|int $key): bool { return $this->has($key); } @@ -209,7 +209,7 @@ public function rewind(): void * @param mixed $offset * @return boolean */ - public function offsetExists($offset): bool // phpcs:ignore + public function offsetExists(mixed $offset): bool { return $this->has($offset); } @@ -228,7 +228,7 @@ public function offsetGet(mixed $offset): mixed * @param mixed $value * @return void */ - public function offsetSet($offset, $value): void // phpcs:ignore + public function offsetSet(mixed $offset, mixed $value): void { $this->set($offset, $value); } @@ -237,7 +237,7 @@ public function offsetSet($offset, $value): void // phpcs:ignore * @param mixed $offset * @return void */ - public function offsetUnset($offset): void // phpcs:ignore + public function offsetUnset(mixed $offset): void { $this->remove($offset); } diff --git a/src/Model/Order.php b/src/Model/Order.php index 8bfd5ef..f89e5d7 100644 --- a/src/Model/Order.php +++ b/src/Model/Order.php @@ -150,6 +150,16 @@ public function setDeliveryAddress(Address $deliveryAddress): self return $this; } + /** + * Alias for setDeliveryAddress + * @param Address $shippingAddress + * @return $this + */ + public function setShippingAddress(Address $shippingAddress): self + { + return $this->setDeliveryAddress($shippingAddress); + } + /** * @return Address */ diff --git a/src/Resources/functions/misc.php b/src/Resources/functions/misc.php new file mode 100644 index 0000000..eec9c09 --- /dev/null +++ b/src/Resources/functions/misc.php @@ -0,0 +1,30 @@ +splitAddress($address); + } +} + +if (false === function_exists('paynl_get_ip')) { + /** + * @param string $address + * + * @return array + */ + function paynl_get_ip(): array + { + return (new Misc())->getIp(); + } +} + diff --git a/src/Util/Exchange.php b/src/Util/Exchange.php index cae6240..33bb7b9 100644 --- a/src/Util/Exchange.php +++ b/src/Util/Exchange.php @@ -145,7 +145,7 @@ public function getPayLoad() throw new Exception('Empty payload', 8002); } - $tguData = json_decode($rawBody, true, 512, 4194304); + $tguData = json_decode($rawBody, true, 512, JSON_BIGINT_AS_STRING); $exchangeType = $tguData['type'] ?? null; if ($exchangeType != 'order') { diff --git a/src/Util/Misc.php b/src/Util/Misc.php index 677cef5..7691a42 100644 --- a/src/Util/Misc.php +++ b/src/Util/Misc.php @@ -20,14 +20,14 @@ class Misc /** * @param string $file * - * @throws InvalidArgumentException when given file can not be found or read + * @return string * @throws LogicException when the class name is not the same as the terminating class file name * (PSR-4 3.3 - https://www.php-fig.org/psr/psr-4/) * * @SuppressWarnings(PHPMD.NPathComplexity) * @SuppressWarnings(PHPMD.CyclomaticComplexity) * - * @return string + * @throws InvalidArgumentException when given file can not be found or read */ public static function getClassNameByFile(string $file): string { @@ -73,9 +73,9 @@ public static function getClassNameByFile(string $file): string } if ($tokens[$counter][0] === T_CLASS) { - for ($nextCounter = $counter+1; $nextCounter < $tokenCount; $nextCounter++) { + for ($nextCounter = $counter + 1; $nextCounter < $tokenCount; $nextCounter++) { if ($tokens[$nextCounter] === '{') { - $class = $tokens[$counter+2][1]; + $class = $tokens[$counter + 2][1]; } } } @@ -107,4 +107,61 @@ public static function getClassNameByFQN(string $fqn): string $parts = explode($namespaceSeparator, $fqn); return array_pop($parts) ?? ''; } + + /** + * Get the IP of the user + * + * @return mixed + */ + public function getIp() + { + // Use $_SERVER or get the headers if we can + $headers = $_SERVER; + if (function_exists('apache_request_headers')) { + $headers = apache_request_headers(); + } + + // Get the forwarded IP if it exists + $the_ip = $_SERVER['REMOTE_ADDR']; + if (array_key_exists('X-Forwarded-For', $headers)) { + $the_ip = $headers['X-Forwarded-For']; + } elseif (array_key_exists('HTTP_X_FORWARDED_FOR', $headers)) { + $the_ip = $headers['HTTP_X_FORWARDED_FOR']; + } + $arrIp = explode(',', $the_ip); + + return filter_var(trim(trim(!empty($arrIp[0]) ? $arrIp[0] : ''), '[]'), FILTER_VALIDATE_IP); + } + + /** + * @param string $address + * + * @return array + */ + public function splitAddress(string $address): array + { + $street = $number = ''; + + $address = trim($address); + $addressParts = preg_split('/(\s+)(\d+)/', $address, 2, PREG_SPLIT_DELIM_CAPTURE); + + if (true === is_array($addressParts)) { + $street = trim(array_shift($addressParts) ?? ''); + $number = trim(implode('', $addressParts)); + } + + if (true === empty($street) || true === empty($number)) { + $addressParts = preg_split('/([A-z]{2,})/', $address, 2, PREG_SPLIT_DELIM_CAPTURE); + + if (true === is_array($addressParts)) { + $number = trim(array_shift($addressParts) ?? ''); + $street = trim(implode('', $addressParts)); + } + } + + $number = substr($number, 0, 45); + + return compact('street', 'number'); + } + } diff --git a/src/Util/Text.php b/src/Util/Text.php index ec8f836..d83c206 100644 --- a/src/Util/Text.php +++ b/src/Util/Text.php @@ -13,38 +13,6 @@ */ class Text { - - - /** - * @param string $address - * - * @return array - */ - public function splitAddress(string $address): array - { - $street = $number = ''; - - $address = trim($address); - $addressParts = preg_split('/(\s+)(\d+)/', $address, 2, PREG_SPLIT_DELIM_CAPTURE); - - if (true === is_array($addressParts)) { - $street = trim(array_shift($addressParts) ?? ''); - $number = trim(implode('', $addressParts)); - } - - if (true === empty($street) || true === empty($number)) { - $addressParts = preg_split('/([A-z]{2,})/', $address, 2, PREG_SPLIT_DELIM_CAPTURE); - - if (true === is_array($addressParts)) { - $number = trim(array_shift($addressParts) ?? ''); - $street = trim(implode('', $addressParts)); - } - } - - $number = substr($number, 0, 45); - - return compact('street', 'number'); - } /** * @param $errorMessage From 2aa691a76b39942c9f0ae0ed4f17e1f825b9a7c6 Mon Sep 17 00:00:00 2001 From: woutse Date: Sat, 1 Feb 2025 14:32:41 +0100 Subject: [PATCH 30/46] Updates for unit tests --- src/Resources/functions/text.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/Resources/functions/text.php b/src/Resources/functions/text.php index 9426642..baa3018 100644 --- a/src/Resources/functions/text.php +++ b/src/Resources/functions/text.php @@ -4,19 +4,6 @@ use PayNL\Sdk\Util\Text; -if (false === function_exists('paynl_split_address')) { - /** - * @param string $address - * - * @return array - */ - function paynl_split_address(string $address): array - { - return (new Text())->splitAddress($address); - } -} - - if (false === function_exists('dbg')) { /** * @param string $message From ff4f32d93b15eab5534590270a11fdcd67caecb1 Mon Sep 17 00:00:00 2001 From: woutse Date: Sat, 1 Feb 2025 15:26:44 +0100 Subject: [PATCH 31/46] Updates for unit tests --- src/Resources/functions/misc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Resources/functions/misc.php b/src/Resources/functions/misc.php index eec9c09..abd1249 100644 --- a/src/Resources/functions/misc.php +++ b/src/Resources/functions/misc.php @@ -18,11 +18,9 @@ function paynl_split_address(string $address): array if (false === function_exists('paynl_get_ip')) { /** - * @param string $address - * - * @return array + * @return mixed */ - function paynl_get_ip(): array + function paynl_get_ip(): mixed { return (new Misc())->getIp(); } From 5e34057eb28e4fcd30f192d33d04a3540a9d20ae Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 3 Feb 2025 11:56:09 +0100 Subject: [PATCH 32/46] Code polish --- src/Model/Order.php | 2 +- src/Resources/functions/misc.php | 1 - src/Resources/functions/text.php | 2 +- src/Util/Misc.php | 1 - src/Util/Text.php | 7 +++---- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Model/Order.php b/src/Model/Order.php index f89e5d7..3476dba 100644 --- a/src/Model/Order.php +++ b/src/Model/Order.php @@ -4,7 +4,7 @@ namespace PayNL\Sdk\Model; -use JsonSerializable, DateTime; +use JsonSerializable; use PayNL\Sdk\Common\JsonSerializeTrait; /** diff --git a/src/Resources/functions/misc.php b/src/Resources/functions/misc.php index abd1249..eb273ab 100644 --- a/src/Resources/functions/misc.php +++ b/src/Resources/functions/misc.php @@ -25,4 +25,3 @@ function paynl_get_ip(): mixed return (new Misc())->getIp(); } } - diff --git a/src/Resources/functions/text.php b/src/Resources/functions/text.php index baa3018..e3f97ec 100644 --- a/src/Resources/functions/text.php +++ b/src/Resources/functions/text.php @@ -15,4 +15,4 @@ function dbg(string $message): void displayPayDebug($message); } } -} \ No newline at end of file +} diff --git a/src/Util/Misc.php b/src/Util/Misc.php index 7691a42..6756208 100644 --- a/src/Util/Misc.php +++ b/src/Util/Misc.php @@ -163,5 +163,4 @@ public function splitAddress(string $address): array return compact('street', 'number'); } - } diff --git a/src/Util/Text.php b/src/Util/Text.php index d83c206..acba9a6 100644 --- a/src/Util/Text.php +++ b/src/Util/Text.php @@ -1,6 +1,6 @@ 'Transaction not ready for refund.', From 7c82a3c03d2f959e3ca1e56862ccbbc5740eb134 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 3 Feb 2025 12:08:13 +0100 Subject: [PATCH 33/46] Code polish --- src/Model/Method.php | 7 ++-- src/Model/Pay/PayLoad.php | 12 +++++- src/Model/Pay/PayStatus.php | 5 ++- src/Resources/functions/misc.php | 1 + src/Util/Exchange.php | 64 ++++++++++++++++++++++++++------ src/Util/ExchangeResponse.php | 36 ++++++++++++++++++ src/Util/Misc.php | 1 + 7 files changed, 108 insertions(+), 18 deletions(-) create mode 100644 src/Util/ExchangeResponse.php diff --git a/src/Model/Method.php b/src/Model/Method.php index 2c61031..9f13aaf 100644 --- a/src/Model/Method.php +++ b/src/Model/Method.php @@ -11,9 +11,10 @@ */ class Method implements ModelInterface { - const IDEAL = 10; - const PIN = 1927; - const PAYPAL = 138; + public const IDEAL = 10; + public const PIN = 1927; + public const PAYPAL = 138; + public const RETOURPIN = 2351; /** * @var int diff --git a/src/Model/Pay/PayLoad.php b/src/Model/Pay/PayLoad.php index 3cd394d..f8f55e1 100644 --- a/src/Model/Pay/PayLoad.php +++ b/src/Model/Pay/PayLoad.php @@ -64,7 +64,7 @@ public function getReference() { return $this->reference; } - + /** * @return array */ @@ -145,4 +145,12 @@ public function getPaymentProfile(): int return $this->paymentProfile; } -} \ No newline at end of file + /** + * @return array + */ + public function getCheckoutData(): array + { + return $this->checkoutData; + } + +} diff --git a/src/Model/Pay/PayStatus.php b/src/Model/Pay/PayStatus.php index ad0e91e..ace7001 100644 --- a/src/Model/Pay/PayStatus.php +++ b/src/Model/Pay/PayStatus.php @@ -28,6 +28,9 @@ class PayStatus const EVENT_PAID = 'new_ppt'; const EVENT_PENDING = 'pending'; + const EVENT_CHARGEBACK = 'chargeback'; + const EVENT_REFUND = 'retund'; + const EVENT_CAPTURE = 'capture'; /** * @param int $stateId @@ -69,4 +72,4 @@ public function get(int $stateId) } } -} \ No newline at end of file +} diff --git a/src/Resources/functions/misc.php b/src/Resources/functions/misc.php index eb273ab..abd1249 100644 --- a/src/Resources/functions/misc.php +++ b/src/Resources/functions/misc.php @@ -25,3 +25,4 @@ function paynl_get_ip(): mixed return (new Misc())->getIp(); } } + diff --git a/src/Util/Exchange.php b/src/Util/Exchange.php index 63d8545..e9b9715 100644 --- a/src/Util/Exchange.php +++ b/src/Util/Exchange.php @@ -7,6 +7,7 @@ use PayNL\Sdk\Config\Config as PayConfig; use PayNL\Sdk\Config\Config; use PayNL\Sdk\Model\Amount; +use PayNL\Sdk\Util\ExchangeResponse; use PayNL\Sdk\Model\Request\OrderStatusRequest; use PayNL\Sdk\Model\Pay\PayStatus; use PayNL\Sdk\Model\Pay\PayOrder; @@ -36,10 +37,38 @@ public function __construct(array $payload = null) /** * @return bool + * @throws PayException */ - public function eventStateChangeToPaid() + public function eventPaid($includeAuth = false) { - return $this->getAction() === PayStatus::EVENT_PAID; + return $this->getAction() === PayStatus::EVENT_PAID || ($includeAuth == true && $this->getAction() === PayStatus::AUTHORIZE); + } + + /** + * @return bool + * @throws PayException + */ + public function eventChargeback() + { + return substr($this->getAction(), 0, 10) === PayStatus::EVENT_CHARGEBACK; + } + + /** + * @return bool + * @throws PayException + */ + public function eventRefund() + { + return substr($this->getAction(), 0, 6) === PayStatus::EVENT_REFUND; + } + + /** + * @return bool + * @throws PayException + */ + public function eventCapture() + { + return $this->getAction() == PayStatus::EVENT_CAPTURE; } /** @@ -50,8 +79,10 @@ public function eventStateChangeToPaid() * @param bool $returnOutput If true, then this method returs the output string * @return false|string|void */ - public function setResponse(bool $result, string $message, $returnOutput = false) + public function setResponse(bool $result, string $message, bool $returnOutput = false) { + $message = ucfirst(strtolower($message)); + if ($this->isSignExchange() === true) { $response = json_encode(['result' => $result, 'description' => $message]); } else { @@ -66,41 +97,54 @@ public function setResponse(bool $result, string $message, $returnOutput = false } } + /** + * @param \PayNL\Sdk\Util\ExchangeResponse $e + * @param bool $returnOutput + * @return false|string|null + */ + public function setExchangeResponse(ExchangeResponse $e, bool $returnOutput = false) + { + return $this->setResponse($e->getResult(), $e->getMessage(), $returnOutput); + } + /** * @return string + * @throws PayException */ public function getAction() { try { $payload = $this->getPayload(); } catch (\Throwable $e) { - return false; + throw new PayException('Could not retrieve action: ' . $e->getMessage()); } return $payload->getAction(); } /** - * @return mixed|string + * @return string + * @throws PayException */ public function getReference() { try { $payload = $this->getPayload(); } catch (\Throwable $e) { - return false; + throw new PayException('Could not retrieve reference: ' . $e->getMessage()); } return $payload->getReference(); } /** * @return string + * @throws PayException */ public function getPayOrderId() { try { $payload = $this->getPayload(); } catch (\Throwable $e) { - return false; + throw new Exception('Could not retrieve payOrderId: ' . $e->getMessage()); } return $payload->getPayOrderId(); } @@ -146,11 +190,6 @@ public function getPayLoad() } $tguData = json_decode($rawBody, true, 512, JSON_BIGINT_AS_STRING); - - $exchangeType = $tguData['type'] ?? null; - if ($exchangeType != 'order') { - throw new Exception('Cant handle exchange type other then order', 8003); - } } if (empty($tguData['object'])) { @@ -236,6 +275,7 @@ public function process(PayConfig $config = null): PayOrder # Not a signing request... if ($payloadState === PayStatus::PENDING) { $payOrder = new PayOrder(); + $payOrder->setType($payload->getType()); $payOrder->setStatusCodeName(PayStatus::PENDING, 'PENDING'); } else { # Continue to check the order status manually diff --git a/src/Util/ExchangeResponse.php b/src/Util/ExchangeResponse.php new file mode 100644 index 0000000..8668b71 --- /dev/null +++ b/src/Util/ExchangeResponse.php @@ -0,0 +1,36 @@ +result = $result; + $this->message = $message; + } + + /** + * @return bool + */ + public function getResult(): bool + { + return $this->result; + + } + + /** + * @return string + */ + public function getMessage(): string + { + return $this->message; + } +} diff --git a/src/Util/Misc.php b/src/Util/Misc.php index 6756208..7691a42 100644 --- a/src/Util/Misc.php +++ b/src/Util/Misc.php @@ -163,4 +163,5 @@ public function splitAddress(string $address): array return compact('street', 'number'); } + } From 09edaae4b5068a292e15910348c0cdacd872e773 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 3 Feb 2025 12:11:10 +0100 Subject: [PATCH 34/46] Code polish --- src/Util/Exchange.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/Util/Exchange.php b/src/Util/Exchange.php index e9b9715..9c54cc8 100644 --- a/src/Util/Exchange.php +++ b/src/Util/Exchange.php @@ -25,7 +25,7 @@ class Exchange { private PayLoad $payload; private ?array $custom_payload; - private $headers; + private string $headers; /** * @param array|null $payload @@ -36,25 +36,26 @@ public function __construct(array $payload = null) } /** - * @return bool + * @param boolean $includeAuth If yes, treat authorize as "paid" + * @return boolean * @throws PayException */ - public function eventPaid($includeAuth = false) + public function eventPaid(bool $includeAuth = false): bool { return $this->getAction() === PayStatus::EVENT_PAID || ($includeAuth == true && $this->getAction() === PayStatus::AUTHORIZE); } /** - * @return bool + * @return boolean * @throws PayException */ - public function eventChargeback() + public function eventChargeback(): bool { return substr($this->getAction(), 0, 10) === PayStatus::EVENT_CHARGEBACK; } /** - * @return bool + * @return boolean * @throws PayException */ public function eventRefund() @@ -63,7 +64,7 @@ public function eventRefund() } /** - * @return bool + * @return boolean * @throws PayException */ public function eventCapture() @@ -74,9 +75,9 @@ public function eventCapture() /** * Set your exchange response in the end of your exchange processing * - * @param bool $result + * @param boolean $result * @param string $message - * @param bool $returnOutput If true, then this method returs the output string + * @param boolean $returnOutput If true, then this method returs the output string * @return false|string|void */ public function setResponse(bool $result, string $message, bool $returnOutput = false) @@ -99,7 +100,7 @@ public function setResponse(bool $result, string $message, bool $returnOutput = /** * @param \PayNL\Sdk\Util\ExchangeResponse $e - * @param bool $returnOutput + * @param boolean $returnOutput * @return false|string|null */ public function setExchangeResponse(ExchangeResponse $e, bool $returnOutput = false) @@ -294,7 +295,6 @@ public function process(PayConfig $config = null): PayOrder } $payOrder = $request->setConfig($config)->start(); - } catch (PayException $e) { dbg($e->getMessage()); throw new Exception('API Retrieval error: ' . $e->getFriendlyMessage()); @@ -308,7 +308,7 @@ public function process(PayConfig $config = null): PayOrder /** * @param string $username Token code * @param string $password API Token - * @return bool Returns true if the signing is successful and authorised + * @return boolean Returns true if the signing is successful and authorised */ public function checkSignExchange(string $username = '', string $password = ''): bool { @@ -346,7 +346,7 @@ public function checkSignExchange(string $username = '', string $password = ''): } /** - * @return bool + * @return boolean */ public function isSignExchange(): bool { @@ -358,12 +358,11 @@ public function isSignExchange(): bool /** * @return array|false|string */ - private function getRequestHeaders() + private function getRequestHeaders(): bool|array|string { if (empty($this->headers)) { $this->headers = array_change_key_case(getallheaders()); } return $this->headers; } - } From cf8e1bac284b3571da268992069fe5820c7bfcff Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 3 Feb 2025 12:30:55 +0100 Subject: [PATCH 35/46] Code polish --- src/Model/Method.php | 29 ++++++++++++++----------- src/Model/Pay/PayLoad.php | 9 ++++---- src/Model/Pay/PayStatus.php | 37 ++++++++++++++++---------------- src/Resources/functions/misc.php | 1 - src/Resources/functions/text.php | 4 +--- src/Util/ExchangeResponse.php | 5 ++--- src/Util/Misc.php | 1 - 7 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/Model/Method.php b/src/Model/Method.php index 9f13aaf..9c305ed 100644 --- a/src/Model/Method.php +++ b/src/Model/Method.php @@ -62,7 +62,7 @@ class Method implements ModelInterface protected $maxAmount; /** - * @return int + * @return integer */ public function getId(): int { @@ -70,7 +70,7 @@ public function getId(): int } /** - * @param int $id + * @param integer $id * @return $this */ public function setId(int $id): self @@ -80,15 +80,15 @@ public function setId(int $id): self } /** - * @param $language + * @param string|null $language * @return string */ - public function getName($language = null): string + public function getName(string $language = null): string { if (!empty($language) && isset($this->translations['name'][$language])) { return $this->translations['name'][$language]; } - return (string)$this->name; + return $this->name; } /** @@ -173,16 +173,19 @@ public function setSettings(array $settings): self return $this; } + /** + * @return boolean + */ public function hasOptions(): bool { return !empty($this->options); } /** - * @param $language + * @param string|null $language * @return string */ - public function getDescription($language = null): string + public function getDescription(string $language = null): string { if (!empty($language)) { if (isset($this->translations['description'][$language])) { @@ -204,7 +207,7 @@ public function getDescription($language = null): string /** * @param string $description - * @return void + * @return $this */ public function setDescription(string $description): self { @@ -213,7 +216,7 @@ public function setDescription(string $description): self } /** - * @return int + * @return integer */ public function getMinAmount(): int { @@ -221,7 +224,8 @@ public function getMinAmount(): int } /** - * @param int $minAmount + * @param integer $minAmount + * @return $this */ public function setMinAmount(int $minAmount): self { @@ -230,7 +234,7 @@ public function setMinAmount(int $minAmount): self } /** - * @return int + * @return integer */ public function getMaxAmount(): int { @@ -238,7 +242,8 @@ public function getMaxAmount(): int } /** - * @param int $maxAmount + * @param integer $maxAmount + * @return $this */ public function setMaxAmount(int $maxAmount): self { diff --git a/src/Model/Pay/PayLoad.php b/src/Model/Pay/PayLoad.php index f8f55e1..5de2eaf 100644 --- a/src/Model/Pay/PayLoad.php +++ b/src/Model/Pay/PayLoad.php @@ -74,7 +74,7 @@ public function getFullPayLoad(): array } /** - * @return int + * @return integer */ public function getInternalStateId(): int { @@ -100,13 +100,13 @@ public function getPayOrderId(): string /** * @return string */ - public function nce(): string + public function nce(): string { return $this->reference; } /** - * @return int + * @return integer */ public function getAmount(): int { @@ -138,7 +138,7 @@ public function getAmountAuth(): float } /** - * @return int + * @return integer */ public function getPaymentProfile(): int { @@ -152,5 +152,4 @@ public function getCheckoutData(): array { return $this->checkoutData; } - } diff --git a/src/Model/Pay/PayStatus.php b/src/Model/Pay/PayStatus.php index ace7001..45b7eeb 100644 --- a/src/Model/Pay/PayStatus.php +++ b/src/Model/Pay/PayStatus.php @@ -14,31 +14,31 @@ */ class PayStatus { - const PENDING = 20; - const PAID = 100; - const AUTHORIZE = 95; - const CANCEL = -1; - const REFUND = -81; - const VERIFY = 85; - const PARTIAL_PAYMENT = 80; - const CHARGEBACK = -71; - const PARTIAL_REFUND = -82; - const PARTLY_CAPTURED = 97; - const CONFIRMED = 75; + public const PENDING = 20; + public const PAID = 100; + public const AUTHORIZE = 95; + public const CANCEL = -1; + public const REFUND = -81; + public const VERIFY = 85; + public const PARTIAL_PAYMENT = 80; + public const CHARGEBACK = -71; + public const PARTIAL_REFUND = -82; + public const PARTLY_CAPTURED = 97; + public const CONFIRMED = 75; - const EVENT_PAID = 'new_ppt'; - const EVENT_PENDING = 'pending'; - const EVENT_CHARGEBACK = 'chargeback'; - const EVENT_REFUND = 'retund'; - const EVENT_CAPTURE = 'capture'; + public const EVENT_PAID = 'new_ppt'; + public const EVENT_PENDING = 'pending'; + public const EVENT_CHARGEBACK = 'chargeback'; + public const EVENT_REFUND = 'retund'; + public const EVENT_CAPTURE = 'capture'; /** - * @param int $stateId + * @param integer $stateId * * Source: * https://developer.pay.nl/docs/transaction-statuses#processing-statusses * - * @return int|mixed + * @return integer|mixed * @throws Exception */ public function get(int $stateId) @@ -71,5 +71,4 @@ public function get(int $stateId) } } } - } diff --git a/src/Resources/functions/misc.php b/src/Resources/functions/misc.php index abd1249..eb273ab 100644 --- a/src/Resources/functions/misc.php +++ b/src/Resources/functions/misc.php @@ -25,4 +25,3 @@ function paynl_get_ip(): mixed return (new Misc())->getIp(); } } - diff --git a/src/Resources/functions/text.php b/src/Resources/functions/text.php index e3f97ec..3f3baab 100644 --- a/src/Resources/functions/text.php +++ b/src/Resources/functions/text.php @@ -2,12 +2,10 @@ declare(strict_types=1); -use PayNL\Sdk\Util\Text; - if (false === function_exists('dbg')) { /** * @param string $message - * @return string + * @return void */ function dbg(string $message): void { diff --git a/src/Util/ExchangeResponse.php b/src/Util/ExchangeResponse.php index 8668b71..d235b4f 100644 --- a/src/Util/ExchangeResponse.php +++ b/src/Util/ExchangeResponse.php @@ -8,7 +8,7 @@ class ExchangeResponse private string $message; /** - * @param bool $result + * @param boolean $result * @param string $message */ public function __construct(bool $result, string $message) @@ -18,12 +18,11 @@ public function __construct(bool $result, string $message) } /** - * @return bool + * @return boolean */ public function getResult(): bool { return $this->result; - } /** diff --git a/src/Util/Misc.php b/src/Util/Misc.php index 7691a42..6756208 100644 --- a/src/Util/Misc.php +++ b/src/Util/Misc.php @@ -163,5 +163,4 @@ public function splitAddress(string $address): array return compact('street', 'number'); } - } From 229b1bec782a8532432ff8c278f90df059cba9b9 Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 14 Feb 2025 21:38:50 +0100 Subject: [PATCH 36/46] Code polish --- src/Config/Config.php | 10 ++++++++++ src/Model/Pay/PayOrder.php | 33 +++++++++++++++++++++------------ src/Model/Pay/PayStatus.php | 4 +++- src/Util/Exchange.php | 2 +- 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/src/Config/Config.php b/src/Config/Config.php index a718991..d9573e0 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -293,6 +293,16 @@ public function getDebug(): bool return $this->data['debug'] == 1; } + /** + * @param string $url + * @return self + */ + public function setupFailoverUrl(string $url): self + { + $this->data['failoverUrl'] = $url; + return $this; + } + /** * @return string */ diff --git a/src/Model/Pay/PayOrder.php b/src/Model/Pay/PayOrder.php index 0f5c839..518d71f 100644 --- a/src/Model/Pay/PayOrder.php +++ b/src/Model/Pay/PayOrder.php @@ -4,6 +4,7 @@ namespace PayNL\Sdk\Model\Pay; +use Exception; use PayNL\Sdk\Model\ModelInterface; use PayNL\Sdk\Model\Amount; @@ -674,7 +675,7 @@ public function getStatusUrl() /** * @return bool - * @throws \Exception + * @throws Exception */ public function isPaid() { @@ -683,7 +684,7 @@ public function isPaid() /** * @return bool - * @throws \Exception + * @throws Exception */ public function isPending() { @@ -692,7 +693,7 @@ public function isPending() /** * @return bool - * @throws \Exception + * @throws Exception */ public function isCancelled() { @@ -701,7 +702,7 @@ public function isCancelled() /** * @return bool - * @throws \Exception + * @throws Exception */ public function isPartialPayment() { @@ -710,7 +711,7 @@ public function isPartialPayment() /** * @return bool - * @throws \Exception + * @throws Exception */ public function isAuthorized(): bool { @@ -719,26 +720,34 @@ public function isAuthorized(): bool /** * @return bool - * @throws \Exception + * @throws Exception */ - public function isRefundedFully() + public function isRefundedFully(): bool { return (new PayStatus)->get($this->getStatusCode()) === PayStatus::REFUND; } /** * @return bool - * @throws \Exception + * @throws Exception */ - public function isRefundedPartial() + public function isRefundedPartial(): bool { return (new PayStatus)->get($this->getStatusCode()) === PayStatus::PARTIAL_REFUND; - } /** * @return bool - * @throws \Exception + * @throws Exception + */ + public function isVoided(): bool + { + return (new PayStatus)->get($this->getStatusCode()) === PayStatus::VOID; + } + + /** + * @return bool + * @throws Exception */ public function isBeingVerified() { @@ -758,7 +767,7 @@ public function isChargeBack(): bool /** * @param bool $allowPartialRefunds * @return bool - * @throws \Exception + * @throws Exception */ public function isRefunded(bool $allowPartialRefunds = true): bool { diff --git a/src/Model/Pay/PayStatus.php b/src/Model/Pay/PayStatus.php index 45b7eeb..c3e5bd2 100644 --- a/src/Model/Pay/PayStatus.php +++ b/src/Model/Pay/PayStatus.php @@ -18,6 +18,7 @@ class PayStatus public const PAID = 100; public const AUTHORIZE = 95; public const CANCEL = -1; + public const VOID = -61; public const REFUND = -81; public const VERIFY = 85; public const PARTIAL_PAYMENT = 80; @@ -29,7 +30,7 @@ class PayStatus public const EVENT_PAID = 'new_ppt'; public const EVENT_PENDING = 'pending'; public const EVENT_CHARGEBACK = 'chargeback'; - public const EVENT_REFUND = 'retund'; + public const EVENT_REFUND = 'refund'; public const EVENT_CAPTURE = 'capture'; /** @@ -48,6 +49,7 @@ public function get(int $stateId) $mapper[-72] = self::REFUND; $mapper[-81] = self::REFUND; $mapper[-82] = self::PARTIAL_REFUND; + $mapper[-61] = self::VOID; $mapper[20] = self::PENDING; $mapper[25] = self::PENDING; $mapper[50] = self::PENDING; diff --git a/src/Util/Exchange.php b/src/Util/Exchange.php index 9c54cc8..e065b7a 100644 --- a/src/Util/Exchange.php +++ b/src/Util/Exchange.php @@ -25,7 +25,7 @@ class Exchange { private PayLoad $payload; private ?array $custom_payload; - private string $headers; + private mixed $headers; /** * @param array|null $payload From 107c610bba3b39eab7ef6477f0c43d468e974278 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 27 Feb 2025 14:13:29 +0100 Subject: [PATCH 37/46] Added getAmountRefunded method for PayOrder class --- samples/OrderStatus.php | 1 + samples/TransactionStatus.php | 2 ++ src/Model/Pay/PayOrder.php | 36 +++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/samples/OrderStatus.php b/samples/OrderStatus.php index c0257e2..97652bc 100644 --- a/samples/OrderStatus.php +++ b/samples/OrderStatus.php @@ -41,6 +41,7 @@ echo 'isRefunded: ' . ($payOrder->isRefunded() ? 'YES' : 'no') . PHP_EOL; echo 'isPartiallyRefunded: ' . ($payOrder->isRefundedPartial() ? 'YES' : 'no') . PHP_EOL . PHP_EOL; echo 'isFastcheckout: ' . ($payOrder->isFastcheckout() ? 'YES' : 'no') . PHP_EOL; +echo 'getAmountRefunded: ' . ($payOrder->getAmountRefunded()) . PHP_EOL . PHP_EOL; echo 'getStatusCode: ' . $payOrder->getStatusCode() . PHP_EOL; echo 'getStatusName: ' . $payOrder->getStatusName() . PHP_EOL; echo 'getId: ' . $payOrder->getId() . PHP_EOL; diff --git a/samples/TransactionStatus.php b/samples/TransactionStatus.php index 3563465..6176568 100644 --- a/samples/TransactionStatus.php +++ b/samples/TransactionStatus.php @@ -38,6 +38,8 @@ echo 'isPartialPayment: ' . ($payOrder->isPartialPayment() ? 'YES' : 'no') . PHP_EOL; echo 'isRefunded: ' . ($payOrder->isRefunded() ? 'YES' : 'no') . PHP_EOL; echo 'isPartiallyRefunded: ' . ($payOrder->isRefundedPartial() ? 'YES' : 'no') . PHP_EOL . PHP_EOL; +echo 'getAmount: ' . ($payOrder->getAmount()) . PHP_EOL; +echo 'getAmountRefunded: ' . ($payOrder->getAmountRefunded()) . PHP_EOL . PHP_EOL; echo 'getStatusCode: ' . $payOrder->getStatusCode() . PHP_EOL; echo 'getStatusName: ' . $payOrder->getStatusName() . PHP_EOL; echo 'getId: ' . $payOrder->getId() . PHP_EOL; diff --git a/src/Model/Pay/PayOrder.php b/src/Model/Pay/PayOrder.php index 0f5c839..a668330 100644 --- a/src/Model/Pay/PayOrder.php +++ b/src/Model/Pay/PayOrder.php @@ -130,6 +130,11 @@ class PayOrder implements ModelInterface */ protected $completedAt; + /** + * @var Amount + */ + protected $amountRefunded; + /** * @var array */ @@ -153,6 +158,27 @@ public function __construct($payload = null) } } + /** + * @return mixed + */ + public function getAmountRefunded() + { + if (!empty($this->amountRefunded) && $this->amountRefunded instanceof Amount) { + return $this->amountRefunded->getValue() / 100; + } + return null; + } + + /** + * @param $amountRefunded + * @return $this + */ + public function setAmountRefunded($amountRefunded): self + { + $this->amountRefunded = $amountRefunded; + return $this; + } + /** * @return string */ @@ -736,6 +762,16 @@ public function isRefundedPartial() } + /** + * @return bool + * @throws \Exception + */ + public function amountRefunded() + { + return (new PayStatus)->get($this->getStatusCode()) === PayStatus::PARTIAL_REFUND; + + } + /** * @return bool * @throws \Exception From 454d02cf8b03bb56be130b181fef9ae15c2ccf6d Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 27 Feb 2025 14:59:26 +0100 Subject: [PATCH 38/46] Fixed getSettings returning array --- src/Model/Method.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Method.php b/src/Model/Method.php index 2c61031..a380b00 100644 --- a/src/Model/Method.php +++ b/src/Model/Method.php @@ -159,7 +159,7 @@ public function setOptions(array $options): self */ public function getSettings(): array { - return $this->settings; + return $this->settings ?? []; } /** From 42b1bb4c023295d70b51dc41178420a7cd86ad3e Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 27 Feb 2025 15:32:02 +0100 Subject: [PATCH 39/46] Updated getCores method --- samples/ServiceGetConfig.php | 2 +- .../Response/ServiceGetConfigResponse.php | 28 +++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/samples/ServiceGetConfig.php b/samples/ServiceGetConfig.php index 4b5d75e..231677e 100644 --- a/samples/ServiceGetConfig.php +++ b/samples/ServiceGetConfig.php @@ -36,7 +36,7 @@ $terminals = $config->getTerminals(); print_r($terminals); -$tguList = $config->getTguList(); +$tguList = $config->getCores(); print_r($tguList); $paymentMethods = $config->getPaymentMethods(); diff --git a/src/Model/Response/ServiceGetConfigResponse.php b/src/Model/Response/ServiceGetConfigResponse.php index cdc85d4..796e4df 100644 --- a/src/Model/Response/ServiceGetConfigResponse.php +++ b/src/Model/Response/ServiceGetConfigResponse.php @@ -316,7 +316,7 @@ public function setCategory(array $category): void */ public function getTguList(): array { - return $this->tguList; + return $this->tguList ?? []; } /** @@ -328,11 +328,35 @@ public function setTguList(array $tguList): void } /** + * Returns formatted cores with ensured subdomains and HTTPS prefix. + * * @return array */ public function getCores(): array { - return $this->getTguList(); + $tguList = $this->getTguList(); + + foreach ($tguList as &$v) { + $domain = trim($v['domain']); + $hasHttp = strtolower(substr($domain, 0, 4)) == 'http'; + + $host = parse_url($hasHttp ? $domain : 'https://' . $domain, PHP_URL_HOST); + $parts = explode('.', $host); + + # No subdomain, then add "connect" + if (count($parts) <= 2) { + $domain = 'connect.' . $domain; + } + + # Ensure HTTPS prefix + if (!$hasHttp) { + $domain = 'https://' . $domain; + } + + $v['domain'] = $domain; + } + + return $tguList; } /** From 78598ea3b5fdac918bbbbb263731d992585f6abb Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 27 Feb 2025 18:43:17 +0100 Subject: [PATCH 40/46] Code polish --- samples/OrderCreate.php | 2 +- .../Response/ServiceGetConfigResponse.php | 26 +------------------ src/Util/Exchange.php | 5 ++-- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/samples/OrderCreate.php b/samples/OrderCreate.php index a616041..95690d4 100644 --- a/samples/OrderCreate.php +++ b/samples/OrderCreate.php @@ -15,7 +15,7 @@ $request->setDescription('Order ABC0123456789'); $request->setAmount((float)($_REQUEST['amount'] ?? 5.3)); $request->setCurrency('EUR'); -$request->setExpire(date('Y-m-d H:i:s', strtotime('+1 DAY'))); +$request->setExpire(date('c', time() + 60)); $request->setReturnurl($_REQUEST['returnUrl'] ?? 'https://yourdomain/finish.php'); $request->setExchangeUrl($_REQUEST['exchangeUrl'] ?? 'https://yourdomain/exchange.php'); $request->setPaymentMethodId((int)($_REQUEST['paymentMethodId'] ?? 10)); diff --git a/src/Model/Response/ServiceGetConfigResponse.php b/src/Model/Response/ServiceGetConfigResponse.php index 796e4df..a7ad8d9 100644 --- a/src/Model/Response/ServiceGetConfigResponse.php +++ b/src/Model/Response/ServiceGetConfigResponse.php @@ -328,35 +328,11 @@ public function setTguList(array $tguList): void } /** - * Returns formatted cores with ensured subdomains and HTTPS prefix. - * * @return array */ public function getCores(): array { - $tguList = $this->getTguList(); - - foreach ($tguList as &$v) { - $domain = trim($v['domain']); - $hasHttp = strtolower(substr($domain, 0, 4)) == 'http'; - - $host = parse_url($hasHttp ? $domain : 'https://' . $domain, PHP_URL_HOST); - $parts = explode('.', $host); - - # No subdomain, then add "connect" - if (count($parts) <= 2) { - $domain = 'connect.' . $domain; - } - - # Ensure HTTPS prefix - if (!$hasHttp) { - $domain = 'https://' . $domain; - } - - $v['domain'] = $domain; - } - - return $tguList; + return $this->getTguList(); } /** diff --git a/src/Util/Exchange.php b/src/Util/Exchange.php index cae6240..aa63f0a 100644 --- a/src/Util/Exchange.php +++ b/src/Util/Exchange.php @@ -4,7 +4,6 @@ namespace PayNL\Sdk\Util; -use PayNL\Sdk\Config\Config as PayConfig; use PayNL\Sdk\Config\Config; use PayNL\Sdk\Model\Amount; use PayNL\Sdk\Model\Request\OrderStatusRequest; @@ -201,11 +200,11 @@ public function getPayLoad() /** * Process the exchange request. * - * @param Config|null $config + * @param Config |null $config * @return PayOrder * @throws Exception */ - public function process(PayConfig $config = null): PayOrder + public function process(Config $config = null): PayOrder { $payload = $this->getPayload(); From 68badb97da68edbfb051d608d2ea805d56816768 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 27 Feb 2025 18:48:16 +0100 Subject: [PATCH 41/46] Code polish --- src/Model/Pay/PayOrder.php | 54 ++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/Model/Pay/PayOrder.php b/src/Model/Pay/PayOrder.php index 518d71f..13ca95c 100644 --- a/src/Model/Pay/PayOrder.php +++ b/src/Model/Pay/PayOrder.php @@ -15,7 +15,6 @@ */ class PayOrder implements ModelInterface { - /** * @var string */ @@ -173,7 +172,7 @@ public function setType(string $type): self } /** - * @return bool + * @return boolean */ public function isFastCheckout(): bool { @@ -189,7 +188,7 @@ public function getFastCheckoutData(): array } /** - * @return int + * @return integer */ public function getStatusCode(): int { @@ -397,7 +396,7 @@ public function setReceipt(string $receipt): self } /** - * @return bool + * @return boolean */ public function isTestmode(): bool { @@ -424,7 +423,7 @@ public function setIntegration(array $integration): self } /** - * @return float|int + * @return float|integer */ public function getAmount() { @@ -674,90 +673,90 @@ public function getStatusUrl() } /** - * @return bool + * @return boolean * @throws Exception */ public function isPaid() { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::PAID; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::PAID; } /** - * @return bool + * @return boolean * @throws Exception */ public function isPending() { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::PENDING; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::PENDING; } /** - * @return bool + * @return boolean * @throws Exception */ public function isCancelled() { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::CANCEL; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::CANCEL; } /** - * @return bool + * @return boolean * @throws Exception */ public function isPartialPayment() { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::PARTIAL_PAYMENT; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::PARTIAL_PAYMENT; } /** - * @return bool + * @return boolean * @throws Exception */ public function isAuthorized(): bool { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::AUTHORIZE; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::AUTHORIZE; } /** - * @return bool + * @return boolean * @throws Exception */ public function isRefundedFully(): bool { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::REFUND; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::REFUND; } /** - * @return bool + * @return boolean * @throws Exception */ public function isRefundedPartial(): bool { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::PARTIAL_REFUND; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::PARTIAL_REFUND; } /** - * @return bool + * @return boolean * @throws Exception */ public function isVoided(): bool { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::VOID; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::VOID; } - + /** - * @return bool + * @return boolean * @throws Exception */ public function isBeingVerified() { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::VERIFY; + return (new PayStatus())->get($this->getStatusCode()) === PayStatus::VERIFY; } /** * Check whether the status of the transaction is chargeback * - * @return bool + * @return boolean */ public function isChargeBack(): bool { @@ -765,8 +764,8 @@ public function isChargeBack(): bool } /** - * @param bool $allowPartialRefunds - * @return bool + * @param boolean $allowPartialRefunds + * @return boolean * @throws Exception */ public function isRefunded(bool $allowPartialRefunds = true): bool @@ -781,5 +780,4 @@ public function isRefunded(bool $allowPartialRefunds = true): bool return false; } - } From f9743c9beaed1e4e00c18e49d694de8d510e50ac Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 27 Feb 2025 18:50:42 +0100 Subject: [PATCH 42/46] Code polish --- src/Model/Pay/PayOrder.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/Pay/PayOrder.php b/src/Model/Pay/PayOrder.php index 13ca95c..9fbc9d1 100644 --- a/src/Model/Pay/PayOrder.php +++ b/src/Model/Pay/PayOrder.php @@ -136,9 +136,9 @@ class PayOrder implements ModelInterface protected $links; /** - * @param $payload + * @param array $payload */ - public function __construct($payload = null) + public function __construct(array $payload = null) { if (!empty($payload['object'])) { foreach ($payload['object'] as $_key => $_val) { @@ -357,11 +357,11 @@ public function getStatus(): array } /** - * @param $code - * @param $name + * @param mixed $code + * @param mixed $name * @return $this */ - public function setStatusCodeName($code, $name): self + public function setStatusCodeName(mixed $code, mixed $name): self { $this->status = ['code' => $code, 'action' => $name]; return $this; From 196ec460bde4f1557ee35f62b891b9855b5eba30 Mon Sep 17 00:00:00 2001 From: woutse Date: Thu, 27 Feb 2025 21:12:33 +0100 Subject: [PATCH 43/46] Code polish --- src/Model/Pay/PayOrder.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Model/Pay/PayOrder.php b/src/Model/Pay/PayOrder.php index a668330..a5bde9d 100644 --- a/src/Model/Pay/PayOrder.php +++ b/src/Model/Pay/PayOrder.php @@ -762,16 +762,6 @@ public function isRefundedPartial() } - /** - * @return bool - * @throws \Exception - */ - public function amountRefunded() - { - return (new PayStatus)->get($this->getStatusCode()) === PayStatus::PARTIAL_REFUND; - - } - /** * @return bool * @throws \Exception From 39eb0dbadb41e29262f5103f16a07d2980d547b1 Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 28 Feb 2025 00:20:23 +0100 Subject: [PATCH 44/46] Code polish --- .../Response/ServiceGetConfigResponse.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/Model/Response/ServiceGetConfigResponse.php b/src/Model/Response/ServiceGetConfigResponse.php index a7ad8d9..4d8d2c4 100644 --- a/src/Model/Response/ServiceGetConfigResponse.php +++ b/src/Model/Response/ServiceGetConfigResponse.php @@ -16,7 +16,6 @@ */ class ServiceGetConfigResponse implements ModelInterface { - /** * @required * @@ -93,9 +92,8 @@ public function getCode(): string } /** - * @param string $id - * - * @return Config + * @param string $code + * @return $this */ public function setCode(string $code): self { @@ -123,7 +121,7 @@ public function setName(string $name): self } /** - * @return bool + * @return boolean */ public function isTestMode(): bool { @@ -172,6 +170,7 @@ public function getTranslations(): array /** * @param array $translations + * @return void */ public function setTranslations(array $translations): void { @@ -188,6 +187,7 @@ public function getStatus(): string /** * @param string $status + * @return void */ public function setStatus(string $status): void { @@ -204,6 +204,7 @@ public function getMerchant(): array /** * @param array $merchant + * @return void */ public function setMerchant(array $merchant): void { @@ -211,7 +212,7 @@ public function setMerchant(array $merchant): void } /** - * @return bool + * @return boolean */ public function getTestMode(): bool { @@ -228,6 +229,7 @@ public function getCheckoutSequence(): array /** * @param array $checkoutSequence + * @return void */ public function setCheckoutSequence(array $checkoutSequence): void { @@ -257,6 +259,7 @@ public function getPaymentMethods(): array /** * @param CheckoutOptions $checkoutOptions + * @return void */ public function setCheckoutOptions(CheckoutOptions $checkoutOptions): void { @@ -273,6 +276,7 @@ public function getLayout(): array /** * @param array $layout + * @return void */ public function setLayout(array $layout): void { @@ -289,6 +293,7 @@ public function getTurnoverGroup(): array /** * @param array $turnoverGroup + * @return void */ public function setTurnoverGroup(array $turnoverGroup): void { @@ -305,6 +310,7 @@ public function getCategory(): array /** * @param array $category + * @return void */ public function setCategory(array $category): void { @@ -321,6 +327,7 @@ public function getTguList(): array /** * @param array $tguList + * @return void */ public function setTguList(array $tguList): void { From c9ddcf2fe655bc69bb497db8731ea8f06e6a8a5f Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 28 Feb 2025 00:24:12 +0100 Subject: [PATCH 45/46] Code polish --- src/Model/Pay/PayOrder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Pay/PayOrder.php b/src/Model/Pay/PayOrder.php index dac1c89..b3ca0cc 100644 --- a/src/Model/Pay/PayOrder.php +++ b/src/Model/Pay/PayOrder.php @@ -170,10 +170,10 @@ public function getAmountRefunded() } /** - * @param $amountRefunded + * @param Amount $amountRefunded * @return $this */ - public function setAmountRefunded($amountRefunded): self + public function setAmountRefunded(Amount $amountRefunded): self { $this->amountRefunded = $amountRefunded; return $this; From 3879bfccde692ae054a11db79fe53b8bedf6d9e5 Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 28 Feb 2025 00:28:47 +0100 Subject: [PATCH 46/46] Code polish --- samples/OrderCreate.php | 3 +-- samples/OrderStatus.php | 6 +++--- samples/ServiceGetConfig.php | 2 +- samples/TransactionStatus.php | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/samples/OrderCreate.php b/samples/OrderCreate.php index 95690d4..d70ddf2 100644 --- a/samples/OrderCreate.php +++ b/samples/OrderCreate.php @@ -92,8 +92,7 @@ ->setExtra1('ex1') ->setExtra2('ex2') ->setExtra3('ex3') - ->setDomainId('WU-1234-1234') -); + ->setDomainId('WU-1234-1234')); $request->setNotification('EMAIL', 'youremail@yourdomain.ext'); $request->setTransferData([['yourField' => 'yourData'], ['tracker' => 'trackerinfo']]); diff --git a/samples/OrderStatus.php b/samples/OrderStatus.php index 97652bc..e608530 100644 --- a/samples/OrderStatus.php +++ b/samples/OrderStatus.php @@ -28,7 +28,7 @@ } echo '
';
-echo 'Success, values:' . PHP_EOL.PHP_EOL;
+echo 'Success, values:' . PHP_EOL . PHP_EOL;
 
 echo 'type: ' . $payOrder->getType() . PHP_EOL;
 echo 'isPending: ' . ($payOrder->isPending() ? 'YES' : 'no') . PHP_EOL;
@@ -48,8 +48,8 @@
 echo 'getOrderId: ' . $payOrder->getOrderId() . PHP_EOL;
 echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
 echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
-echo 'getAmount: ' . $payOrder->getAmount(). PHP_EOL;
+echo 'getAmount: ' . $payOrder->getAmount() . PHP_EOL;
 echo 'getCurrency: ' . $payOrder->getCurrency() . PHP_EOL;
 echo 'paymentMethod: ' . $payOrder->getPaymentMethod() . PHP_EOL;
 
-print_r($payOrder->getFastCheckoutData());
\ No newline at end of file
+print_r($payOrder->getFastCheckoutData());
diff --git a/samples/ServiceGetConfig.php b/samples/ServiceGetConfig.php
index 231677e..b24da48 100644
--- a/samples/ServiceGetConfig.php
+++ b/samples/ServiceGetConfig.php
@@ -53,4 +53,4 @@
 
 foreach ($config->getCheckoutOptions() as $checkoutOption) {
     echo '=> TAG: ' . $checkoutOption->getTag() . PHP_EOL;
-}
\ No newline at end of file
+}
diff --git a/samples/TransactionStatus.php b/samples/TransactionStatus.php
index 6176568..a28425e 100644
--- a/samples/TransactionStatus.php
+++ b/samples/TransactionStatus.php
@@ -27,7 +27,7 @@
 }
 
 echo '
';
-echo 'Success, values:' . PHP_EOL.PHP_EOL;
+echo 'Success, values:' . PHP_EOL . PHP_EOL;
 
 echo 'isPending: ' . ($payOrder->isPending() ? 'YES' : 'no') . PHP_EOL;
 echo 'isPaid: ' . ($payOrder->isPaid() ? 'YES' : 'no') . PHP_EOL;