diff --git a/.chanrc b/.chanrc new file mode 100644 index 0000000..bf32955 --- /dev/null +++ b/.chanrc @@ -0,0 +1,3 @@ +{ + "release-prefix": "" +} diff --git a/.coveralls.yml b/.coveralls.yml index 0ead87f..efa8f82 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,4 +1,4 @@ -service_name: travis-ci +service_name: github-actions # for php-coveralls coverage_clover: build/logs/clover.xml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ffd179a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[composer.{json,lock}] +indent_size = 2 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..b56391b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +name: "๐Ÿšจ Bug report" +about: Create a report to help us improve the project +title: '' +labels: 'type: Bug' +assignees: '' +--- + +### ๐Ÿ’ฌ Describe the bug +A clear and concise description of what the bug is. + +### ๐Ÿ”ข To Reproduce +Steps to reproduce the behaviour: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +### ๐Ÿงž Expected behaviour +A clear and concise description of what you expected to happen. + +### ๐Ÿ“ธ Screenshots +If applicable, add screenshots to help explain your problem. + +### โš™๏ธ Additional context +Add any other context about the problem here. + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..2049150 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: "โ˜๏ธ Feature request" +about: Suggest an idea for this project +title: '' +labels: 'type: New feature' +assignees: '' +--- + +### ๐Ÿ’ฌ Is your feature request related to a problem? Please describe. +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +### ๐Ÿงž Describe the solution you'd like +A clear and concise description of what you want to happen. + +### โ˜๏ธ Describe alternatives you've considered +A clear and concise description of any alternative solutions or features you've considered. + diff --git a/.github/ISSUE_TEMPLATE/review.md b/.github/ISSUE_TEMPLATE/review.md new file mode 100644 index 0000000..331935f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/review.md @@ -0,0 +1,18 @@ +--- +name: "๐Ÿ”ฌ Review" +about: Create a new review issue +title: '' +labels: 'type: Review' +assignees: '' +--- + +### ๐Ÿ’ฌ Describe the context +A clear and concise description of what the review is about. + +### โœ… To modify +List of required modifications: +- [ ] Do that +- [ ] Change this + +### ๐Ÿ“ธ Screenshots +If needed, add screenshots to help explain your review. diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md new file mode 100644 index 0000000..962d0fd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.md @@ -0,0 +1,21 @@ +--- +name: "โ˜‘๏ธ Task" +about: Task issue +title: '' +labels: '' +assignees: '' +--- + +### ๐Ÿ’ฌ Describe the task +A clear and concise description of what the task is about. + +### โœ… Todo +Steps to achieve the task: +- [ ] Do that +- [ ] Produce this + +### ๐Ÿงž Expected result +A clear and concise description of what you expected to produce. + +### ๐Ÿ“ธ Screenshots +If applicable, add screenshots to help explain the task. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4116330 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: composer + directory: "/" + versioning-strategy: lockfile-only + allow: + - dependency-type: production + schedule: + interval: weekly + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: weekly + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..3663211 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +### ๐Ÿ’ฌ Describe the pull request +A clear and concise description of what the pull request is about. + +### ๐Ÿ—ƒ๏ธ Issues +This pull request is related to : +- #1 + +### ๐Ÿ”ข To Review +Steps to review the PR: +1. Install '...' +2. Go to '...' +3. Click on '....' +4. Scroll down to '....' + +### ๐Ÿ“ธ Screenshots +If applicable, add screenshots to help explain the task. diff --git a/.github/workflows/styles.yml b/.github/workflows/styles.yml new file mode 100644 index 0000000..ec7b0d9 --- /dev/null +++ b/.github/workflows/styles.yml @@ -0,0 +1,56 @@ +name: Code styles +on: + push: + schedule: + - cron: '0 0 * * THU' + +jobs: + php-cs-fixer: + name: php-cs-fixer + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv + tools: php-cs-fixer, cs2pr + - uses: actions/checkout@v4 + - run: composer install --prefer-dist + - run: ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --using-cache=no --format=checkstyle | cs2pr + + phpmd: + name: phpmd + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv + - uses: actions/checkout@v4 + - run: composer install --prefer-dist + - run: ./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests,examples + + psalm: + name: psalm + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv + - uses: actions/checkout@v4 + - run: composer install --prefer-dist + - run: ./vendor/bin/psalm --output-format=github + + security-checker: + name: security-checker + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + tools: composer:v2 + - uses: actions/checkout@v4 + - run: composer install --prefer-dist + - uses: symfonycorp/security-checker-action@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..0006d8c --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +name: Tests +on: + push: + schedule: + - cron: '0 0 * * THU' + +jobs: + tests: + runs-on: ubuntu-latest + env: + TRUSTEDSHOPS_LOGIN: ${{ secrets.TRUSTEDSHOPS_LOGIN }} + TRUSTEDSHOPS_PASS: ${{ secrets.TRUSTEDSHOPS_PASS }} + TRUSTEDSHOPS_TSID: ${{ secrets.TRUSTEDSHOPS_TSID }} + strategy: + matrix: + php-versions: ['8.0', '8.1', '8.2', '8.3'] + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: composer:v2 + - uses: actions/checkout@v4 + - uses: php-actions/composer@v6 + with: + php_version: ${{ matrix.php-versions }} + version: 2 + - run: XDEBUG_MODE=coverage ./vendor/bin/phpunit + - name: Upload coverage results to Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v diff --git a/.gitignore b/.gitignore index 119fa55..17ebecb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,8 @@ # Ignore build /build/ + +# Ignore log & cache files +.php-cs-fixer.cache +.php_cs.cache +.phpunit.result.cache diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..81ff38b --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,15 @@ +exclude('vendor') + ->exclude('.sonarlint') + ->in(__DIR__); + +$config = new \PhpCsFixer\Config(); + +return $config->setRules([ + '@Symfony' => true, + 'array_syntax' => ['syntax' => 'short'], + 'phpdoc_align' => ['align' => 'vertical', 'tags' => ['type', 'var']], + ]) + ->setFinder($finder); diff --git a/.php_cs.dist b/.php_cs.dist deleted file mode 100644 index 1aa5d99..0000000 --- a/.php_cs.dist +++ /dev/null @@ -1,16 +0,0 @@ -exclude('vendor') - ->exclude('.sonarlint') - ->in(__DIR__) -; - -return PhpCsFixer\Config::create() - ->setRules([ - '@Symfony' => true, - 'array_syntax' => ['syntax' => 'short'], - 'phpdoc_align' => ['align' => 'vertical', 'tags' => ['param', 'type', 'var']], - ]) - ->setFinder($finder) -; diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 5f1606f..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,13 +0,0 @@ -preset: psr2 - -risky: false - -finder: - exclude: - - "tests" - - "vendor" - - "bin" - name: - - "*.php" - path: - - "./" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8b1fa61..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: php -sudo: true -php: - - 7.1 - - 7.2 - - 7.3 -before_script: - - composer self-update - - composer install --prefer-source --no-interaction --dev --ignore-platform-reqs -script: - - ./vendor/bin/phpunit -after_success: - - travis_retry php vendor/bin/php-coveralls -v diff --git a/CHANGELOG.md b/CHANGELOG.md index 3353ffb..094391f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,48 @@ -CHANGELOG ---------- - -## 1.0.0 (2019-10-08) - - Initial release - - Refactoring of testing strategy - - Improve code coverage to ensure stability and sustainability - -## 0.0.1-alpha (2019-09-27) - - Alpha release - - Allow GET, POST, PUT, PATCH & DELETE operation on the TrustedShops API - - Allow Public and Restricted API calls - - Expose an option to change the Base URL from Production to Test/QA environment - -## 0.0.0 (2019-09-09) - - Under heavy development +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.1.0] - 2024-06-27 +### Added +- add Github Actions integration +- add Psalm linter +- add .editorconfig file +- add coveralls phpunit coverage upload +- add coverage on cURL availability tests +- add support for PHP 8.0, 8.1 & 8.2 +- add security-checker on Github Actions + +### Security +- ugprade phpunit/phpunit 7.x => 8.x +- update phpmd/phpmd (2.7.0 => 2.15.0) +- guzzlehttp/guzzle (6.3.3 => 7.8.1) +- symfony/dotenv (v4.3.4 => v4.4.37) +- guzzlehttp/psr7 (1.6.1 => 2.6.2) +- upgrade friendsofphp/php-cs-fixer (v2.19.3 => v3.4.0) +- upgrade phpunit/phpunit 8.x -> 9.x + +### Removed +- remove StyleCI in favor of Github Actions +- drop support for PHP 7.4 and below + +## 1.0.0 - 2019-10-08 +### Changed +- refactoring of testing strategy +- improve code coverage to ensure stability and sustainability + +## 0.0.1-alpha - 2019-09-27 +### Added +- allow GET, POST, PUT, PATCH & DELETE operation on the TrustedShops API +- allow Public and Restricted API calls +- expose an option to change the Base URL from Production to Test/QA environment + +## 0.0.0 - 2019-09-09 +### Added +- under heavy development + +[Unreleased]: https://github.com/antistatique/trustedshops-php-sdk/compare/1.1.0...HEAD +[1.1.0]: https://github.com/antistatique/trustedshops-php-sdk/compare/1.0.0...1.1.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2038f4..ab4adc0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,18 +20,18 @@ There are a small number of PHPUnit unit tests. To get up and running, copy `.en You need to run composer before using [FriendsOfPHP/PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer). -### Command Line Usage +### Ensure PHP Community Best Practicies using PHP Coding Standards Fixer -Check & Fix Symfony 4 coding standards: +It can modernize your code (like converting the pow function to the ** operator on PHP 5.6) and (micro) optimize it. ```bash -./vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --using-cache=no +./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle ``` -Automatically fix coding standards +### Attempts to dig into your program and find as many type-related bugs as possiblevia Psalm ```bash -./vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --using-cache=no +./vendor/bin/psalm ``` ### Asserts Security Vulnerabilities @@ -43,18 +43,12 @@ if the application uses dependencies with known security vulnerabilitie. ./vendor/bin/security-checker security:check ./composer.lock ``` -### Improve global code quality using PHPCPD (Code duplication) & PHPMD (PHP Mess Detector) +### Improve global code quality using PHPMD (PHP Mess Detector) Detect overcomplicated expressions & Unused parameters, methods, properties ```bash -./vendor/bin/phpmd ./web/modules/custom text ./phpmd.xml -``` - -Copy/Paste Detector - -```bash -./vendor/bin/phpcpd ./web/modules/custom +./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests ``` ### Enforce code standards with git hooks diff --git a/README.md b/README.md index d80c924..699e2bb 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,11 @@ Super-simple, minimum abstraction TrustedShops API v2.x wrapper, in PHP. I hate complex wrappers. This lets you get from the TrustedShops API docs to the code as directly as possible. -Requires PHP 7.0+. Abstraction is for chimps. - -[![Build Status](https://travis-ci.org/antistatique/trustedshops-php-sdk.svg?branch=master)](https://travis-ci.org/antistatique/trustedshops-php-sdk) -[![StyleCI](https://github.styleci.io/repos/207270598/shield?branch=master)](https://github.styleci.io/repos/207270598) +[![Build](https://github.com/antistatique/trustedshops-php-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/antistatique/trustedshops-php-sdk/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/github/antistatique/trustedshops-php-sdk/badge.svg?branch=master)](https://coveralls.io/github/antistatique/trustedshops-php-sdk?branch=master) [![Packagist](https://img.shields.io/packagist/dt/antistatique/trustedshops-php-sdk.svg?maxAge=2592000)](https://packagist.org/packages/antistatique/trustedshops-php-sdk) [![License](https://poser.pugx.org/antistatique/trustedshops-php-sdk/license)](https://packagist.org/packages/antistatique/trustedshops-php-sdk) +[![PHP Versions Supported](https://img.shields.io/badge/php-%3E%3D%208.0-8892BF.svg)](https://packagist.org/packages/antistatique/trustedshops-php-sdk) Getting started ------------ @@ -25,6 +23,16 @@ composer require antistatique/trustedshops-php-sdk Examples -------- +See the `examples/` directory for examples of the key client features. You can view them in your browser by running the php built-in web server. + +```bash +php -S localhost:8000 -t examples/ +``` + +And then browsing to the host and port you specified (in the above example, `http://localhost:8000`). + +### Basic Example + Start by `use`-ing the class and creating an instance with your API key ```php @@ -37,7 +45,7 @@ use \Antistatique\TrustedShops\TrustedShops; $tsid = 'abc123abc123abc123abc123abc123'; $ts = new TrustedShops(); $response = $ts->get("shops/$tsid"); -print_r($result); +print_r($response); ``` ### Get all reviews (with a `public` call via `get` to the `lists/{listID}/reviews` method) @@ -46,7 +54,7 @@ print_r($result); $tsid = 'abc123abc123abc123abc123abc123'; $ts = new TrustedShops(); $response = $ts->get("shops/$tsid/reviews"); -print_r($result); +print_r($response); ``` ### Read measurement matrix of review complaint indicator for a shop (with a `restricted` authenticated call via `get` on the `shops/{tsid}/quality/complaints` method) @@ -58,7 +66,7 @@ $tsid = 'abc123abc123abc123abc123abc123'; $ts = new TrustedShops('restricted'); $ts->setApiCredentials( 'SECRET_USER', 'SECRET_PASSWORD'); $response = $ts->get("shops/$tsid/quality/complaints"); -print_r($result); +print_r($response); ``` Troubleshooting diff --git a/VERSION b/VERSION index 3eefcb9..9084fa2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +1.1.0 diff --git a/bin/post-commit b/bin/post-commit index e985b46..dd4d2b1 100755 --- a/bin/post-commit +++ b/bin/post-commit @@ -4,8 +4,5 @@ echo "\n๐Ÿš” \033[0;32mRunning Code Sniffer Symfony for /public ...\033[0m" echo "\n๐Ÿ’ฉ \033[0;32mRunning PHP Mess Detector ...\033[0m" ./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,var,tests,node_modules,DataFixtures,Migrations -echo "\n๐Ÿ›‚ \033[0;32mRunning PHP Copy/Paste Detector ...\033[0m" -./vendor/bin/phpcpd ./ --names=*.php,*.inc,*.test --names-exclude=*.md --ansi --exclude=vendor --exclude=bin --exclude=var --exclude=tests --exclude=node_modules - echo "\nโ›” \033[0;32mRunning SensioLabs Security Checker ...\033[0m" ./vendor/bin/security-checker security:check ./composer.lock diff --git a/composer.json b/composer.json index ee5d230..96b2c5f 100644 --- a/composer.json +++ b/composer.json @@ -3,20 +3,19 @@ "description": "Super-simple, minimum abstraction TrustedShops API v2.x wrapper, in PHP", "license": "MIT", "require": { - "php": ">=7.0", + "php": ">=8.0", "ext-curl": "*", "ext-json": "*" }, "require-dev": { - "phpunit/phpunit": "7.0.*", - "phpunit/php-code-coverage": "^6.0", + "phpunit/phpunit": "^9", + "phpunit/php-code-coverage": "^9", "symfony/dotenv": "^4.3", - "friendsofphp/php-cs-fixer": "^2.12", + "friendsofphp/php-cs-fixer": "^3.0", "phpmd/phpmd": "^2.6", - "sebastian/phpcpd": "^4.0", - "sensiolabs/security-checker": "^5.0", "php-coveralls/php-coveralls": "^2.1", - "php-mock/php-mock-phpunit": "^2.4" + "vimeo/psalm": "^4.30", + "php-mock/php-mock-phpunit": "^2.10" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 0a2025a..4d3f9d0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,42 +4,273 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dc8cce1276eb58fa09b48add4d7a8e7e", + "content-hash": "4844d90b14df5a7ad984b497890ba17a", "packages": [], "packages-dev": [ { - "name": "composer/ca-bundle", - "version": "1.2.4", + "name": "amphp/amp", + "version": "v2.6.4", "source": { "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "10bb96592168a0f8e8f6dcde3532d9fa50b0b527" + "url": "https://github.com/amphp/amp.git", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/10bb96592168a0f8e8f6dcde3532d9fa50b0b527", - "reference": "10bb96592168a0f8e8f6dcde3532d9fa50b0b527", + "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", "shasum": "" }, "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", - "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0 || ^4.0" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "react/promise": "^2", + "vimeo/psalm": "^3.12" }, "type": "library", "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ], + "psr-4": { + "Amp\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "https://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.6.4" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-03-21T18:52:26+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.2", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" + }, + "type": "library", + "autoload": { + "files": [ + "lib/functions.php" + ], + "psr-4": { + "Amp\\ByteStream\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "https://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-13T18:00:56+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", "branch-alias": { "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "Composer\\CaBundle\\": "src" + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.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": "2022-01-17T14:14:24+00:00" + }, + { + "name": "composer/pcre", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -53,41 +284,58 @@ "homepage": "http://seld.be" } ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.1" + }, + "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": "2019-08-30T08:44:50+00:00" + "time": "2022-01-21T20:24:37+00:00" }, { "name": "composer/semver", - "version": "1.5.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/46d9139568ccb8d9e7cdd4539cab7347568a5e2e", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -123,28 +371,50 @@ "validation", "versioning" ], - "time": "2019-03-19T17:25:45+00:00" + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "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": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.3.3", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "46867cbf8ca9fb8d60c506895449eb799db1184f" + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/46867cbf8ca9fb8d60c506895449eb799db1184f", - "reference": "46867cbf8ca9fb8d60c506895449eb799db1184f", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0", - "psr/log": "^1.0" + "composer/pcre": "^1", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "type": "library", "autoload": { @@ -162,41 +432,101 @@ "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "Restarts a process without xdebug.", + "description": "Restarts a process without Xdebug.", "keywords": [ "Xdebug", "performance" ], - "time": "2019-05-27T17:52:04+00:00" + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.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": "2022-02-24T20:20:32+00:00" }, { - "name": "doctrine/annotations", - "version": "v1.7.0", + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb" + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/fa4c4e861e809d6a1103bd620cce63ed91aedfeb", - "reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", - "php": "^7.1" + "php": ">=5.3.2" }, "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5@dev" + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.14.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1 || ^2", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", "autoload": { "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" @@ -229,46 +559,93 @@ } ], "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", "keywords": [ "annotations", "docblock", "parser" ], - "time": "2019-08-08T18:11:40+00:00" + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.14.3" + }, + "time": "2023-02-01T09:20:38+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + }, + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/instantiator", - "version": "1.2.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -282,7 +659,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -291,39 +668,55 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" }, { "name": "doctrine/lexer", - "version": "1.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" + "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", + "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", "shasum": "" }, "require": { - "php": "^7.2" + "doctrine/deprecations": "^1.0", + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.21" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -353,59 +746,179 @@ "parser", "php" ], - "time": "2019-07-30T19:33:28+00:00" + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2024-02-05T11:35:39+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "v1.5.2", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" + }, + "time": "2022-03-02T22:36:06+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.15.3", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "705490b0f282f21017d73561e9498d2b622ee34c" + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/705490b0f282f21017d73561e9498d2b622ee34c", - "reference": "705490b0f282f21017d73561e9498d2b622ee34c", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", "shasum": "" }, "require": { - "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.2", - "doctrine/annotations": "^1.2", + "composer/semver": "^3.2", + "composer/xdebug-handler": "^2.0", + "doctrine/annotations": "^1.12", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || ^7.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.17 || ^4.1.6", - "symfony/event-dispatcher": "^3.0 || ^4.0", - "symfony/filesystem": "^3.0 || ^4.0", - "symfony/finder": "^3.0 || ^4.0", - "symfony/options-resolver": "^3.0 || ^4.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0", - "symfony/stopwatch": "^3.0 || ^4.0" + "php": "^7.2.5 || ^8.0", + "php-cs-fixer/diff": "^2.0", + "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0", + "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0", + "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", + "symfony/finder": "^4.4.20 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.4.20 || ^5.0 || ^6.0", + "symfony/polyfill-mbstring": "^1.23", + "symfony/polyfill-php80": "^1.23", + "symfony/polyfill-php81": "^1.23", + "symfony/process": "^4.4.20 || ^5.0 || ^6.0", + "symfony/stopwatch": "^4.4.20 || ^5.0 || ^6.0" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.2", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.1", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", - "phpunitgoodpractices/traits": "^1.8", - "symfony/phpunit-bridge": "^4.3", - "symfony/yaml": "^3.0 || ^4.0" + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^1.5", + "mikey179/vfsstream": "^1.6.8", + "php-coveralls/php-coveralls": "^2.5.2", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.15", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "symfony/phpunit-bridge": "^5.2.4 || ^6.0", + "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0" }, "suggest": { - "ext-mbstring": "For handling non-UTF8 characters in cache signature.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" @@ -414,18 +927,7 @@ "autoload": { "psr-4": { "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/TestCase.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -442,39 +944,61 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2019-08-31T12:51:54+00:00" + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2021-12-11T16:25:08+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "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": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "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": { - "branch-alias": { - "dev-master": "6.3-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -490,132 +1014,240 @@ "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", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], - "time": "2018-04-22T15:46:56+00:00" + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + }, + "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": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.4-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "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" ], - "time": "2016-12-20T10:07:11+00:00" + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.2" + }, + "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": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "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": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.6-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "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", @@ -629,41 +1261,61 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.6.2" + }, + "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": "2023-12-03T20:05:35+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "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": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -677,81 +1329,213 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-06-12T14:39:25+00:00" }, { - "name": "paragonie/random_compat", - "version": "v9.99.99", + "name": "netresearch/jsonmapper", + "version": "v4.4.1", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "shasum": "" }, "require": { - "php": "^7" + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", + "squizlabs/php_codesniffer": "~3.5" }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" + }, + "time": "2024-01-31T06:18:54+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.19.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.1" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-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/v4.19.1" + }, + "time": "2024-03-17T08:10:35+00:00" + }, + { + "name": "openlss/lib-array2xml", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "LSS": "" + } }, - "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com", "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" + "array", + "array conversion", + "xml", + "xml conversion" ], - "time": "2018-07-02T15:55:56+00:00" + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" }, { "name": "pdepend/pdepend", - "version": "2.5.2", + "version": "2.16.2", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239" + "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/9daf26d0368d4a12bed1cacae1a9f3a6f0adf239", - "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239", + "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", - "symfony/dependency-injection": "^2.3.0|^3|^4", - "symfony/filesystem": "^2.3.0|^3|^4" + "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": { - "phpunit/phpunit": "^4.8|^5.7", + "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" @@ -762,32 +1546,50 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2017-12-13T13:21:38+00:00" + "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": "1.0.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -802,39 +1604,49 @@ "authors": [ { "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "email": "arne@blankerts.de", + "role": "Developer" }, { "name": "Sebastian Heuer", - "role": "Developer", - "email": "sebastian@phpeople.de" + "email": "sebastian@phpeople.de", + "role": "Developer" }, { "name": "Sebastian Bergmann", - "role": "Developer", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "Developer" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" + "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": "1.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -864,35 +1676,40 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "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": "php-coveralls/php-coveralls", - "version": "v2.1.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d" + "reference": "b36fa4394e519dafaddc04ae03976bc65a25ba15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3b00c229726f892bfdadeaf01ea430ffd04a939d", - "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/b36fa4394e519dafaddc04ae03976bc65a25ba15", + "reference": "b36fa4394e519dafaddc04ae03976bc65a25ba15", "shasum": "" }, "require": { "ext-json": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0", - "php": "^5.5 || ^7.0", - "psr/log": "^1.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", - "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + "guzzlehttp/guzzle": "^6.0 || ^7.0", + "php": "^7.0 || ^8.0", + "psr/log": "^1.0 || ^2.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || >=8.0 <8.5.29 || >=9.0 <9.5.23", + "sanmai/phpunit-legacy-adapter": "^6.1 || ^8.0" }, "suggest": { "symfony/http-kernel": "Allows Symfony integration" @@ -901,11 +1718,6 @@ "bin/php-coveralls" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, "autoload": { "psr-4": { "PhpCoveralls\\": "src/" @@ -918,9 +1730,9 @@ "authors": [ { "name": "Kitamura Satoshi", - "role": "Original creator", "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" }, { "name": "Takashi Matsuo", @@ -947,27 +1759,31 @@ "github", "test" ], - "time": "2018-05-22T23:11:08+00:00" + "support": { + "issues": "https://github.com/php-coveralls/php-coveralls/issues", + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.7.0" + }, + "time": "2023-11-22T10:21:01+00:00" }, { "name": "php-cs-fixer/diff", - "version": "v1.3.0", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", "symfony/process": "^3.3" }, "type": "library", @@ -981,54 +1797,60 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { - "name": "SpacePossum" + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "sebastian/diff v2 backport support for PHP5.6", + "description": "sebastian/diff v3 backport support for PHP 5.6+", "homepage": "https://github.com/PHP-CS-Fixer", "keywords": [ "diff" ], - "time": "2018-02-15T16:58:55+00:00" + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" + }, + "abandoned": true, + "time": "2020-10-14T08:32:19+00:00" }, { "name": "php-mock/php-mock", - "version": "2.1.2", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock.git", - "reference": "35379d7b382b787215617f124662d9ead72c15e3" + "reference": "fff1a621ebe54100fa3bd852e7be57773a0c0127" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock/zipball/35379d7b382b787215617f124662d9ead72c15e3", - "reference": "35379d7b382b787215617f124662d9ead72c15e3", + "url": "https://api.github.com/repos/php-mock/php-mock/zipball/fff1a621ebe54100fa3bd852e7be57773a0c0127", + "reference": "fff1a621ebe54100fa3bd852e7be57773a0c0127", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1" + "php": "^5.6 || ^7.0 || ^8.0", + "phpunit/php-text-template": "^1 || ^2 || ^3 || ^4" }, "replace": { "malkusch/php-mock": "*" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.0" + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.0 || ^9.0 || ^10.0 || ^11.0", + "squizlabs/php_codesniffer": "^3.8" }, "suggest": { "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock." }, "type": "library", "autoload": { + "files": [ + "autoload.php" + ], "psr-4": { "phpmock\\": [ "classes/", @@ -1057,31 +1879,42 @@ "mock", "stub", "test", - "test double" + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/php-mock/php-mock/issues", + "source": "https://github.com/php-mock/php-mock/tree/2.5.0" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } ], - "time": "2019-06-05T20:10:01+00:00" + "time": "2024-02-10T21:07:01+00:00" }, { "name": "php-mock/php-mock-integration", - "version": "2.0.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock-integration.git", - "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4" + "reference": "ec6a00a8129d50ed0f07907c91e3274ca4ade877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/5a0d7d7755f823bc2a230cfa45058b40f9013bc4", - "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4", + "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/ec6a00a8129d50ed0f07907c91e3274ca4ade877", + "reference": "ec6a00a8129d50ed0f07907c91e3274ca4ade877", "shasum": "" }, "require": { "php": ">=5.6", - "php-mock/php-mock": "^2", - "phpunit/php-text-template": "^1" + "php-mock/php-mock": "^2.5", + "phpunit/php-text-template": "^1 || ^2 || ^3 || ^4" }, "require-dev": { - "phpunit/phpunit": "^4|^5" + "phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11" }, "type": "library", "autoload": { @@ -1112,26 +1945,39 @@ "test", "test double" ], - "time": "2017-02-17T21:31:34+00:00" + "support": { + "issues": "https://github.com/php-mock/php-mock-integration/issues", + "source": "https://github.com/php-mock/php-mock-integration/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } + ], + "time": "2024-02-10T21:37:25+00:00" }, { "name": "php-mock/php-mock-phpunit", - "version": "2.4.0", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock-phpunit.git", - "reference": "04f78fe83df4855654373188aca8cccf8bf472ce" + "reference": "e1f7e795990b00937376e345883ea68ca3bda7e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/04f78fe83df4855654373188aca8cccf8bf472ce", - "reference": "04f78fe83df4855654373188aca8cccf8bf472ce", + "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/e1f7e795990b00937376e345883ea68ca3bda7e0", + "reference": "e1f7e795990b00937376e345883ea68ca3bda7e0", "shasum": "" }, "require": { "php": ">=7", - "php-mock/php-mock-integration": "^2", - "phpunit/phpunit": "^6 || ^7 || ^8" + "php-mock/php-mock-integration": "^2.3", + "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10.0.17 || ^11" + }, + "require-dev": { + "mockery/mockery": "^1.3.6" }, "type": "library", "autoload": { @@ -1164,34 +2010,42 @@ "phpunit", "stub", "test", - "test double" + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/php-mock/php-mock-phpunit/issues", + "source": "https://github.com/php-mock/php-mock-phpunit/tree/2.10.0" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } ], - "time": "2019-06-07T12:26:51+00:00" + "time": "2024-02-11T07:24:16+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -1218,44 +2072,53 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "5.4.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "doctrine/deprecations": "^1.1", + "ext-filter": "*", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.5", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1266,38 +2129,53 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + }, + "time": "2024-05-21T05:55:05+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "153ae662783729388a584b4361f2545e4d841e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", "shasum": "" }, "require": { - "php": "^7.1", - "phpdocumentor/reflection-common": "^2.0" + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -1316,32 +2194,39 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + }, + "time": "2024-02-23T11:10:43+00:00" }, { "name": "phpmd/phpmd", - "version": "2.7.0", + "version": "2.15.0", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "a05a999c644f4bc9a204846017db7bb7809fbe4c" + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/a05a999c644f4bc9a204846017db7bb7809fbe4c", - "reference": "a05a999c644f4bc9a204846017db7bb7809fbe4c", + "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.5", + "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.4", - "phpunit/phpunit": "^4.8.36 || ^5.7.27", - "squizlabs/php_codesniffer": "^2.0" + "mikey179/vfsstream": "^1.6.8", + "squizlabs/php_codesniffer": "^2.9.2 || ^3.7.2" }, "bin": [ "src/bin/phpmd" @@ -1378,113 +2263,113 @@ "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" ], - "time": "2019-07-30T21:13:32+00:00" + "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": "phpspec/prophecy", - "version": "1.8.1", + "name": "phpstan/phpdoc-parser", + "version": "1.29.1", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2019-06-13T12:50:23+00:00" + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + }, + "time": "2024-05-31T08:52:43+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "6.0.5", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4cab20a326d14de7575a8e235c70d879b569a57a" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4cab20a326d14de7575a8e235c70d879b569a57a", - "reference": "4cab20a326d14de7575a8e235c70d879b569a57a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^1.4.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.6.0" + "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-master": "6.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -1510,29 +2395,43 @@ "testing", "xunit" ], - "time": "2018-05-28T11:49:20+00:00" + "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/9.2.31" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1547,7 +2446,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1557,26 +2456,48 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1593,37 +2514,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.2", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1642,38 +2573,47 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-06-07T04:22:29+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.1.1", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1688,61 +2628,73 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "7.0.3", + "version": "9.6.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "536f4d853c12d8189963435088e8ff7c0daeab2e" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/536f4d853c12d8189963435088e8ff7c0daeab2e", - "reference": "536f4d853c12d8189963435088e8ff7c0daeab2e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.1", - "phpunit/php-file-iterator": "^1.4.3", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.0", - "phpunit/phpunit-mock-objects": "^6.0", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" - }, - "require-dev": { - "ext-pdo": "*" + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.28", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" }, "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -1750,10 +2702,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.6-dev" } }, "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], "classmap": [ "src/" ] @@ -1769,88 +2724,200 @@ "role": "lead" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "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/9.6.19" + }, + "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-04-05T04:35:58+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "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": [ - "phpunit", - "testing", - "xunit" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2018-03-26T07:36:48+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, + "time": "2021-11-05T16:50:12+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "6.1.2", + "name": "psr/http-client", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "f9756fd4f43f014cb2dca98deeaaa8ce5500a36e" + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/f9756fd4f43f014cb2dca98deeaaa8ce5500a36e", - "reference": "f9756fd4f43f014cb2dca98deeaaa8ce5500a36e", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.1", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-soap": "*" + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "mock", - "xunit" + "http", + "http-client", + "psr", + "psr-18" ], - "abandoned": true, - "time": "2018-05-29T13:54:20+00:00" + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "psr/http-factory", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -1860,7 +2927,7 @@ }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1870,41 +2937,46 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1919,7 +2991,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -1932,34 +3004,37 @@ "request", "response" ], - "time": "2016-08-06T14:39:51+00:00" + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", - "version": "1.1.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1969,7 +3044,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -1979,7 +3054,10 @@ "psr", "psr-3" ], - "time": "2018-11-20T15:27:04+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/2.0.0" + }, + "time": "2021-07-14T16:41:46+00:00" }, { "name": "ralouphie/getallheaders", @@ -2019,32 +3097,148 @@ } ], "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": "sebastian/cli-parser", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2064,34 +3258,44 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2104,6 +3308,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -2115,10 +3323,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -2128,33 +3332,100 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2167,13 +3438,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -2184,32 +3455,45 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2234,34 +3518,44 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2287,80 +3581,54 @@ "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": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2019-09-14T09:02:43+00:00" - }, - { - "name": "sebastian/finder-facade", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", - "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", - "shasum": "" - }, - "require": { - "symfony/finder": "~2.3|~3.0|~4.0", - "theseer/fdomdocument": "~1.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } ], - "authors": [ + "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", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + }, + "funding": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", - "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2017-11-18T17:31:49+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -2368,7 +3636,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2391,34 +3659,43 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:35:11+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.3", + "name": "sebastian/lines-of-code", + "version": "1.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -2433,37 +3710,50 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "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", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" }, { - "name": "sebastian/object-reflector", - "version": "1.1.1", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2481,39 +3771,44 @@ "email": "sebastian@phpunit.de" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "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", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "sebastian/phpcpd", - "version": "4.1.0", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "0d9afa762f2400de077b2192f4a9d127de0bb78e" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/0d9afa762f2400de077b2192f4a9d127de0bb78e", - "reference": "0d9afa762f2400de077b2192f4a9d127de0bb78e", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "ext-dom": "*", - "php": "^7.1", - "phpunit/php-timer": "^2.0", - "sebastian/finder-facade": "^1.1", - "sebastian/version": "^1.0|^2.0", - "symfony/console": "^2.7|^3.0|^4.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, - "bin": [ - "phpcpd" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2528,38 +3823,47 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "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", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Copy/Paste Detector (CPD) for PHP code.", - "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2018-09-17T17:17:27+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2572,44 +3876,57 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "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": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2629,29 +3946,41 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "sebastian/type", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2670,94 +3999,108 @@ "role": "lead" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "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", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" }, { - "name": "sensiolabs/security-checker", - "version": "v5.0.3", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/46be3f58adac13084497961e10eed9a7fb4d44d1", - "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "composer/ca-bundle": "^1.0", - "php": ">=5.5.9", - "symfony/console": "~2.7|~3.0|~4.0" + "php": ">=7.3" }, - "bin": [ - "security-checker" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "SensioLabs\\Security\\": "SensioLabs/Security" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A security checker for your composer.lock", - "time": "2018-12-19T17:14:59+00:00" + "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", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "symfony/config", - "version": "v4.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "07d49c0f823e0bc367c6d84e35b61419188a5ece" + "reference": "db4fc45c24e0c3e2198e68ada9d7f90daa1f97e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/07d49c0f823e0bc367c6d84e35b61419188a5ece", - "reference": "07d49c0f823e0bc367c6d84e35b61419188a5ece", + "url": "https://api.github.com/repos/symfony/config/zipball/db4fc45c24e0c3e2198e68ada9d7f90daa1f97e3", + "reference": "db4fc45c24e0c3e2198e68ada9d7f90daa1f97e3", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/filesystem": "~3.4|~4.0", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^5.4|^6.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php81": "^1.22" }, "conflict": { - "symfony/finder": "<3.4" + "symfony/finder": "<4.4" }, "require-dev": { - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/messenger": "~4.1", - "symfony/yaml": "~3.4|~4.0" + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Config\\": "" @@ -2780,46 +4123,66 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Config Component", + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", - "time": "2019-08-26T08:26:39+00:00" + "support": { + "source": "https://github.com/symfony/config/tree/v6.0.19" + }, + "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": "2023-01-09T04:36:00+00:00" }, { "name": "symfony/console", - "version": "v4.3.4", + "version": "v4.4.49", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "de63799239b3881b8a08f8481b22348f77ed7b36" + "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/de63799239b3881b8a08f8481b22348f77ed7b36", - "reference": "de63799239b3881b8a08f8481b22348f77ed7b36", + "url": "https://api.github.com/repos/symfony/console/zipball/33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", + "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1" + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2" }, "conflict": { + "psr/log": ">=3", "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3", + "symfony/event-dispatcher": "<4.3|>=5", + "symfony/lock": "<4.4", "symfony/process": "<3.3" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", + "psr/log": "^1|^2", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", "symfony/event-dispatcher": "^4.3", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/var-dumper": "^4.3" + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/var-dumper": "^4.3|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -2828,11 +4191,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -2855,43 +4213,64 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "time": "2019-08-26T08:26:39+00:00" + "support": { + "source": "https://github.com/symfony/console/tree/v4.4.49" + }, + "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": "2022-11-05T17:10:16+00:00" }, { "name": "symfony/dependency-injection", - "version": "v4.3.4", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "d3ad14b66ac773ba6123622eb9b5b010165fe3d9" + "reference": "408b33326496030c201b8051b003e9e8cdb2efc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d3ad14b66ac773ba6123622eb9b5b010165fe3d9", - "reference": "d3ad14b66ac773ba6123622eb9b5b010165fe3d9", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/408b33326496030c201b8051b003e9e8cdb2efc9", + "reference": "408b33326496030c201b8051b003e9e8cdb2efc9", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/container": "^1.0", - "symfony/service-contracts": "^1.1.6" + "php": ">=7.2.5", + "psr/container": "^1.1.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22", + "symfony/service-contracts": "^1.1.6|^2" }, "conflict": { - "symfony/config": "<4.3", - "symfony/finder": "<3.4", - "symfony/proxy-manager-bridge": "<3.4", - "symfony/yaml": "<3.4" + "ext-psr": "<1.1|>=2", + "symfony/config": "<5.3", + "symfony/finder": "<4.4", + "symfony/proxy-manager-bridge": "<4.4", + "symfony/yaml": "<4.4.26" }, "provide": { "psr/container-implementation": "1.0", - "symfony/service-implementation": "1.0" + "symfony/service-implementation": "1.0|2.0" }, "require-dev": { - "symfony/config": "^4.3", - "symfony/expression-language": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" + "symfony/config": "^5.3|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4.26|^5.0|^6.0" }, "suggest": { "symfony/config": "", @@ -2901,11 +4280,6 @@ "symfony/yaml": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" @@ -2928,36 +4302,115 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony DependencyInjection Component", + "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", - "time": "2019-08-26T16:27:33+00:00" + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.40" + }, + "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-05-31T14:33:22+00:00" }, { - "name": "symfony/dotenv", - "version": "v4.3.4", + "name": "symfony/deprecation-contracts", + "version": "v2.5.3", "source": { "type": "git", - "url": "https://github.com/symfony/dotenv.git", - "reference": "1785b18148a016b8f4e6a612291188d568e1f9cd" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/1785b18148a016b8f4e6a612291188d568e1f9cd", - "reference": "1785b18148a016b8f4e6a612291188d568e1f9cd", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { - "php": "^7.1.3" - }, - "require-dev": { - "symfony/process": "~3.4|~4.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "2.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/v2.5.3" + }, + "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": "2023-01-24T14:02:46+00:00" + }, + { + "name": "symfony/dotenv", + "version": "v4.4.37", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "fcedd6d382b3afc3e1e786aa4e4fc4cf06f564cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/fcedd6d382b3afc3e1e786aa4e4fc4cf06f564cf", + "reference": "fcedd6d382b3afc3e1e786aa4e4fc4cf06f564cf", + "shasum": "" + }, + "require": { + "php": ">=7.1.3" + }, + "require-dev": { + "symfony/process": "^3.4.2|^4.0|^5.0" }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Dotenv\\": "" @@ -2987,25 +4440,43 @@ "env", "environment" ], - "time": "2019-08-03T21:50:52+00:00" + "support": { + "source": "https://github.com/symfony/dotenv/tree/v4.4.37" + }, + "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": "2022-01-02T09:41:36+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.3.4", + "version": "v4.4.44", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2" + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2", - "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1e866e9e5c1b22168e0ce5f0b467f19bba61266a", + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" + "php": ">=7.1.3", + "symfony/event-dispatcher-contracts": "^1.1", + "symfony/polyfill-php80": "^1.16" }, "conflict": { "symfony/dependency-injection": "<3.4" @@ -3015,24 +4486,20 @@ "symfony/event-dispatcher-implementation": "1.1" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "^3.4|^4.0", - "symfony/service-contracts": "^1.1", - "symfony/stopwatch": "~3.4|~4.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "~3.4|~4.4", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/dependency-injection": "", "symfony/http-kernel": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" @@ -3055,26 +4522,43 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", - "time": "2019-08-26T08:55:16+00:00" + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.44" + }, + "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": "2022-07-20T09:59:04+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.5", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c61766f4440ca687de1084a5c00b08e167a2575c" + "reference": "761c8b8387cfe5f8026594a75fdf0a4e83ba6974" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c", - "reference": "c61766f4440ca687de1084a5c00b08e167a2575c", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/761c8b8387cfe5f8026594a75fdf0a4e83ba6974", + "reference": "761c8b8387cfe5f8026594a75fdf0a4e83ba6974", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "suggest": { "psr/event-dispatcher": "", @@ -3083,7 +4567,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -3115,32 +4603,45 @@ "interoperability", "standards" ], - "time": "2019-06-20T06:46:26+00:00" + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.10.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": "2022-07-20T09:59:04+00:00" }, { "name": "symfony/filesystem", - "version": "v4.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263" + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/9abbb7ef96a51f4d7e69627bc6f63307994e4263", - "reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.0.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" @@ -3159,37 +4660,49 @@ "email": "fabien@symfony.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "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/v6.0.19" + }, + "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" } ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2019-08-20T14:07:54+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/finder", - "version": "v4.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2" + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2", - "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2", + "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=8.0.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -3212,33 +4725,46 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", - "time": "2019-08-14T12:26:46+00:00" + "support": { + "source": "https://github.com/symfony/finder/tree/v6.0.19" + }, + "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": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "81c2e120522a42f623233968244baebd6b36cb6a" + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/81c2e120522a42f623233968244baebd6b36cb6a", - "reference": "81c2e120522a42f623233968244baebd6b36cb6a", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" @@ -3261,48 +4787,69 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony OptionsResolver Component", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", "keywords": [ "config", "configuration", "options" ], - "time": "2019-08-08T09:29:19+00:00" + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" + }, + "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": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.12-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3326,41 +4873,62 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.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-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.12.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.12-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3385,39 +4953,56 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.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-06-19T12:30:46+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.12.0", + "name": "symfony/polyfill-php73", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "54b4c428a0054e254223797d2713c31e08610831" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/54b4c428a0054e254223797d2713c31e08610831", - "reference": "54b4c428a0054e254223797d2713c31e08610831", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/ec444d3f3f6505bb28d11afa41e75faadebc10a1", + "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.12-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3436,7 +5021,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -3444,37 +5029,58 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.30.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-05-31T15:07:36+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.12.0", + "name": "symfony/polyfill-php80", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "04ce3335667451138df4307d6a9b61565560199e" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", - "reference": "04ce3335667451138df4307d6a9b61565560199e", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.12-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3482,6 +5088,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -3491,7 +5101,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -3499,38 +5109,56 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.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-05-31T15:07:36+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.12.0", + "name": "symfony/polyfill-php81", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.12-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3549,7 +5177,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -3557,31 +5185,43 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.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-06-19T12:30:46+00:00" }, { "name": "symfony/process", - "version": "v4.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a" + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e89969c00d762349f078db1128506f7f3dcc0d4a", - "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a", + "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=8.0.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -3604,27 +5244,48 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "time": "2019-08-26T08:26:39+00:00" + "support": { + "source": "https://github.com/symfony/process/tree/v6.0.19" + }, + "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": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.6", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3", - "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/container": "^1.0" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -3632,7 +5293,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -3664,32 +5329,44 @@ "interoperability", "standards" ], - "time": "2019-08-20T14:44:19+00:00" + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" + }, + "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": "2023-04-21T15:04:16+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71" + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/1e4ff456bd625be5032fac9be4294e60442e9b71", - "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/service-contracts": "^1.0" + "php": ">=8.0.2", + "symfony/service-contracts": "^1|^2|^3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" @@ -3712,43 +5389,59 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Stopwatch Component", + "description": "Provides a way to profile code", "homepage": "https://symfony.com", - "time": "2019-08-07T11:52:19+00:00" + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v6.0.19" + }, + "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": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/yaml", - "version": "v4.3.4", + "version": "v5.3.14", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686" + "reference": "c441e9d2e340642ac8b951b753dea962d55b669d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", - "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c441e9d2e340642ac8b951b753dea962d55b669d", + "reference": "c441e9d2e340642ac8b951b753dea962d55b669d", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/console": "<3.4" + "symfony/console": "<4.4" }, "require-dev": { - "symfony/console": "~3.4|~4.0" + "symfony/console": "^4.4|^5.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" }, + "bin": [ + "Resources/bin/yaml-lint" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" @@ -3771,28 +5464,46 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", - "time": "2019-08-20T14:27:59+00:00" + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.3.14" + }, + "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": "2022-01-26T16:05:39+00:00" }, { - "name": "theseer/fdomdocument", - "version": "1.6.6", + "name": "theseer/tokenizer", + "version": "1.2.3", "source": { "type": "git", - "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/6e8203e40a32a9c770bcb62fe37e68b948da6dca", - "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { "ext-dom": "*", - "lib-libxml": "*", - "php": ">=5.3.3" + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -3807,79 +5518,160 @@ "authors": [ { "name": "Arne Blankerts", - "role": "lead", - "email": "arne@blankerts.de" + "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" } ], - "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", - "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2017-06-30T11:53:12+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.1.3", + "name": "vimeo/psalm", + "version": "4.30.0", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "url": "https://github.com/vimeo/psalm.git", + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", "shasum": "" }, "require": { + "amphp/amp": "^2.4.2", + "amphp/byte-stream": "^1.5", + "composer/package-versions-deprecated": "^1.8.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-ctype": "*", "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" + "felixfbecker/advanced-json-rpc": "^3.0.3", + "felixfbecker/language-server-protocol": "^1.5", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^4.13", + "openlss/lib-array2xml": "^1.0", + "php": "^7.1|^8", + "sebastian/diff": "^3.0 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", + "webmozart/path-util": "^2.3" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "brianium/paratest": "^4.0||^6.0", + "ext-curl": "*", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpdocumentor/reflection-docblock": "^5", + "phpmyadmin/sql-parser": "5.1.0||dev-master", + "phpspec/prophecy": ">=1.9.0", + "phpstan/phpdoc-parser": "1.2.* || 1.6.4", + "phpunit/phpunit": "^9.0", + "psalm/plugin-phpunit": "^0.16", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.3 || ^5.0 || ^6.0", + "weirdan/prophecy-shim": "^1.0 || ^2.0" }, + "suggest": { + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev", + "dev-3.x": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions.php", + "src/spl_object_id.php" + ], + "psr-4": { + "Psalm\\": "src/Psalm/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "name": "Matthew Brown" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php" + ], + "support": { + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/4.30.0" + }, + "time": "2022-11-06T20:37:08+00:00" }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -3903,7 +5695,62 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "abandoned": "symfony/filesystem", + "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], @@ -3912,9 +5759,10 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.0", + "php": ">=8.0", "ext-curl": "*", "ext-json": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.6.0" } diff --git a/examples/.env.example b/examples/.env.example new file mode 100644 index 0000000..89bdb54 --- /dev/null +++ b/examples/.env.example @@ -0,0 +1,3 @@ +TRUSTEDSHOPS_TSID="" +TRUSTEDSHOPS_LOGIN="" +TRUSTEDSHOPS_PASS="" \ No newline at end of file diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..05b471d --- /dev/null +++ b/examples/README.md @@ -0,0 +1,42 @@ +# Examples for Trusted Shops API SDK for PHP + +Note that everything is done from the root of the project and not from the examples folder. + +## How to run the examples + +1. Install the dependencies with Composer: + +```bash +$ composer install +``` + +2. Copy the `.env.example` file in the examples folder as `.env` + +```bash +$ cp examples/.env.example examples/.env +``` + +3. Fill the `.env` file with correct information + + - `TRUSTEDSHOPS_TSID` is your TrustedShops ID + - `TRUSTEDSHOPS_LOGIN` is your username for TrustedShops + - `TRUSTEDSHOPS_PASS` is the password tied to your username + +4. Run the PHP built-in web server. Supply the `-t` option to this directory: + +```bash +$ php -s localhost:8000 -t examples/ +``` + +5. Point your browser to the host and port you specified. + +## How does the TrustedShops API works + +The TrustedShops API has 2 APIs : + +- Common +- Restricted + +The Common API is a public API that doesn't require any credentials. + +The Restricted API is a private API that require your credentials, the examples for this API will only work if all the variables in the .env file were filled. diff --git a/examples/common/base.php b/examples/common/base.php new file mode 100644 index 0000000..923c471 --- /dev/null +++ b/examples/common/base.php @@ -0,0 +1,20 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/quality'); + +?> + + diff --git a/examples/common/reviews/get_reviews.php b/examples/common/reviews/get_reviews.php new file mode 100644 index 0000000..cf55f56 --- /dev/null +++ b/examples/common/reviews/get_reviews.php @@ -0,0 +1,21 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviews'); + +?> + + diff --git a/examples/common/reviews_comments/get_reviews_comments.php b/examples/common/reviews_comments/get_reviews_comments.php new file mode 100644 index 0000000..59fdd7c --- /dev/null +++ b/examples/common/reviews_comments/get_reviews_comments.php @@ -0,0 +1,21 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviews/3093400568a676f378d191487a4ed7f5/comments/12345'); +?> + + + diff --git a/examples/common/shops/get_shops_by_id.php b/examples/common/shops/get_shops_by_id.php new file mode 100644 index 0000000..c8241fd --- /dev/null +++ b/examples/common/shops/get_shops_by_id.php @@ -0,0 +1,22 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID']); + +?> + + diff --git a/examples/common/shops/get_shops_by_url.php b/examples/common/shops/get_shops_by_url.php new file mode 100644 index 0000000..a3b1044 --- /dev/null +++ b/examples/common/shops/get_shops_by_url.php @@ -0,0 +1,20 @@ +get('shops', ['url' => 'demoshop.trustedshops.com']); + +?> + + diff --git a/examples/index.php b/examples/index.php new file mode 100644 index 0000000..029d46e --- /dev/null +++ b/examples/index.php @@ -0,0 +1,49 @@ + + + + To view this example, run the following command from the root directory of this repository: + + php -S localhost:8000 -t examples/ + + And then browse to "localhost:8000" in your web browser + + + + + +

Common API

+ + + +

Restricted API

+ + + + diff --git a/examples/restricted/base.php b/examples/restricted/base.php new file mode 100644 index 0000000..345cf24 --- /dev/null +++ b/examples/restricted/base.php @@ -0,0 +1,17 @@ +setApiCredentials($envs['TRUSTEDSHOPS_LOGIN'], $envs['TRUSTEDSHOPS_PASS']); + + return $ts_restricted; +} diff --git a/examples/restricted/benchmarks/get_benchmarks.php b/examples/restricted/benchmarks/get_benchmarks.php new file mode 100644 index 0000000..2990aac --- /dev/null +++ b/examples/restricted/benchmarks/get_benchmarks.php @@ -0,0 +1,21 @@ +get('shops/benchmarks', ['tsId' => $envs['TRUSTEDSHOPS_ID']]); + +?> + + \ No newline at end of file diff --git a/examples/restricted/quality_indicators/get_quality.php b/examples/restricted/quality_indicators/get_quality.php new file mode 100644 index 0000000..99e33a8 --- /dev/null +++ b/examples/restricted/quality_indicators/get_quality.php @@ -0,0 +1,22 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/quality'); + +?> + + \ No newline at end of file diff --git a/examples/restricted/quality_indicators/get_quality_complaints.php b/examples/restricted/quality_indicators/get_quality_complaints.php new file mode 100644 index 0000000..13aa26c --- /dev/null +++ b/examples/restricted/quality_indicators/get_quality_complaints.php @@ -0,0 +1,22 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/quality/complaints'); + +?> + + \ No newline at end of file diff --git a/examples/restricted/quality_indicators/get_quality_reviews.php b/examples/restricted/quality_indicators/get_quality_reviews.php new file mode 100644 index 0000000..cc65f62 --- /dev/null +++ b/examples/restricted/quality_indicators/get_quality_reviews.php @@ -0,0 +1,22 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/quality/reviews'); + +?> + + \ No newline at end of file diff --git a/examples/restricted/retailer_shops/get_retailers.php b/examples/restricted/retailer_shops/get_retailers.php new file mode 100644 index 0000000..1c5b3eb --- /dev/null +++ b/examples/restricted/retailer_shops/get_retailers.php @@ -0,0 +1,21 @@ +get('retailers/shops'); + +?> + + \ No newline at end of file diff --git a/examples/restricted/reviews/get_reviews.php b/examples/restricted/reviews/get_reviews.php new file mode 100644 index 0000000..76c9c7f --- /dev/null +++ b/examples/restricted/reviews/get_reviews.php @@ -0,0 +1,21 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviews'); + +?> + + \ No newline at end of file diff --git a/examples/restricted/reviews_collector/post_review_collector.php b/examples/restricted/reviews_collector/post_review_collector.php new file mode 100644 index 0000000..fcd24b6 --- /dev/null +++ b/examples/restricted/reviews_collector/post_review_collector.php @@ -0,0 +1,58 @@ +setTimezone(new \DateTimeZone('UTC')); + +$review_collector = $ts_restricted->post('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviewcollector', [ + 'reviewCollectorRequest' => [ + 'reviewCollectorReviewRequests' => [ + [ + 'reminderDate' => '', + 'template' => [ + 'variant' => 'ReviewCollectorReviewRquestVariantEnum', + 'includeWidget' => false, + ], + 'order' => [ + 'orderDate' => $now->format('Y-m-d'), + 'orderReference' => 'order-1', + 'products' => [ + [ + 'sku' => 'test', + 'name' => 'test', + 'gtin' => 'test', + 'mpn' => 'test', + 'brand' => 'test', + 'imageUrl' => 'test', + 'uuid' => 'test', + 'url' => 'test', + ], + ], + 'currency' => 'CHF', + 'estimatedDeliveryDate' => $now->format('Y-m-d'), + ], + 'consumer' => [ + 'firstname' => 'John', + 'lastname' => 'Doe', + 'contact' => [ + 'email' => 'john.doe@email.com', + ], + ], + ], + ], + ], +]); + +?> + + diff --git a/examples/restricted/reviews_comments/get_reviews_comments.php b/examples/restricted/reviews_comments/get_reviews_comments.php new file mode 100644 index 0000000..46919a9 --- /dev/null +++ b/examples/restricted/reviews_comments/get_reviews_comments.php @@ -0,0 +1,21 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviews/3093400568a676f378d191487a4ed7f5/comments/12345'); +?> + + + diff --git a/examples/restricted/reviews_comments/post_reviews_comments.php b/examples/restricted/reviews_comments/post_reviews_comments.php new file mode 100644 index 0000000..3ad3e53 --- /dev/null +++ b/examples/restricted/reviews_comments/post_reviews_comments.php @@ -0,0 +1,24 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviews/3093400568a676f378d191487a4ed7f5/comments', [ + 'informBuyerForShopComment' => false, + 'comment' => 'Nunc iaculis venenatis duis at sodales dis vivamus sit aptent, euismod hac pharetra lorem magnis vestibulum urna quis, class volutpat ultricies proin netus nam dui convallis.', +]); +?> + + + diff --git a/examples/restricted/reviews_comments/put_reviews_comments.php b/examples/restricted/reviews_comments/put_reviews_comments.php new file mode 100644 index 0000000..79ffe90 --- /dev/null +++ b/examples/restricted/reviews_comments/put_reviews_comments.php @@ -0,0 +1,24 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviews/3093400568a676f378d191487a4ed7f5/comments/12345', [ + 'informBuyerForShopComment' => false, + 'comment' => 'Nunc iaculis venenatis duis at sodales dis vivamus sit aptent, euismod hac pharetra lorem magnis vestibulum urna quis, class volutpat ultricies proin netus nam dui convallis.', +]); +?> + + + diff --git a/examples/restricted/shops/get_shops.php b/examples/restricted/shops/get_shops.php new file mode 100644 index 0000000..2e0954c --- /dev/null +++ b/examples/restricted/shops/get_shops.php @@ -0,0 +1,21 @@ +get('shops/'.$envs['TRUSTEDSHOPS_ID']); + +?> + + \ No newline at end of file diff --git a/examples/restricted/trigger/post_reviews_trigger.php b/examples/restricted/trigger/post_reviews_trigger.php new file mode 100644 index 0000000..96041ef --- /dev/null +++ b/examples/restricted/trigger/post_reviews_trigger.php @@ -0,0 +1,50 @@ +setTimezone(new \DateTimeZone('UTC')); + +$review = $ts_restricted->post('shops/'.$envs['TRUSTEDSHOPS_ID'].'/reviews/trigger.json', [ + 'reviewCollectorRequest' => [ + 'reviewCollectorReviewRequests' => [ + [ + 'reminderDate' => $now->format('Y-m-d'), + 'template' => [ + 'variant' => 'test', + 'includeWidget' => 'true', + ], + 'order' => [ + 'orderDate' => $now->format('Y-m-d'), + // TrustedShops has a limitation of at least 2 chars for + // orderReference. To bypass this limitation pass, we prefix + // every reference with "order-". + 'orderReference' => 'order-1', + 'currency' => 'CHF', + 'estimatedDeliveryDate' => $now->format('Y-m-d'), + 'products' => [], + ], + 'consumer' => [ + 'firstname' => 'John', + 'lastname' => 'Doe', + 'contact' => [ + 'email' => 'john.doe@email.com', + ], + ], + ], + ], + ], +]); + +?> + + diff --git a/examples/styles/style.css b/examples/styles/style.css new file mode 100644 index 0000000..83fa0f9 --- /dev/null +++ b/examples/styles/style.css @@ -0,0 +1,117 @@ +/* + * Copyright 2013 Google Inc. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + body { + font-family: Arial,sans-serif; + margin: auto; + padding: 10px; +} + +.box { + border: .5em solid #E3E9FF; + -webkit-box-orient: vertical; + -webkit-box-align: center; + + -moz-box-orient: vertical; + -moz-box-align: center; + + display: block; + box-orient: vertical; + box-align: center; + + width: 400px; + height: auto; + + margin: auto; + padding: 10px; + overflow: scroll; +} + +.request { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} + +.result { + -webkit-box-flex: 2; + -moz-box-flex: 2; + box-flex: 2; +} + +header { + color:#000; + padding:2px 5px; + font-size:100%; + margin: auto; + text-align: center +} + +header h1.logo { + margin:6px 0; + padding:0; + font-size:24px; + line-height:20px; + text-align: center +} + +.login { + font-size: 200%; + display: block; + margin: auto; + cursor: pointer; + text-align: center; + font-weight: bold; + color: #2779AA; + line-height: normal; +} + +.logout { + font-weight: normal; + margin-top: 0; +} + +.shortened { + overflow: scroll; +} + +.url { + color: #019; + font-size: 100%; + vertical-align: middle; + padding: 1px; + background-color: white; + border: 1px inset; + cursor: auto; + margin: 0; + text-indent: 0; + display: inline-block; +} + +pre.code { + padding: 10px; + border: .5em solid #E3E9FF; + margin: 10px; + height: 400px; + overflow: scroll; +} + +.warn { + color: red; +} + +.api-key { + background-color:#DDD; +} \ No newline at end of file diff --git a/examples/templates/base.php b/examples/templates/base.php new file mode 100644 index 0000000..00bc8fd --- /dev/null +++ b/examples/templates/base.php @@ -0,0 +1,79 @@ +load($env); +} else { + throw new \RuntimeException('You need to define a .env file.'); +} + +function getEnvVariables() +{ + return [ + 'TRUSTEDSHOPS_ID' => getenv('TRUSTEDSHOPS_TSID'), + 'TRUSTEDSHOPS_LOGIN' => getenv('TRUSTEDSHOPS_LOGIN'), + 'TRUSTEDSHOPS_PASS' => getenv('TRUSTEDSHOPS_PASS'), + ]; +} + +/* Ad hoc functions to make the examples marginally prettier.*/ +function isWebRequest() +{ + return isset($_SERVER['HTTP_USER_AGENT']); +} + +function pageHeader($title) +{ + $ret = ' + + + '.$title." + + + \n"; + if ('/index.php' != $_SERVER['PHP_SELF']) { + $ret .= "

Back

"; + } + $ret .= '

'.$title.'

'; + + // Start the session (for storing access tokens and things) + if (!headers_sent()) { + session_start(); + } + + return $ret; +} + +function pageFooter($file = null) +{ + $ret = ''; + if ($file) { + $ret .= '

Code:

'; + $ret .= "
";
+        $ret .= htmlspecialchars(file_get_contents($file));
+        $ret .= '
'; + } + $ret .= ''; + + return $ret; +} + +function pageContent($response) +{ + echo "
", var_dump($response), '
'; +} + +function renderResponse($title, $response) +{ + echo pageHeader($title); + echo pageContent($response); + echo pageFooter(); +} diff --git a/phpmd.xml b/phpmd.xml index 8f02a97..7a3adbf 100644 --- a/phpmd.xml +++ b/phpmd.xml @@ -28,7 +28,7 @@ - + diff --git a/phpunit.xml b/phpunit.xml index ddb123b..ea12b99 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -20,4 +20,9 @@ src + + + + + diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..d1c0af3 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TrustedShops.php b/src/TrustedShops.php index bfb4f27..a55122a 100644 --- a/src/TrustedShops.php +++ b/src/TrustedShops.php @@ -2,408 +2,410 @@ namespace Antistatique\TrustedShops; -use RuntimeException; +use CurlHandle; use Exception; +use RuntimeException; /** * Super-simple, minimum abstraction TrustedShops API v2.x wrapper, in PHP. * TrustedShops API: https://api.trustedshops.com/ * TrustedShops API QA: https://api-qa.trustedshops.com/ - * This wrapper: https://github.com/antistatique/trustedshops-php-sdk - * + * This wrapper: https://github.com/antistatique/trustedshops-php-sdk. */ class TrustedShops { - - /** - * Default timeout limit for request in seconds. - * - * @var int - */ - const TIMEOUT = 10; - - /** - * TrustedShops allowed API scoop. - * - * @var string[] - */ - const ALLOWED_SCOOP = [ + /** + * Default timeout limit for request in seconds. + * + * @var int + */ + public const TIMEOUT = 10; + + /** + * TrustedShops allowed API scoop. + * + * @var string[] + */ + public const ALLOWED_SCOOP = [ 'public', 'restricted', ]; - /** - * The original URL for public & restricted API call. - * - * @var string - */ - const BASE_URL = 'https://.trustedshops.com/rest//'; - - /** - * The API dc used. - * - * @var string - */ - private $api_dc = 'api'; - - /** - * The API version used. - * - * @var string - */ - private $api_version = 'v2'; - - /** - * The API scoop. Choose from [public|restricted]. - * - * Then scoop will affect the available API calls. - * - * @var string - */ - private $api_scoop = 'public'; - - /** - * The base URL for public & restricted API call. - * - * @var string - */ - private $api_endpoint = ''; - - /** - * SSL Verification. - * - * Read before disabling: - * http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ - * - * @var bool - */ - public $verify_ssl = true; - - private $request_successful = FALSE; - private $last_error = ''; - private $last_response = array(); - private $last_request = array(); - - /** - * The API username credentials. - * - * @var string - */ - private $api_credentials_user; - - /** - * The API password credentials. - * - * @var string - */ - private $api_credentials_pass; - - /** - * Create a new instance. - * - * @param string $api_scoop - * The API range of call to be used. - * @param string $api_version - * The API version you use. - * @param string $api_dc - * The API dc of call to be used. - * - * @throws \Exception - */ - public function __construct($api_scoop = NULL, $api_version = NULL, $api_dc = NULL) - { - if (!function_exists('curl_init') || !function_exists('curl_setopt')) { - throw new RuntimeException("cURL support is required, but can't be found."); + /** + * The original URL for public & restricted API call. + * + * @var string + */ + public const BASE_URL = 'https://.trustedshops.com/rest//'; + + /** + * The API dc used. + * + * @var string + */ + private $api_dc = 'api'; + + /** + * The API version used. + * + * @var string + */ + private $api_version = 'v2'; + + /** + * The API scoop. Choose from [public|restricted]. + * + * Then scoop will affect the available API calls. + * + * @var string + */ + private $api_scoop = 'public'; + + /** + * The base URL for public & restricted API call. + * + * @var string + */ + private $api_endpoint = ''; + + /** + * SSL Verification. + * + * Read before disabling: + * http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ + */ + public bool $verify_ssl = true; + + private bool $request_successful = false; + private string $last_error = ''; + private array $last_response = []; + private array $last_request = []; + + /** + * The API username credentials. + */ + private ?string $api_credentials_user = null; + + /** + * The API password credentials. + */ + private ?string $api_credentials_pass = null; + + /** + * Create a new instance. + * + * @param ?string $api_scoop + * The API range of call to be used + * @param ?string $api_version + * The API version you use + * @param ?string $api_dc + * The API dc of call to be used + * + * @throws \Exception + */ + public function __construct(?string $api_scoop = null, ?string $api_version = null, ?string $api_dc = null) + { + if (!$this->isCurlAvailable()) { + throw new RuntimeException("cURL support is required, but can't be found."); + } + + if (null !== $api_scoop) { + $this->api_scoop = $api_scoop; + } + + if (null !== $api_version) { + $this->api_version = $api_version; + } + + if (null !== $api_dc) { + $this->api_dc = $api_dc; + } + + // Ensure the scoop is supported by TrustedShops. + if (!in_array($this->api_scoop, self::ALLOWED_SCOOP)) { + throw new RuntimeException(sprintf('Unsupported TrustedShops scoop "%s".', $this->api_scoop)); + } + + // Build the concrete api endpoint. + $this->setEndpoint($this->api_dc, $this->api_scoop, $this->api_version); + $this->last_response = ['headers' => null, 'body' => null]; + } + + /** + * Check if cURL is available. + */ + public function isCurlAvailable(): bool + { + return function_exists('curl_init') || function_exists('curl_setopt'); + } + + /** + * Set the concrete API endpoint. + * + * @param ?string $api_dc + * The API dc of call to be used + * @param ?string $api_scoop + * The API range of call to be used + * @param ?string $api_version + * The API version you use + * + * @return string + * The endpoint url + */ + public function setEndpoint(?string $api_dc = null, ?string $api_scoop = null, ?string $api_version = null): string + { + if (null !== $api_dc) { + $this->api_dc = $api_dc; + } + + if (null !== $api_scoop) { + $this->api_scoop = $api_scoop; + } + + if (null !== $api_version) { + $this->api_version = $api_version; + } + + // Reset the API endpoint to the original value. + $this->api_endpoint = self::BASE_URL; + + $this->api_endpoint = str_replace('', $this->api_dc, $this->api_endpoint); + $this->api_endpoint = str_replace('', $this->api_scoop, $this->api_endpoint); + $this->api_endpoint = str_replace('', $this->api_version, $this->api_endpoint); + + return $this->api_endpoint; } - if ($api_scoop !== null) { - $this->api_scoop = $api_scoop; + /** + * Get the concrete endpoint API. + * + * @return string + * The endpoint url + */ + public function getApiEndpoint(): string + { + return $this->api_endpoint; } - if ($api_version !== null) { - $this->api_version = $api_version; + /** + * Set the API username and password for restricted API calls. + + * + * @param string $username + * The TrustedShops username authorized for restricted API calls + * @param string $password + * The TrustedShops password authorized for restricted API calls + */ + public function setApiCredentials(string $username, string $password): void + { + $this->api_credentials_user = $username; + $this->api_credentials_pass = $password; } - if ($api_dc !== null) { - $this->api_dc = $api_dc; + /** + * Was the last request successful? + * + * @return bool + * True for success, FALSE for failure + */ + public function success(): bool + { + return $this->request_successful; } - // Ensure the scoop is supported by TrustedShops. - if (!in_array($this->api_scoop, self::ALLOWED_SCOOP)) { - throw new RuntimeException(sprintf('Unsupported TrustedShops scoop "%s".', $this->api_scoop)); + /** + * Get the last error returned by either the network transport, or by the API. + * + * If something didn't work, this contain the string describing the problem. + * + * @return string|bool + * Describing the error + */ + public function getLastError() + { + return $this->last_error ?: false; } - // Build the concrete api endpoint. - $this->setEndpoint($this->api_dc, $this->api_scoop, $this->api_version); - $this->last_response = ['headers' => null, 'body' => null]; - } - - /** - * Set the concrete API endpoint. - * - * @param string $api_dc - * The API dc of call to be used. - * @param string $api_scoop - * The API range of call to be used. - * @param string $api_version - * The API version you use. - * - * @return string - * The endpoint url. - */ - public function setEndpoint($api_dc = NULL, $api_scoop = NULL, $api_version = NULL) - { - if ($api_dc !== null) { - $this->api_dc = $api_dc; + /** + * Get an array containing the HTTP headers and the body of the API response. + * + * @return array + * Assoc array with keys 'headers' and 'body' + */ + public function getLastResponse(): array + { + return $this->last_response; } - if ($api_scoop !== null) { - $this->api_scoop = $api_scoop; + /** + * Get an array containing the HTTP headers and the body of the API request. + * + * @return array + * Assoc array + */ + public function getLastRequest(): array + { + return $this->last_request; } - if ($api_version !== null) { - $this->api_version = $api_version; + /** + * Make an HTTP DELETE request - for deleting data. + * + * @param string $method + * URL of the API request method + * @param array $args + * Assoc array of arguments (if any) + * @param int $timeout + * Timeout limit for request in seconds + * + * @return array|bool + * A decoded array of result or an boolean on unattended response + * + * @throws \Exception + */ + public function delete(string $method, array $args = [], int $timeout = self::TIMEOUT) + { + return $this->makeRequest('delete', $method, $args, $timeout); } - // Reset the API endpoint to the original value. - $this->api_endpoint = self::BASE_URL; - - $this->api_endpoint = str_replace('', $this->api_dc, $this->api_endpoint); - $this->api_endpoint = str_replace('', $this->api_scoop, $this->api_endpoint); - $this->api_endpoint = str_replace('', $this->api_version, $this->api_endpoint); - - return $this->api_endpoint; - } - - /** - * Get the concrete endpoint API. - * - * @return string - * The endpoint url. - */ - public function getApiEndpoint() - { - return $this->api_endpoint; - } - - /** - * Set the API username and password for restricted API calls. - - * @param string $username - * The TrustedShops username authorized for restricted API calls. - * @param string $password - * The TrustedShops password authorized for restricted API calls. - */ - public function setApiCredentials($username, $password) - { - $this->api_credentials_user = $username; - $this->api_credentials_pass = $password; - } - - /** - * Was the last request successful? - * - * @return bool - * True for success, FALSE for failure. - */ - public function success() - { - return $this->request_successful; - } - - /** - * Get the last error returned by either the network transport, or by the API. - * - * If something didn't work, this contain the string describing the problem. - * - * @return string|bool - * Describing the error. - */ - public function getLastError() - { - return $this->last_error ?: FALSE; - } - - /** - * Get an array containing the HTTP headers and the body of the API response. - * - * @return array - * Assoc array with keys 'headers' and 'body'. - */ - public function getLastResponse() - { - return $this->last_response; - } - - /** - * Get an array containing the HTTP headers and the body of the API request. - * - * @return array - * Assoc array. - */ - public function getLastRequest() - { - return $this->last_request; - } - - /** - * Make an HTTP DELETE request - for deleting data. - * - * @param string $method - * URL of the API request method. - * @param array $args - * Assoc array of arguments (if any). - * @param int $timeout - * Timeout limit for request in seconds. - * - * @return array|bool - * A decoded array of result or an boolean on unattended response. - * - * @throws \Exception - */ - public function delete($method, $args = array(), $timeout = self::TIMEOUT) - { - return $this->makeRequest('delete', $method, $args, $timeout); - } - - /** - * Make an HTTP GET request - for retrieving data. - * - * @param string $method - * URL of the API request method. - * @param array $args - * Assoc array of arguments (usually your data). - * @param int $timeout - * Timeout limit for request in seconds. - * - * @return array|bool - * A decoded array of result or an boolean on unattended response. - * - * @throws \Exception - */ - public function get($method, $args = array(), $timeout = self::TIMEOUT) - { - return $this->makeRequest('get', $method, $args, $timeout); - } - - /** - * Make an HTTP PATCH request - for performing partial updates. - * - * @param string $method - * URL of the API request method. - * @param array $args - * Assoc array of arguments (usually your data). - * @param int $timeout - * Timeout limit for request in seconds. - * - * @return array|bool - * A decoded array of result or an boolean on unattended response. - * - * @throws \Exception - */ - public function patch($method, $args = array(), $timeout = self::TIMEOUT) - { - return $this->makeRequest('patch', $method, $args, $timeout); - } - - /** - * Make an HTTP POST request - for creating and updating items. - * - * @param string $method - * URL of the API request method. - * @param array $args - * Assoc array of arguments (usually your data). - * @param int $timeout - * Timeout limit for request in seconds. - * - * @return array|bool - * A decoded array of result or an boolean on unattended response. - * - * @throws \Exception - */ - public function post($method, $args = array(), $timeout = self::TIMEOUT) - { - return $this->makeRequest('post', $method, $args, $timeout); - } - - /** - * Make an HTTP PUT request - for creating new items - * - * @param string $method - * URL of the API request method. - * @param array $args - * Assoc array of arguments (usually your data) - * @param int $timeout - * Timeout limit for request in seconds - * - * @return array|bool - * A decoded array of result or an boolean on unattended response. - * - * @throws \Exception - */ - public function put($method, $args = array(), $timeout = self::TIMEOUT) - { - return $this->makeRequest('put', $method, $args, $timeout); - } - - /** - * Performs the underlying HTTP request. Not very exciting. - * - * @param string $http_verb - * The HTTP verb to use: get, post, put, patch, delete. - * @param string $method - * The API method to be called. - * @param array $args - * Assoc array of parameters to be passed. - * @param int $timeout - * Timeout limit for request in seconds. - * - * @return array|bool - * A decoded array of result or an boolean on unattended response. - * - * @throws \Exception - */ - protected function makeRequest($http_verb, $method, $args = array(), $timeout = self::TIMEOUT) - { - $url = $this->api_endpoint . '/' . $method; - - $response = $this->prepareStateForRequest($http_verb, $method, $url, $timeout); - - $httpHeader = array( - 'Accept: application/json', - 'Content-Type: application/json', - // TrustedShops needs the X-Requested-With header to works properly. - 'X-Requested-With: XMLHttpRequest' - ); - - if (isset($args['language'])) { - $httpHeader[] = 'Accept-Language: ' . $args['language']; + /** + * Make an HTTP GET request - for retrieving data. + * + * @param string $method + * URL of the API request method + * @param array $args + * Assoc array of arguments (usually your data) + * @param int $timeout + * Timeout limit for request in seconds + * + * @return array|bool + * A decoded array of result or an boolean on unattended response + * + * @throws \Exception + */ + public function get(string $method, array $args = [], int $timeout = self::TIMEOUT) + { + return $this->makeRequest('get', $method, $args, $timeout); } - if ($http_verb === 'put') { - $httpHeader[] = 'Allow: PUT, PATCH, POST'; + /** + * Make an HTTP PATCH request - for performing partial updates. + * + * @param string $method + * URL of the API request method + * @param array $args + * Assoc array of arguments (usually your data) + * @param int $timeout + * Timeout limit for request in seconds + * + * @return array|bool + * A decoded array of result or an boolean on unattended response + * + * @throws \Exception + */ + public function patch(string $method, array $args = [], int $timeout = self::TIMEOUT) + { + return $this->makeRequest('patch', $method, $args, $timeout); } - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeader); - curl_setopt($curl, CURLOPT_USERAGENT, 'Antistatique/TrustedShops-PHP-SDK (github.com/antistatique/trustedshops-php-sdk)'); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - curl_setopt($curl, CURLOPT_VERBOSE, true); - curl_setopt($curl, CURLOPT_HEADER, true); - curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verify_ssl); - curl_setopt($curl, CURLOPT_ENCODING, ''); - curl_setopt($curl, CURLINFO_HEADER_OUT, true); - - // Set credentials when given. - if ($this->api_credentials_user && $this->api_credentials_pass) { - curl_setopt($curl, CURLOPT_USERPWD, $this->api_credentials_user . ':' . $this->api_credentials_pass); - curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); + /** + * Make an HTTP POST request - for creating and updating items. + * + * @param string $method + * URL of the API request method + * @param array $args + * Assoc array of arguments (usually your data) + * @param int $timeout + * Timeout limit for request in seconds + * + * @return array|bool + * A decoded array of result or an boolean on unattended response + * + * @throws \Exception + */ + public function post(string $method, array $args = [], int $timeout = self::TIMEOUT) + { + return $this->makeRequest('post', $method, $args, $timeout); } - switch ($http_verb) { + /** + * Make an HTTP PUT request - for creating new items. + * + * @param string $method + * URL of the API request method + * @param array $args + * Assoc array of arguments (usually your data) + * @param int $timeout + * Timeout limit for request in seconds + * + * @return array|bool + * A decoded array of result or an boolean on unattended response + * + * @throws \Exception + */ + public function put(string $method, array $args = [], int $timeout = self::TIMEOUT) + { + return $this->makeRequest('put', $method, $args, $timeout); + } + + /** + * Performs the underlying HTTP request. Not very exciting. + * + * @param string $http_verb + * The HTTP verb to use: get, post, put, patch, delete + * @param string $method + * The API method to be called + * @param array $args + * Assoc array of parameters to be passed + * @param int $timeout + * Timeout limit for request in seconds + * + * @return array|bool + * A decoded array of result or an boolean on unattended response + * + * @throws \Exception + */ + protected function makeRequest(string $http_verb, string $method, array $args = [], int $timeout = self::TIMEOUT) + { + $url = $this->api_endpoint.'/'.$method; + + $response = $this->prepareStateForRequest($http_verb, $method, $url, $timeout); + + $httpHeader = [ + 'Accept: application/json', + 'Content-Type: application/json', + // TrustedShops needs the X-Requested-With header to works properly. + 'X-Requested-With: XMLHttpRequest', + ]; + + if (isset($args['language'])) { + $httpHeader[] = 'Accept-Language: '.(string) $args['language']; + } + + if ('put' === $http_verb) { + $httpHeader[] = 'Allow: PUT, PATCH, POST'; + } + + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeader); + curl_setopt($curl, CURLOPT_USERAGENT, 'Antistatique/TrustedShops-PHP-SDK (github.com/antistatique/trustedshops-php-sdk)'); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curl, CURLOPT_VERBOSE, true); + curl_setopt($curl, CURLOPT_HEADER, true); + curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verify_ssl); + curl_setopt($curl, CURLOPT_ENCODING, ''); + curl_setopt($curl, CURLINFO_HEADER_OUT, true); + + // Set credentials when given. + if ($this->api_credentials_user && $this->api_credentials_pass) { + curl_setopt($curl, CURLOPT_USERPWD, $this->api_credentials_user.':'.$this->api_credentials_pass); + curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); + } + + switch ($http_verb) { case 'post': curl_setopt($curl, CURLOPT_POST, true); $this->attachRequestPayload($curl, $args); @@ -411,7 +413,7 @@ protected function makeRequest($http_verb, $method, $args = array(), $timeout = case 'get': $query = http_build_query($args, '', '&'); - curl_setopt($curl, CURLOPT_URL, $url . '?' . $query); + curl_setopt($curl, CURLOPT_URL, $url.'?'.$query); break; case 'delete': @@ -429,212 +431,221 @@ protected function makeRequest($http_verb, $method, $args = array(), $timeout = break; } - $response_content = curl_exec($curl); - $response['headers'] = curl_getinfo($curl); - $response = $this->setResponseState($response, $response_content, $curl); - $formattedResponse = $this->formatResponse($response); - - curl_close($curl); - - $isSuccess = $this->determineSuccess($response, $formattedResponse['response'], $timeout); - return is_array($formattedResponse['response']) ? $formattedResponse['response'] : $isSuccess; - } - - /** - * @param string $http_verb - * The HTTP verb to use: get, post, put, patch, delete. - * @param string $method - * The API method to be called. - * @param array $args - * Assoc array of parameters to be passed. - * @param int $timeout - * Timeout limit for request in seconds. - * - * @return array - */ - protected function prepareStateForRequest($http_verb, $method, $url, $timeout) - { - $this->last_error = ''; - - $this->request_successful = FALSE; - - $this->last_response = array( - 'headers' => null, // array of details from curl_getinfo(). - 'httpHeaders' => null, // array of HTTP headers. - 'body' => null // content of the response. - ); - - $this->last_request = array( - 'method' => $http_verb, - 'path' => $method, - 'url' => $url, - 'body' => '', - 'timeout' => $timeout, - ); - - return $this->last_response; - } - - /** - * Get the HTTP headers as an array of header-name => header-value pairs. - * - * @param string $headersAsString - * A string of headers to parse. - * - * @return array - * The parsed headers. - */ - protected function getHeadersAsArray($headersAsString) - { - $headers = array(); - - foreach (explode(PHP_EOL, $headersAsString) as $i => $line) { - if (preg_match('/HTTP\/[1-2]/', substr($line, 0, 7)) === 1) { // http code - continue; - } - - $line = trim($line); - if (empty($line)) { - continue; - } - - list($key, $value) = explode(': ', $line); - $headers[$key] = $value; - } + $response_content = curl_exec($curl); + /** @var array|false $curl_info */ + $curl_info = curl_getinfo($curl); + $response['headers'] = $curl_info; + $response = $this->setResponseState($response, $response_content, $curl); + $formattedResponse = $this->formatResponse($response); + + curl_close($curl); - return $headers; - } - - /** - * Encode the data and attach it to the request. - * - * @param resource $curl - * cURL session handle, used by reference. - * @param array $data - * Assoc array of data to attach. - */ - protected function attachRequestPayload(&$curl, $data) - { - $encoded = json_encode($data); - $this->last_request['body'] = $encoded; - curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded); - } - - /** - * Decode the response and format any error messages for debugging. - * - * @param array $response - * The response from the curl request. - * - * @return array|FALSE - * A decoded array from JSON response. - */ - protected function formatResponse($response) - { - $this->last_response = $response; - - if (empty($response['body'])) { - return FALSE; + if (isset($formattedResponse['response']) && is_array($formattedResponse['response'])) { + $this->determineSuccess($response, $formattedResponse['response'], $timeout); + + return $formattedResponse['response']; + } + + return $this->determineSuccess($response, false, $timeout); } - // Return the decoded response from JSON when reponse is a valid json. - // Will return FALSE otherwise. - return ($result = json_decode($response['body'], true)) ? $result : FALSE; - } - - /** - * Do post-request formatting and setting state from the response. - * - * @param array $response - * The response from the curl request. - * @param string $response_content - * The body of the response from the curl request. - * @param resource $curl - * The curl resource. - * - * @return array - * The modified response. - * - * @throws \Exception - */ - protected function setResponseState($response, $response_content, $curl) - { - if ($response_content === FALSE) { - $this->last_error = curl_error($curl); - throw new Exception($this->last_error); - } else { - $headerSize = $response['headers']['header_size']; - - $response['httpHeaders'] = $this->getHeadersAsArray(substr($response_content, 0, $headerSize)); - $response['body'] = substr($response_content, $headerSize); - - if (isset($response['headers']['request_header'])) { - $this->last_request['headers'] = $response['headers']['request_header']; - } + /** + * @param string $http_verb + * The HTTP verb to use: get, post, put, patch, delete + * @param string $method + * The API method to be called + * @param string $url + * The URL + * @param int $timeout + * Timeout limit for request in seconds + */ + protected function prepareStateForRequest(string $http_verb, string $method, string $url, int $timeout): array + { + $this->last_error = ''; + + $this->request_successful = false; + + $this->last_response = [ + 'headers' => null, // array of details from curl_getinfo(). + 'httpHeaders' => null, // array of HTTP headers. + 'body' => null, // content of the response. + ]; + + $this->last_request = [ + 'method' => $http_verb, + 'path' => $method, + 'url' => $url, + 'body' => '', + 'timeout' => $timeout, + ]; + + return $this->last_response; } - return $response; - } - - /** - * Check if the response was successful or a failure. - * - * @param array $response - * The response from the curl request. - * @param array|FALSE $formattedResponse - * The response body payload from the curl request. - * @param int $timeout - * The timeout supplied to the curl request. - * - * @return bool - * If the request was successful. - * - * @throws \Exception - */ - protected function determineSuccess($response, $formattedResponse, $timeout) - { - $status = $this->findHTTPStatus($response, $formattedResponse); - - if ($status >= 200 && $status <= 299) { - $this->request_successful = true; - return true; + /** + * Get the HTTP headers as an array of header-name => header-value pairs. + * + * @param string $headersAsString + * A string of headers to parse + * + * @return array + * The parsed headers + */ + protected function getHeadersAsArray(string $headersAsString): array + { + $headers = []; + + foreach (explode(PHP_EOL, $headersAsString) as $line) { + if (1 === preg_match('/HTTP\/[1-2]/', substr($line, 0, 7))) { // http code + continue; + } + + $line = trim($line); + if (empty($line)) { + continue; + } + + list($key, $value) = explode(': ', $line); + $headers[$key] = $value; + } + + return $headers; } - if (isset($formattedResponse['message'])) { - $this->last_error = sprintf('%s %d: %s', $formattedResponse['status'], $formattedResponse['code'], $formattedResponse['message']); - throw new Exception($this->last_error); + /** + * Encode the data and attach it to the request. + * + * @param CurlHandle $curl + * cURL session handle, used by reference + * @param array $data + * Assoc array of data to attach + */ + protected function attachRequestPayload(CurlHandle &$curl, array $data): void + { + $encoded = json_encode($data); + $this->last_request['body'] = $encoded; + curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded); } - if ($timeout > 0 && $response['headers'] && $response['headers']['total_time'] >= $timeout) { - $this->last_error = sprintf('Request timed out after %f seconds.', $response['headers']['total_time']); - throw new Exception($this->last_error); + /** + * Decode the response and format any error messages for debugging. + * + * @param array $response + * The response from the curl request + * + * @return array|false + * A decoded array from JSON response + */ + protected function formatResponse(array $response) + { + $this->last_response = $response; + + if (empty($response['body']) || !is_string($response['body'])) { + return false; + } + + // Return the decoded response from JSON when response is a valid json. + // Will return FALSE otherwise. + /** @var array|null $result */ + $result = json_decode($response['body'], true); + + return $result ?? false; } - $this->last_error = 'Unknown error, call getLastResponse() to find out what happened.'; - throw new Exception($this->last_error); - } - - /** - * Find the HTTP status code from the headers or API response body - * - * @param array $response - * The response from the curl request. - * @param array|FALSE $formattedResponse - * The decoded response body payload from the curl request. - * - * @return int - * HTTP status code - */ - protected function findHTTPStatus($response, $formattedResponse) - { - if (!empty($response['headers']) && isset($response['headers']['http_code'])) { - return (int)$response['headers']['http_code']; + /** + * Do post-request formatting and setting state from the response. + * + * @param array $response + * The response from the curl request + * @param string|bool $response_content + * The body of the response from the curl request + * @param CurlHandle $curl + * The curl resource + * + * @return array + * The modified response + * + * @throws \Exception + */ + protected function setResponseState(array $response, string|bool $response_content, CurlHandle $curl): array + { + if (false === $response_content) { + $this->last_error = curl_error($curl); + throw new Exception($this->last_error); + } elseif (is_string($response_content)) { + $headerSize = isset($response['headers']['header_size']) ? (int) $response['headers']['header_size'] : 0; + + $response['httpHeaders'] = $this->getHeadersAsArray(substr($response_content, 0, $headerSize)); + $response['body'] = substr($response_content, $headerSize); + + if (isset($response['headers']['request_header'])) { + $this->last_request['headers'] = $response['headers']['request_header']; + } + } + + return $response; } - if (!empty($response['body']) && isset($formattedResponse['code'])) { - return (int)$formattedResponse['code']; + /** + * Check if the response was successful or a failure. + * + * @param array $response + * The response from the curl request + * @param array|false $formattedResponse + * The response body payload from the curl request + * @param int $timeout + * The timeout supplied to the curl request + * + * @return bool + * If the request was successful + * + * @throws \Exception + */ + protected function determineSuccess(array $response, $formattedResponse, int $timeout): bool + { + $status = $this->findHTTPStatus($response, $formattedResponse); + + if ($status >= 200 && $status <= 299) { + $this->request_successful = true; + + return true; + } + + if (isset($formattedResponse['message'])) { + $this->last_error = sprintf('%s %d: %s', (string) $formattedResponse['status'], (int) $formattedResponse['code'], (string) $formattedResponse['message']); + throw new Exception($this->last_error); + } + + if (isset($response['headers']['total_time']) && $timeout > 0 && $response['headers']['total_time'] >= $timeout) { + $this->last_error = sprintf('Request timed out after %f seconds.', (float) $response['headers']['total_time']); + throw new Exception($this->last_error); + } + + $this->last_error = 'Unknown error, call getLastResponse() to find out what happened.'; + throw new Exception($this->last_error); } - return 418; - } + /** + * Find the HTTP status code from the headers or API response body. + * + * @param array $response + * The response from the curl request + * @param array|false $formattedResponse + * The decoded response body payload from the curl request + * + * @return int + * HTTP status code + */ + protected function findHTTPStatus(array $response, $formattedResponse): int + { + if (!empty($response['headers']) && isset($response['headers']['http_code'])) { + return (int) $response['headers']['http_code']; + } + + if (!empty($response['body']) && isset($formattedResponse['code'])) { + return (int) $formattedResponse['code']; + } + + return 418; + } } diff --git a/tests/Advanced/QualityComplaintsTest.php b/tests/Advanced/QualityComplaintsTest.php index 6204f55..46ca0b5 100644 --- a/tests/Advanced/QualityComplaintsTest.php +++ b/tests/Advanced/QualityComplaintsTest.php @@ -6,100 +6,99 @@ use Exception; /** - * @coversDefaultClass Antistatique\TrustedShops\TrustedShops + * @coversDefaultClass \Antistatique\TrustedShops\TrustedShops */ class QualityComplaintsTest extends RequestTestBase { - - /** - * {@inheritDoc} - */ - public function setup() { - parent::setup(); - - $TRUSTEDSHOPS_LOGIN = getenv('TRUSTEDSHOPS_LOGIN'); - $TRUSTEDSHOPS_PASS = getenv('TRUSTEDSHOPS_PASS'); - - $this->assertNotEmpty($TRUSTEDSHOPS_LOGIN, 'No environment variables! Copy .env.example -> .env and fill out your TrustedShops account details.'); - $this->assertNotEmpty($TRUSTEDSHOPS_PASS, 'No environment variables! Copy .env.example -> .env and fill out your TrustedShops account details.'); - } - - /** - * @covers ::setApiCredentials - * @covers ::determineSuccess - * @covers ::findHTTPStatus - */ - public function testUnconfiguredCredentials() - { - $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('ERROR 403: FORBIDDEN'); - $this->ts_restricted->get('shops/'.$TRUSTEDSHOPS_TSID.'/quality/complaints'); - } - - /** - * @covers ::setApiCredentials - * @covers ::determineSuccess - * @covers ::findHTTPStatus - */ - public function testBadCredentials() - { - $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); - $this->ts_restricted->setApiCredentials( 'foo', 'bar'); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('ERROR 403: FORBIDDEN'); - $this->ts_restricted->get('shops/'.$TRUSTEDSHOPS_TSID.'/quality/complaints'); - } - - /** - * @covers ::get - * @covers ::makeRequest - * @covers ::setApiCredentials - * @covers ::determineSuccess - * @covers ::findHTTPStatus - * @covers ::getLastError - * @covers ::getLastResponse - * @covers ::getLastRequest - * @covers ::setResponseState - * @covers ::getHeadersAsArray - * @covers ::formatResponse - * @covers ::attachRequestPayload - * @covers ::prepareStateForRequest - */ - public function testShopsQualityComplaints() - { - $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); - $TRUSTEDSHOPS_LOGIN = getenv('TRUSTEDSHOPS_LOGIN'); - $TRUSTEDSHOPS_PASS = getenv('TRUSTEDSHOPS_PASS'); - - $this->ts_restricted->setApiCredentials( $TRUSTEDSHOPS_LOGIN, $TRUSTEDSHOPS_PASS); - - /** @var array $response */ - $response = $this->ts_restricted->get('shops/'.$TRUSTEDSHOPS_TSID.'/quality/complaints'); - - $this->assertInternalType('array', $response); - $this->assertTrue($this->ts_restricted->success()); - $this->assertFalse($this->ts_restricted->getLastError()); - - $this->assertSame( - ['headers', 'httpHeaders', 'body'], - array_keys($this->ts_restricted->getLastResponse()) - ); - - $this->assertSame( + /** + * {@inheritDoc} + */ + public function setup(): void + { + parent::setup(); + + $TRUSTEDSHOPS_LOGIN = getenv('TRUSTEDSHOPS_LOGIN'); + $TRUSTEDSHOPS_PASS = getenv('TRUSTEDSHOPS_PASS'); + + $this->assertNotEmpty($TRUSTEDSHOPS_LOGIN, 'No environment variables! Copy .env.example -> .env and fill out your TrustedShops account details.'); + $this->assertNotEmpty($TRUSTEDSHOPS_PASS, 'No environment variables! Copy .env.example -> .env and fill out your TrustedShops account details.'); + } + + /** + * @covers ::setApiCredentials + * @covers ::determineSuccess + * @covers ::findHTTPStatus + */ + public function testUnconfiguredCredentials() + { + $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); + + $this->expectException(Exception::class); + $this->expectExceptionMessage('ERROR 403: FORBIDDEN'); + $this->ts_restricted->get('shops/'.$TRUSTEDSHOPS_TSID.'/quality/complaints'); + } + + /** + * @covers ::setApiCredentials + * @covers ::determineSuccess + * @covers ::findHTTPStatus + */ + public function testBadCredentials() + { + $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); + $this->ts_restricted->setApiCredentials('foo', 'bar'); + + $this->expectException(Exception::class); + $this->expectExceptionMessage('ERROR 403: FORBIDDEN'); + $this->ts_restricted->get('shops/'.$TRUSTEDSHOPS_TSID.'/quality/complaints'); + } + + /** + * @covers ::get + * @covers ::makeRequest + * @covers ::setApiCredentials + * @covers ::determineSuccess + * @covers ::findHTTPStatus + * @covers ::getLastError + * @covers ::getLastResponse + * @covers ::getLastRequest + * @covers ::setResponseState + * @covers ::getHeadersAsArray + * @covers ::formatResponse + * @covers ::attachRequestPayload + * @covers ::prepareStateForRequest + */ + public function testShopsQualityComplaints() + { + $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); + $TRUSTEDSHOPS_LOGIN = getenv('TRUSTEDSHOPS_LOGIN'); + $TRUSTEDSHOPS_PASS = getenv('TRUSTEDSHOPS_PASS'); + + $this->ts_restricted->setApiCredentials($TRUSTEDSHOPS_LOGIN, $TRUSTEDSHOPS_PASS); + + /** @var array $response */ + $response = $this->ts_restricted->get('shops/'.$TRUSTEDSHOPS_TSID.'/quality/complaints'); + + $this->assertIsArray($response); + $this->assertTrue($this->ts_restricted->success()); + $this->assertFalse($this->ts_restricted->getLastError()); + + $this->assertSame( + ['headers', 'httpHeaders', 'body'], + array_keys($this->ts_restricted->getLastResponse()) + ); + + $this->assertSame( ['method', 'path', 'url', 'body', 'timeout', 'headers'], - array_keys($this->ts_restricted->getLastRequest()) - ); - - $this->assertInternalType('string', $response['data']['shop']['url']); - $this->assertEquals('demoshop.trustedshops.com/fr/home', $response['data']['shop']['url']); + array_keys($this->ts_restricted->getLastRequest()) + ); - $this->assertSame( - ['totalComplaintCount', 'activeComplaintCount'], - array_keys((array)$response['data']['shop']['qualityIndicators']['complaintIndicator']) - ); + $this->assertIsString($response['data']['shop']['url']); + $this->assertEquals('demoshop.trustedshops.com/fr/home', $response['data']['shop']['url']); - } + $this->assertSame( + ['totalComplaintCount', 'activeComplaintCount'], + array_keys((array) $response['data']['shop']['qualityIndicators']['complaintIndicator']) + ); + } } diff --git a/tests/Common/ShopsTest.php b/tests/Common/ShopsTest.php index ebaec46..3a81e08 100644 --- a/tests/Common/ShopsTest.php +++ b/tests/Common/ShopsTest.php @@ -6,54 +6,53 @@ use Exception; /** - * @coversDefaultClass Antistatique\TrustedShops\TrustedShops + * @coversDefaultClass \Antistatique\TrustedShops\TrustedShops */ class ShopsTest extends RequestTestBase { - - /** - * @covers ::determineSuccess - * @covers ::findHTTPStatus - */ - public function testInvalidTsid() - { - $this->expectException(Exception::class); - $this->expectExceptionMessage('ERROR 400: TS_ID_INVALID'); - $this->ts_public->get('shops/abc'); - } - - /** - * @covers ::get - * @covers ::makeRequest - * @covers ::determineSuccess - * @covers ::findHTTPStatus - * @covers ::getLastError - * @covers ::getLastResponse - * @covers ::getLastRequest - * @covers ::setResponseState - * @covers ::getHeadersAsArray - * @covers ::attachRequestPayload - * @covers ::prepareStateForRequest - */ - public function testGetShops() - { - $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); - - /** @var array $response */ - $response = $this->ts_public->get('shops/'.$TRUSTEDSHOPS_TSID); - - $this->assertInternalType('array', $response); - $this->assertTrue($this->ts_public->success()); - $this->assertFalse($this->ts_public->getLastError()); - - $this->assertSame( - ['headers', 'httpHeaders', 'body'], - array_keys($this->ts_public->getLastResponse()) - ); - - $this->assertSame( - ['method', 'path', 'url', 'body', 'timeout', 'headers'], - array_keys($this->ts_public->getLastRequest()) - ); - } + /** + * @covers ::determineSuccess + * @covers ::findHTTPStatus + */ + public function testInvalidTsid() + { + $this->expectException(Exception::class); + $this->expectExceptionMessage('ERROR 400: TS_ID_INVALID'); + $this->ts_public->get('shops/abc'); + } + + /** + * @covers ::get + * @covers ::makeRequest + * @covers ::determineSuccess + * @covers ::findHTTPStatus + * @covers ::getLastError + * @covers ::getLastResponse + * @covers ::getLastRequest + * @covers ::setResponseState + * @covers ::getHeadersAsArray + * @covers ::attachRequestPayload + * @covers ::prepareStateForRequest + */ + public function testGetShops() + { + $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); + + /** @var array $response */ + $response = $this->ts_public->get('shops/'.$TRUSTEDSHOPS_TSID); + + $this->assertIsArray($response); + $this->assertTrue($this->ts_public->success()); + $this->assertFalse($this->ts_public->getLastError()); + + $this->assertSame( + ['headers', 'httpHeaders', 'body'], + array_keys($this->ts_public->getLastResponse()) + ); + + $this->assertSame( + ['method', 'path', 'url', 'body', 'timeout', 'headers'], + array_keys($this->ts_public->getLastRequest()) + ); + } } diff --git a/tests/CurlAvailabilitiesTest.php b/tests/CurlAvailabilitiesTest.php new file mode 100644 index 0000000..c7888ae --- /dev/null +++ b/tests/CurlAvailabilitiesTest.php @@ -0,0 +1,58 @@ +assertTrue($trustedShops->isCurlAvailable()); + } + + /** + * @covers ::__construct + * @covers ::isCurlAvailable + */ + public function testcurlNotAvailable(): void + { + $trustedShopsMock = $this->createMock(TrustedShops::class); + $trustedShopsMock->method('isCurlAvailable')->willReturn(false); + + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('cURL support is required, but can\'t be found.'); + $trustedShopsMock->__construct(); + + $trustedShopsMock->method('isCurlAvailable')->willReturn(true); + } + + /** + * @covers ::__construct + * @covers ::isCurlAvailable + * + * @doesNotPerformAssertions + */ + public function testCurlAvailable(): void + { + $trustedShopsMock = $this->createMock(TrustedShops::class); + $trustedShopsMock->method('isCurlAvailable')->willReturn(true); + $trustedShopsMock->__construct(); + } +} diff --git a/tests/RequestTestBase.php b/tests/RequestTestBase.php index a40fb66..90a4abc 100644 --- a/tests/RequestTestBase.php +++ b/tests/RequestTestBase.php @@ -4,36 +4,37 @@ use Antistatique\TrustedShops\TrustedShops; use PHPUnit\Framework\TestCase; -use Exception; /** - * @coversDefaultClass Antistatique\TrustedShops\TrustedShops + * @coversDefaultClass \Antistatique\TrustedShops\TrustedShops */ abstract class RequestTestBase extends TestCase { - /** - * The Restricted TrustedShops class to tests public access API endpoints. - * - * @var \Antistatique\TrustedShops\TrustedShops - */ - protected $ts_public; + /** + * The Restricted TrustedShops class to tests public access API endpoints. + * + * @var \Antistatique\TrustedShops\TrustedShops + */ + protected $ts_public; - /** - * The Restricted TrustedShops class to tests restricted access API endpoints. - * - * @var \Antistatique\TrustedShops\TrustedShops - */ - protected $ts_restricted; + /** + * The Restricted TrustedShops class to tests restricted access API endpoints. + * + * @var \Antistatique\TrustedShops\TrustedShops + */ + protected $ts_restricted; - /** - * {@inheritDoc} - */ - public function setup() { - $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); - $this->assertNotEmpty($TRUSTEDSHOPS_TSID, 'No environment variables! Copy .env.example -> .env and fill out your TrustedShops account details.'); + /** + * {@inheritDoc} + */ + public function setup(): void + { + parent::setUp(); - $this->ts_public = new TrustedShops('public', 'v2', 'api-qa'); - $this->ts_restricted = new TrustedShops('restricted', 'v2', 'api-qa'); - } + $TRUSTEDSHOPS_TSID = getenv('TRUSTEDSHOPS_TSID'); + $this->assertNotEmpty($TRUSTEDSHOPS_TSID, 'No environment variables! Copy .env.example -> .env and fill out your TrustedShops account details.'); + $this->ts_public = new TrustedShops('public', 'v2', 'api-qa'); + $this->ts_restricted = new TrustedShops('restricted', 'v2', 'api-qa'); + } } diff --git a/tests/Traits/TestPrivateTrait.php b/tests/Traits/TestPrivateTrait.php index 06e1365..f5459ee 100644 --- a/tests/Traits/TestPrivateTrait.php +++ b/tests/Traits/TestPrivateTrait.php @@ -4,26 +4,27 @@ trait TestPrivateTrait { - /** - * Modify a method accessibility to make it testable. - * - * @param string|Object $obj - * Object. - * @param string $name - * Method Name. - * @param array $args - * Optional arguments. - * - * @return mixed - * the method result. - * - * @throws \ReflectionException - */ - public function callPrivateMethod($obj, $name, array $args = array()) - { - $class = new \ReflectionClass($obj); - $method = $class->getMethod($name); - $method->setAccessible(true); - return $method->invokeArgs($obj, $args); - } + /** + * Modify a method accessibility to make it testable. + * + * @param string|object $obj + * Object + * @param string $name + * Method Name + * @param array $args + * Optional arguments + * + * @return mixed + * the method result + * + * @throws \ReflectionException + */ + public function callPrivateMethod($obj, $name, array $args = []) + { + $class = new \ReflectionClass($obj); + $method = $class->getMethod($name); + $method->setAccessible(true); + + return $method->invokeArgs($obj, $args); + } } diff --git a/tests/TrustedShopsTest.php b/tests/TrustedShopsTest.php index 1d0bcc9..411c6d0 100644 --- a/tests/TrustedShopsTest.php +++ b/tests/TrustedShopsTest.php @@ -2,615 +2,739 @@ namespace Antistatique\TrustedShops\Tests; +use Antistatique\TrustedShops\Tests\Traits\TestPrivateTrait; use Antistatique\TrustedShops\TrustedShops; -use RuntimeException; -use phpmock\phpunit\PHPMock; use Exception; -use Antistatique\TrustedShops\Tests\Traits\TestPrivateTrait; +use phpmock\phpunit\PHPMock; +use RuntimeException; /** - * @coversDefaultClass Antistatique\TrustedShops\TrustedShops + * @coversDefaultClass \Antistatique\TrustedShops\TrustedShops */ -class TrustedShopsTest extends RequestTestBase { - - use PHPMock; - use TestPrivateTrait; - - /** - * @covers ::__construct - * @covers ::setEndpoint - * @covers ::getApiEndpoint - * - * @dataProvider providerSetEndpoint - */ - public function testConstructor($dc, $scoop, $version, $expected) { - $ts = new TrustedShops($scoop, $version, $dc); - $this->assertSame($expected, $ts->getApiEndpoint()); - } - - /** - * @covers ::setEndpoint - * @covers ::getApiEndpoint - * - * @dataProvider providerSetEndpoint - */ - public function testSetEndpoint($dc, $scoop, $version, $expected) { - $ts = new TrustedShops(); - $ts->setEndpoint($dc, $scoop, $version); - $this->assertSame($expected, $ts->getApiEndpoint()); - } - - /** - * Dataprovider of :testSetEndpoint - * - * @return array - * Variation of endpoint. - */ - public function providerSetEndpoint() { - return [ - [NULL, NULL, NULL, 'https://api.trustedshops.com/rest/public/v2'], - [ - NULL, - 'restricted', - NULL, - 'https://api.trustedshops.com/rest/restricted/v2' - ], - [ - NULL, - 'restricted', - 'v3', - 'https://api.trustedshops.com/rest/restricted/v3' - ], - [ - 'api-qa', - 'restricted', - 'v3', - 'https://api-qa.trustedshops.com/rest/restricted/v3' - ], - ['api-qa', NULL, NULL, 'https://api-qa.trustedshops.com/rest/public/v2'], - [ - 'api-qa', - 'restricted', - NULL, - 'https://api-qa.trustedshops.com/rest/restricted/v2' - ], - ]; - } - - /** - * @covers ::__construct - */ - public function testUnsupportedScoop() { - $this->expectException(RuntimeException::class); - $this->expectExceptionMessage('Unsupported TrustedShops scoop "foo".'); - new TrustedShops('foo'); - } - - /** - * @covers ::success - * @covers ::getLastError - * @covers ::getLastResponse - * @covers ::getLastRequest - * @covers ::setResponseState - * @covers ::getHeadersAsArray - * @covers ::prepareStateForRequest - */ - public function testInstantiation() { - $this->assertFalse($this->ts_public->success()); - $this->assertFalse($this->ts_public->getLastError()); - $this->assertSame([ - 'headers' => NULL, - 'body' => NULL - ], $this->ts_public->getLastResponse()); - $this->assertSame([], $this->ts_public->getLastRequest()); - } - - /** - * @covers ::setApiCredentials - */ - public function testSetApiCredentials() { - $this->assertAttributeEmpty('api_credentials_user', $this->ts_restricted); - $this->assertAttributeEmpty('api_credentials_pass', $this->ts_restricted); - - $this->ts_restricted->setApiCredentials('foo', 'bar'); - - $this->assertAttributeEquals('foo', 'api_credentials_user', $this->ts_restricted); - $this->assertAttributeEquals('bar', 'api_credentials_pass', $this->ts_restricted); - - } - - /** - * @covers ::delete - * - * @dataProvider providerVerbMock - */ - public function testVerbDelete($method, $args, $timeout) { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['makeRequest']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('makeRequest') - ->with('delete', $method, $args, $timeout); - - $ts_mock->delete($method, $args, $timeout); - } - - /** - * @covers ::get - * - * @dataProvider providerVerbMock - */ - public function testVerbGet($method, $args, $timeout) { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['makeRequest']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('makeRequest') - ->with('get', $method, $args, $timeout); - - $ts_mock->get($method, $args, $timeout); - } - - /** - * @covers ::patch - * - * @dataProvider providerVerbMock - */ - public function testVerbPatch($method, $args, $timeout) { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['makeRequest']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('makeRequest') - ->with('patch', $method, $args, $timeout); - - $ts_mock->patch($method, $args, $timeout); - } - - /** - * @covers ::post - * - * @dataProvider providerVerbMock - */ - public function testVerbPost($method, $args, $timeout) { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['makeRequest']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('makeRequest') - ->with('post', $method, $args, $timeout); - - $ts_mock->post($method, $args, $timeout); - } - - /** - * @covers ::put - * - * @dataProvider providerVerbMock - */ - public function testVerbPut($method, $args, $timeout) { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['makeRequest']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('makeRequest') - ->with('put', $method, $args, $timeout); - - $ts_mock->put($method, $args, $timeout); - } - - /** - * Dataprovider of :testVerbDelete - * - * @return array - * Variation of verb parameters. - */ - public function providerVerbMock() { - return [ - ['foo', NULL, 10], - ['foo/bar', NULL, 20], - ['foo/bar', ['foo' => 'bar'], 20], - ['foo?bar=boo', NULL, 20], - ]; - } - - /** - * @covers ::formatResponse - * @covers ::getLastResponse - */ - public function testFormatResponseJson() { - $response['body'] = file_get_contents(__DIR__ . '/assets/responses/partials/body.json'); - $result = $this->callPrivateMethod($this->ts_public, 'formatResponse', [$response]); - - $this->assertInternalType('array', $result); - $this->assertInternalType('array', $this->ts_public->getLastResponse()); - $this->assertSame([ - 'response' => [ - 'code' => 200, - 'data' => [ - 'shop' => [ - 'tsId' => 'UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', - 'url' => 'demoshop.trustedshops.com/fr/home', - 'name' => 'Trusted Shops DemoShop FR', - 'languageISO2' => 'fr', - 'targetMarketISO3' => 'FRA', +class TrustedShopsTest extends RequestTestBase +{ + use PHPMock; + use TestPrivateTrait; + + /** + * @covers ::__construct + * @covers ::setEndpoint + * @covers ::getApiEndpoint + * + * @dataProvider providerSetEndpoint + */ + public function testConstructor($dc, $scoop, $version, $expected) + { + $ts = new TrustedShops($scoop, $version, $dc); + $this->assertSame($expected, $ts->getApiEndpoint()); + } + + /** + * @covers ::setEndpoint + * @covers ::getApiEndpoint + * + * @dataProvider providerSetEndpoint + */ + public function testSetEndpoint($dc, $scoop, $version, $expected) + { + $ts = new TrustedShops(); + $ts->setEndpoint($dc, $scoop, $version); + $this->assertSame($expected, $ts->getApiEndpoint()); + } + + /** + * Dataprovider of :testSetEndpoint. + * + * @return array + * Variation of endpoint + */ + public static function providerSetEndpoint(): iterable + { + return [ + [null, null, null, 'https://api.trustedshops.com/rest/public/v2'], + [ + null, + 'restricted', + null, + 'https://api.trustedshops.com/rest/restricted/v2', ], - ], - 'message' => 'SUCCESS', - 'responseInfo' => [ - 'apiVersion' => '2.4.18', - ], - 'status' => 'SUCCESS', - ] - ], $result); - } - - /** - * @covers ::formatResponse - */ - public function testFormatResponseEmptyBody() { - $result = $this->callPrivateMethod($this->ts_public, 'formatResponse', [[]]); - $this->assertFalse($result); - $this->assertEmpty($this->ts_public->getLastResponse()); - } - - /** - * @covers ::setResponseState - */ - public function testSetResponseState() { - $response = json_decode(file_get_contents(__DIR__ . '/assets/responses/shops.json'), TRUE); - $response_content = file_get_contents(__DIR__ . '/assets/responses/partials/body.txt'); - - $this->assertArrayHasKey('httpHeaders', $response); - $this->assertArrayHasKey('body', $response); - $this->assertEmpty($response['httpHeaders']); - $this->assertEmpty($response['body']); - - $response = $this->callPrivateMethod($this->ts_public, 'setResponseState', [ - $response, $response_content, NULL - ]); - - $this->assertArrayHasKey('httpHeaders', $response); - $this->assertArrayHasKey('body', $response); - $this->assertSame([ - 'Date' => 'Mon, 30 Sep 2019 14:09:23 GMT', - 'Server' => 'Apache', - 'Access-Control-Allow-Origin' => '*', - 'Content-Encoding' => 'gzip', - 'Connection' => 'close', - 'Transfer-Encoding' => 'chunked', - 'Content-Type' => 'application/json', - ], $response['httpHeaders']); - $this->assertSame(' -{"response":{"code":200,"data":{"shop":{"tsId":"UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA","url":"demoshop.trustedshops.com/fr/home","name":"Trusted Shops DemoShop FR","languageISO2":"fr","targetMarketISO3":"FRA"}},"message":"SUCCESS","responseInfo":{"apiVersion":"2.4.18"},"status":"SUCCESS"}} -', $response['body']); - } - - /** - * @covers ::setResponseState - */ - public function testSetResponseStateError() { - $curl_error_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_error'); - $curl_error_mock->expects($this->once()) - ->willReturn('Something went wrong.'); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('Something went wrong.'); - $this->callPrivateMethod($this->ts_public, 'setResponseState', [ - NULL, FALSE, NULL - ]); - } - - /** - * @covers ::getHeadersAsArray - */ - public function testGetHeadersAsArray() { - $headers_string = file_get_contents(__DIR__ . '/assets/responses/partials/headers.txt'); - $headers = $this->callPrivateMethod($this->ts_public, 'getHeadersAsArray', [$headers_string]); - - $this->assertSame([ - 'Date' => 'Mon, 30 Sep 2019 14:09:23 GMT', - 'Server' => 'Apache', - 'Access-Control-Allow-Origin' => '*', - 'Content-Encoding' => 'gzip', - 'Connection' => 'close', - 'Transfer-Encoding' => 'chunked', - 'Content-Type' => 'application/json', - ], $headers); - } - - /** - * @covers ::makeRequest - */ - public function testMakeRequestGet() { - $headers_json = json_decode((file_get_contents(__DIR__ . '/assets/responses/partials/headers.json')), TRUE); - $body_json = file_get_contents(__DIR__ . '/assets/responses/partials/body.json'); - $body_txt = file_get_contents(__DIR__ . '/assets/responses/partials/body.txt'); - - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['prepareStateForRequest', 'setResponseState', 'formatResponse', 'determineSuccess']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('prepareStateForRequest') - ->with('get', 'foo', 'https://api.trustedshops.com/rest/public/v2/foo', 10) - ->willReturn([ - 'headers' => null, - 'httpHeaders' => null, - 'body' => null, - ]); - - $response = [ - 'body' => $body_json, - 'headers' => $headers_json, - 'httpHeaders' => [ - 'Date' => 'Mon, 30 Sep 2019 14:09:23 GMT', - 'Server' => 'Apache', - 'Access-Control-Allow-Origin' => '*', - 'Content-Encoding' => 'gzip', - 'Connection' => 'close', - 'Transfer-Encoding' => 'chunked', - 'Content-Type' => 'application/json', - ], - ]; - $ts_mock->expects($this->once()) - ->method('setResponseState') - ->with($this->isType('array'), $this->isType('string'), $this->anything()) - ->willReturn($response); - - $ts_mock->expects($this->once()) - ->method('formatResponse') - ->with($this->isType('array')) - ->willReturn(json_decode($response['body'], TRUE)); - - $ts_mock->expects($this->once()) - ->method('determineSuccess') - ->with($this->isType('array'), $this->isType('array'), $this->isType('integer')) - ->willReturn(TRUE); - - $curl_exec_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_exec'); - $curl_exec_mock->expects($this->any())->willReturn($body_txt); - - $curl_getinfo_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_getinfo'); - $curl_getinfo_mock->expects($this->any())->willReturn($response['headers']); - - $result = $this->callPrivateMethod($ts_mock, 'makeRequest', [ - 'get', - 'foo', - ['foo' => 'bar'], - 10 - ]); - $this->assertSame([ - 'code' => 200, - 'data' => [ - 'shop' => [ - 'tsId' => 'UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', - 'url' => 'demoshop.trustedshops.com/fr/home', - 'name' => 'Trusted Shops DemoShop FR', - 'languageISO2' => 'fr', - 'targetMarketISO3' => 'FRA', - ], - ], - 'message' => 'SUCCESS', - 'responseInfo' => [ - 'apiVersion' => '2.4.18', - ], - 'status' => 'SUCCESS', - ], $result); - } - - /** - * @covers ::findHTTPStatus - * - * @dataProvider providerHTTPStatus - */ - public function testFindHTTPStatus($response, $formatted_response, $expected_code) { - $code = $this->callPrivateMethod($this->ts_public, 'findHTTPStatus', [ - $response, - $formatted_response - ]); - $this->assertEquals($expected_code, $code); - } - - /** - * Dataprovider of :testFindHTTPStatus - * - * @return array - * Variation of HTTP Status response. - */ - public function providerHTTPStatus() { - return [ - [ - ['headers' => ['http_code' => 400]], - NULL, - 400, - ], - [ - ['headers' => NULL], - ['code' => 300], - 418, - ], - [ - ['headers' => NULL, 'body' => ''], - ['code' => 300], - 418, - ], - [ - ['headers' => ['http_code' => 400]], - ['code' => 300], - 400, - ], - [ - ['body' => 'lorem'], - ['code' => 318], - 318, - ], - [ - ['body' => ''], - ['code' => 318], - 418, - ], - [ - NULL, - NULL, - 418 - ], - [ - ['headers' => []], - [], - 418, - ], - ]; - } - - /** - * @covers ::determineSuccess - * - * @dataProvider providerStatus200 - */ - public function testDetermineSuccessStatus200($code) { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['findHTTPStatus']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('findHTTPStatus') - ->willReturn($code); - - $this->assertFalse($ts_mock->success()); - $result = $this->callPrivateMethod($ts_mock, 'determineSuccess', [ - NULL, NULL,NULL - ]); - $this->assertTrue($result); - $this->assertTrue($ts_mock->success()); - } - - /** - * Dataprovider of :testDetermineSuccessStatus200 - * - * @return array - * Variation of HTTP Status response. - */ - public function providerStatus200() { - return [ - [ - 200, - ], - [ - 250, - ], - [ - 299, - ], - ]; - } - - /** - * @covers ::determineSuccess - */ - public function testDetermineSuccessErrorMessage() { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['findHTTPStatus']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('findHTTPStatus') - ->willReturn(100); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('ERROR 300: Something went wrong.'); - $this->callPrivateMethod($ts_mock, 'determineSuccess', [ - NULL, ['status' => 'ERROR', 'message' => 'Something went wrong.', 'code' => 300], NULL - ]); - - $this->assertEquals('ERROR 300: Something went wrong.', $ts_mock->getLastError()); - } - - /** - * @covers ::determineSuccess - */ - public function testDetermineSuccessTimeout() { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['findHTTPStatus']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('findHTTPStatus') - ->willReturn(100); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('Request timed out after 20.000000 seconds.'); - $this->callPrivateMethod($ts_mock, 'determineSuccess', [ - ['headers' => ['total_time' => 20]], NULL, 5 - ]); - } - - /** - * @covers ::determineSuccess - */ - public function testDetermineSuccessUnknown() { - $ts_mock = $this->getMockBuilder(TrustedShops::class) - ->setMethods(['findHTTPStatus']) - ->getMock(); - - $ts_mock->expects($this->once()) - ->method('findHTTPStatus') - ->willReturn(100); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('Unknown error, call getLastResponse() to find out what happened.'); - $this->callPrivateMethod($ts_mock, 'determineSuccess', [ - ['headers' => ['total_time' => 20]], NULL, 35 - ]); - - $this->assertEquals('Unknown error, call getLastResponse() to find out what happened.', $ts_mock->getLastError()); - } - - /** - * @covers ::prepareStateForRequest - */ - public function testPrepareStateForRequest() { - $this->callPrivateMethod($this->ts_public, 'prepareStateForRequest', [ - 'get', 'shops', 'https://api-qa.trustedshops.com/rest/public/v2/shops/UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', 23 - ]); - - $this->assertFalse($this->ts_public->success()); - $this->assertFalse($this->ts_public->getLastError()); - $this->assertSame([ + [ + null, + 'restricted', + 'v3', + 'https://api.trustedshops.com/rest/restricted/v3', + ], + [ + 'api-qa', + 'restricted', + 'v3', + 'https://api-qa.trustedshops.com/rest/restricted/v3', + ], + ['api-qa', null, null, 'https://api-qa.trustedshops.com/rest/public/v2'], + [ + 'api-qa', + 'restricted', + null, + 'https://api-qa.trustedshops.com/rest/restricted/v2', + ], + ]; + } + + /** + * @covers ::__construct + */ + public function testUnsupportedScoop() + { + $this->expectException(RuntimeException::class); + $this->expectExceptionMessage('Unsupported TrustedShops scoop "foo".'); + new TrustedShops('foo'); + } + + /** + * @covers ::success + * @covers ::getLastError + * @covers ::getLastResponse + * @covers ::getLastRequest + * @covers ::setResponseState + * @covers ::getHeadersAsArray + * @covers ::prepareStateForRequest + */ + public function testInstantiation() + { + $this->assertFalse($this->ts_public->success()); + $this->assertFalse($this->ts_public->getLastError()); + $this->assertSame([ 'headers' => null, - 'httpHeaders' => null, 'body' => null, ], $this->ts_public->getLastResponse()); - $this->assertSame([ - 'method' => 'get', - 'path' => 'shops', - 'url' => 'https://api-qa.trustedshops.com/rest/public/v2/shops/UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', - 'body' => '', - 'timeout' => 23, - ], $this->ts_public->getLastRequest()); - } - - /** - * @covers ::attachRequestPayload - */ - public function testAttachRequestPayload() { - $this->assertSame([], $this->ts_public->getLastRequest()); - - $curl = curl_init(); - $curl_setopt_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_setopt'); - $curl_setopt_mock->expects($this->once())->with( - $curl, CURLOPT_POSTFIELDS, '{"name":"john","age":30,"car":null}' - ); - - $this->callPrivateMethod($this->ts_public, 'attachRequestPayload', [ - &$curl, ['name' => 'john', 'age' => 30, 'car' => NULL] - ]); - $this->assertSame(['body' => '{"name":"john","age":30,"car":null}'], $this->ts_public->getLastRequest()); - } - + $this->assertSame([], $this->ts_public->getLastRequest()); + } + + /** + * @covers ::setApiCredentials + */ + public function testSetApiCredentials() + { + $reflection = new \ReflectionClass($this->ts_restricted); + + $property = $reflection->getProperty('api_credentials_user'); + $property->setAccessible(true); + $this->assertEmpty($property->getValue($this->ts_restricted)); + + $property = $reflection->getProperty('api_credentials_pass'); + $property->setAccessible(true); + $this->assertEmpty($property->getValue($this->ts_restricted)); + + $this->ts_restricted->setApiCredentials('foo', 'bar'); + + $property = $reflection->getProperty('api_credentials_user'); + $property->setAccessible(true); + $this->assertEquals('foo', $property->getValue($this->ts_restricted)); + + $property = $reflection->getProperty('api_credentials_pass'); + $property->setAccessible(true); + $this->assertEquals('bar', $property->getValue($this->ts_restricted)); + } + + /** + * @covers ::delete + * + * @dataProvider providerVerbMock + */ + public function testVerbDelete($method, $args, $timeout) + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['makeRequest']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('makeRequest') + ->with('delete', $method, $args, $timeout); + + $ts_mock->delete($method, $args, $timeout); + } + + /** + * @covers ::get + * + * @dataProvider providerVerbMock + */ + public function testVerbGet($method, $args, $timeout) + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['makeRequest']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('makeRequest') + ->with('get', $method, $args, $timeout); + + $ts_mock->get($method, $args, $timeout); + } + + /** + * @covers ::patch + * + * @dataProvider providerVerbMock + */ + public function testVerbPatch($method, $args, $timeout) + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['makeRequest']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('makeRequest') + ->with('patch', $method, $args, $timeout); + + $ts_mock->patch($method, $args, $timeout); + } + + /** + * @covers ::post + * + * @dataProvider providerVerbMock + */ + public function testVerbPost($method, $args, $timeout) + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['makeRequest']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('makeRequest') + ->with('post', $method, $args, $timeout); + + $ts_mock->post($method, $args, $timeout); + } + + /** + * @covers ::put + * + * @dataProvider providerVerbMock + */ + public function testVerbPut($method, $args, $timeout) + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['makeRequest']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('makeRequest') + ->with('put', $method, $args, $timeout); + + $ts_mock->put($method, $args, $timeout); + } + + /** + * Dataprovider of :testVerbDelete. + * + * @return array + * Variation of verb parameters + */ + public function providerVerbMock(): iterable + { + return [ + ['foo', [], 10], + ['foo/bar', [], 20], + ['foo/bar', ['foo' => 'bar'], 20], + ['foo?bar=boo', [], 20], + ]; + } + + /** + * @covers ::formatResponse + * @covers ::getLastResponse + */ + public function testFormatResponseJson() + { + $response['body'] = file_get_contents(__DIR__.'/assets/responses/partials/body.json'); + $result = $this->callPrivateMethod($this->ts_public, 'formatResponse', [$response]); + + $this->assertIsArray($result); + $this->assertIsArray($this->ts_public->getLastResponse()); + $this->assertSame([ + 'response' => [ + 'code' => 200, + 'data' => [ + 'shop' => [ + 'tsId' => 'UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', + 'url' => 'demoshop.trustedshops.com/fr/home', + 'name' => 'Trusted Shops DemoShop FR', + 'languageISO2' => 'fr', + 'targetMarketISO3' => 'FRA', + ], + ], + 'message' => 'SUCCESS', + 'responseInfo' => [ + 'apiVersion' => '2.4.18', + ], + 'status' => 'SUCCESS', + ], + ], $result); + } + + /** + * @covers ::formatResponse + */ + public function testFormatResponseEmptyBody() + { + $result = $this->callPrivateMethod($this->ts_public, 'formatResponse', [[]]); + $this->assertFalse($result); + $this->assertEmpty($this->ts_public->getLastResponse()); + } + + /** + * @covers ::setResponseState + */ + public function testSetResponseState() + { + $curl = curl_init(); + $response = json_decode(file_get_contents(__DIR__.'/assets/responses/shops.json'), true); + $response_content = file_get_contents(__DIR__.'/assets/responses/partials/body.txt'); + + $this->assertArrayHasKey('httpHeaders', $response); + $this->assertArrayHasKey('body', $response); + $this->assertEmpty($response['httpHeaders']); + $this->assertEmpty($response['body']); + + $response = $this->callPrivateMethod($this->ts_public, 'setResponseState', [ + $response, $response_content, $curl, + ]); + + $this->assertArrayHasKey('httpHeaders', $response); + $this->assertArrayHasKey('body', $response); + $this->assertSame([ + 'Date' => 'Mon, 30 Sep 2019 14:09:23 GMT', + 'Server' => 'Apache', + 'Access-Control-Allow-Origin' => '*', + 'Content-Encoding' => 'gzip', + 'Connection' => 'close', + 'Transfer-Encoding' => 'chunked', + 'Content-Type' => 'application/json', + ], $response['httpHeaders']); + $this->assertSame(' +{"response":{"code":200,"data":{"shop":{"tsId":"UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA","url":"demoshop.trustedshops.com/fr/home","name":"Trusted Shops DemoShop FR","languageISO2":"fr","targetMarketISO3":"FRA"}},"message":"SUCCESS","responseInfo":{"apiVersion":"2.4.18"},"status":"SUCCESS"}} +', $response['body']); + } + + /** + * @covers ::setResponseState + */ + public function testSetResponseStateError() + { + $curl = curl_init(); + $curl_error_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_error'); + $curl_error_mock->expects($this->once()) + ->willReturn('Something went wrong.'); + + $this->expectException(Exception::class); + $this->expectExceptionMessage('Something went wrong.'); + $this->callPrivateMethod($this->ts_public, 'setResponseState', [ + [], false, $curl, + ]); + } + + /** + * @covers ::getHeadersAsArray + */ + public function testGetHeadersAsArray() + { + $headers_string = file_get_contents(__DIR__.'/assets/responses/partials/headers.txt'); + $headers = $this->callPrivateMethod($this->ts_public, 'getHeadersAsArray', [$headers_string]); + + $this->assertSame([ + 'Date' => 'Mon, 30 Sep 2019 14:09:23 GMT', + 'Server' => 'Apache', + 'Access-Control-Allow-Origin' => '*', + 'Content-Encoding' => 'gzip', + 'Connection' => 'close', + 'Transfer-Encoding' => 'chunked', + 'Content-Type' => 'application/json', + ], $headers); + } + + /** + * @covers ::makeRequest + */ + public function testMakeRequestGet() + { + $headers_json = json_decode((file_get_contents(__DIR__.'/assets/responses/partials/headers.json')), true); + $body_json = file_get_contents(__DIR__.'/assets/responses/partials/body.json'); + $body_txt = file_get_contents(__DIR__.'/assets/responses/partials/body.txt'); + + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->onlyMethods(['prepareStateForRequest', 'setResponseState', 'formatResponse', 'determineSuccess']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('prepareStateForRequest') + ->with('get', 'foo', 'https://api.trustedshops.com/rest/public/v2/foo', 10) + ->willReturn([ + 'headers' => null, + 'httpHeaders' => null, + 'body' => null, + ]); + + $response = [ + 'body' => $body_json, + 'headers' => $headers_json, + 'httpHeaders' => [ + 'Date' => 'Mon, 30 Sep 2019 14:09:23 GMT', + 'Server' => 'Apache', + 'Access-Control-Allow-Origin' => '*', + 'Content-Encoding' => 'gzip', + 'Connection' => 'close', + 'Transfer-Encoding' => 'chunked', + 'Content-Type' => 'application/json', + ], + ]; + $ts_mock->expects($this->once()) + ->method('setResponseState') + ->with($this->isType('array'), $this->isType('string'), $this->anything()) + ->willReturn($response); + + $ts_mock->expects($this->once()) + ->method('formatResponse') + ->with($this->isType('array')) + ->willReturn(json_decode($response['body'], true)); + + $ts_mock->expects($this->once()) + ->method('determineSuccess') + ->with($this->isType('array'), $this->isType('array'), $this->isType('integer')) + ->willReturn(true); + + $curl_exec_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_exec'); + $curl_exec_mock->expects($this->any())->willReturn($body_txt); + + $curl_getinfo_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_getinfo'); + $curl_getinfo_mock->expects($this->any())->willReturn($response['headers']); + + $result = $this->callPrivateMethod($ts_mock, 'makeRequest', [ + 'get', + 'foo', + ['foo' => 'bar'], + 10, + ]); + $this->assertSame([ + 'code' => 200, + 'data' => [ + 'shop' => [ + 'tsId' => 'UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', + 'url' => 'demoshop.trustedshops.com/fr/home', + 'name' => 'Trusted Shops DemoShop FR', + 'languageISO2' => 'fr', + 'targetMarketISO3' => 'FRA', + ], + ], + 'message' => 'SUCCESS', + 'responseInfo' => [ + 'apiVersion' => '2.4.18', + ], + 'status' => 'SUCCESS', + ], $result); + } + + /** + * @covers ::makeRequest + * + * @dataProvider providerHttpVerbs + */ + public function testMakeRequestByVerbs(string $verb): void + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->onlyMethods(['prepareStateForRequest', 'setResponseState', 'formatResponse', 'determineSuccess']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('prepareStateForRequest') + ->with($verb, 'foo', 'https://api.trustedshops.com/rest/public/v2/foo', 10); + + $ts_mock->expects($this->once()) + ->method('setResponseState') + ->with($this->isType('array'), $this->isType('string'), $this->anything()) + ; + + $ts_mock->expects($this->once()) + ->method('formatResponse') + ->with($this->isType('array')) + ->willReturn(['response' => []]); + + $ts_mock->expects($this->once()) + ->method('determineSuccess') + ->with($this->isType('array'), $this->isType('array'), $this->isType('integer')) + ->willReturn(true); + + $curl_exec_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_exec'); + $curl_exec_mock->expects($this->any())->willReturn('body'); + + $this->callPrivateMethod($ts_mock, 'makeRequest', [ + $verb, 'foo', ['foo' => 'bar'], 10, + ]); + } + + /** + * Provider of :testMakeRequestByVerbs. + * + * @return iterable Variation of HTTP Verbs + */ + public static function providerHttpVerbs(): iterable + { + yield ['post']; + yield ['delete']; + yield ['patch']; + yield ['put']; + } + + /** + * @covers ::makeRequest + */ + public function testMakeRequestArgsLanguage(): void + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->onlyMethods(['prepareStateForRequest', 'setResponseState', 'formatResponse', 'determineSuccess']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('prepareStateForRequest') + ->with('get', 'foo', 'https://api.trustedshops.com/rest/public/v2/foo', 10); + + $ts_mock->expects($this->once()) + ->method('setResponseState') + ->with($this->isType('array'), $this->isType('string'), $this->anything()) + ; + + $ts_mock->expects($this->once()) + ->method('formatResponse') + ->with($this->isType('array')) + ->willReturn(['response' => []]); + + $ts_mock->expects($this->once()) + ->method('determineSuccess') + ->with($this->isType('array'), $this->isType('array'), $this->isType('integer')) + ->willReturn(true); + + $curl_exec_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_exec'); + $curl_exec_mock->expects($this->any())->willReturn('body'); + + $this->callPrivateMethod($ts_mock, 'makeRequest', [ + 'get', 'foo', ['language' => 'fr'], 10, + ]); + } + + /** + * @covers ::findHTTPStatus + * + * @dataProvider providerHTTPStatus + */ + public function testFindHTTPStatus($response, $formatted_response, $expected_code) + { + $code = $this->callPrivateMethod($this->ts_public, 'findHTTPStatus', [ + $response, + $formatted_response, + ]); + $this->assertEquals($expected_code, $code); + } + + /** + * Dataprovider of :testFindHTTPStatus. + * + * @return array + * Variation of HTTP Status response + */ + public static function providerHTTPStatus(): iterable + { + return [ + [ + ['headers' => ['http_code' => 400]], + null, + 400, + ], + [ + ['headers' => null], + ['code' => 300], + 418, + ], + [ + ['headers' => null, 'body' => ''], + ['code' => 300], + 418, + ], + [ + ['headers' => ['http_code' => 400]], + ['code' => 300], + 400, + ], + [ + ['body' => 'lorem'], + ['code' => 318], + 318, + ], + [ + ['body' => ''], + ['code' => 318], + 418, + ], + [ + [], + null, + 418, + ], + [ + ['headers' => []], + [], + 418, + ], + ]; + } + + /** + * @covers ::determineSuccess + * + * @dataProvider providerStatus200 + */ + public function testDetermineSuccessStatus200($code) + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['findHTTPStatus']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('findHTTPStatus') + ->willReturn($code); + + $this->assertFalse($ts_mock->success()); + $result = $this->callPrivateMethod($ts_mock, 'determineSuccess', [ + [], null, 0, + ]); + $this->assertTrue($result); + $this->assertTrue($ts_mock->success()); + } + + /** + * Dataprovider of :testDetermineSuccessStatus200. + * + * @return array + * Variation of HTTP Status response + */ + public static function providerStatus200(): iterable + { + return [ + [ + 200, + ], + [ + 250, + ], + [ + 299, + ], + ]; + } + + /** + * @covers ::determineSuccess + */ + public function testDetermineSuccessErrorMessage() + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['findHTTPStatus']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('findHTTPStatus') + ->willReturn(100); + + $this->expectException(Exception::class); + $this->expectExceptionMessage('ERROR 300: Something went wrong.'); + $this->callPrivateMethod($ts_mock, 'determineSuccess', [ + [], ['status' => 'ERROR', 'message' => 'Something went wrong.', 'code' => 300], 0, + ]); + + $this->assertEquals('ERROR 300: Something went wrong.', $ts_mock->getLastError()); + } + + /** + * @covers ::determineSuccess + */ + public function testDetermineSuccessTimeout() + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['findHTTPStatus']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('findHTTPStatus') + ->willReturn(100); + + $this->expectException(Exception::class); + $this->expectExceptionMessage('Request timed out after 20.000000 seconds.'); + $this->callPrivateMethod($ts_mock, 'determineSuccess', [ + ['headers' => ['total_time' => 20]], null, 5, + ]); + } + + /** + * @covers ::determineSuccess + */ + public function testDetermineSuccessUnknown() + { + $ts_mock = $this->getMockBuilder(TrustedShops::class) + ->setMethods(['findHTTPStatus']) + ->getMock(); + + $ts_mock->expects($this->once()) + ->method('findHTTPStatus') + ->willReturn(100); + + $this->expectException(Exception::class); + $this->expectExceptionMessage('Unknown error, call getLastResponse() to find out what happened.'); + $this->callPrivateMethod($ts_mock, 'determineSuccess', [ + ['headers' => ['total_time' => 20]], null, 35, + ]); + + $this->assertEquals('Unknown error, call getLastResponse() to find out what happened.', $ts_mock->getLastError()); + } + + /** + * @covers ::prepareStateForRequest + */ + public function testPrepareStateForRequest() + { + $this->callPrivateMethod($this->ts_public, 'prepareStateForRequest', [ + 'get', 'shops', 'https://api-qa.trustedshops.com/rest/public/v2/shops/UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', 23, + ]); + + $this->assertFalse($this->ts_public->success()); + $this->assertFalse($this->ts_public->getLastError()); + $this->assertSame([ + 'headers' => null, + 'httpHeaders' => null, + 'body' => null, + ], $this->ts_public->getLastResponse()); + $this->assertSame([ + 'method' => 'get', + 'path' => 'shops', + 'url' => 'https://api-qa.trustedshops.com/rest/public/v2/shops/UNSMOKGONMYBWZOXNLVRKUQMUHJAYFGCA', + 'body' => '', + 'timeout' => 23, + ], $this->ts_public->getLastRequest()); + } + + /** + * @covers ::attachRequestPayload + */ + public function testAttachRequestPayload() + { + $this->assertSame([], $this->ts_public->getLastRequest()); + + $curl = curl_init(); + $curl_setopt_mock = $this->getFunctionMock('Antistatique\TrustedShops', 'curl_setopt'); + $curl_setopt_mock->expects($this->any())->with($curl, CURLOPT_POSTFIELDS, '{"name":"john","age":30,"car":null}'); + + $this->callPrivateMethod($this->ts_public, 'attachRequestPayload', [ + &$curl, ['name' => 'john', 'age' => 30, 'car' => null], + ]); + $this->assertSame(['body' => '{"name":"john","age":30,"car":null}'], $this->ts_public->getLastRequest()); + } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 976f2bd..c752cab 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -2,16 +2,15 @@ \error_reporting(E_ALL); -include_once \dirname(__DIR__) . '/vendor/autoload.php'; +include_once \dirname(__DIR__).'/vendor/autoload.php'; if (!\class_exists('Symfony\Component\Dotenv\Dotenv')) { - throw new \RuntimeException('You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'); + throw new \RuntimeException('You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'); } -$env = __DIR__ . '/../.env'; +$env = __DIR__.'/../.env'; if (file_exists($env)) { - $dotenv = new Symfony\Component\Dotenv\Dotenv($env); - $dotenv->load( __DIR__ . '/../.env'); + $dotenv = new Symfony\Component\Dotenv\Dotenv($env); + $dotenv->load(__DIR__.'/../.env'); } -